forked from Wavyzz/dolibarr
natural search in list pages
This commit is contained in:
@@ -1,222 +1,222 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'a11yHelp', function( editor )
|
||||
{
|
||||
var lang = editor.lang.accessibilityHelp,
|
||||
id = CKEDITOR.tools.getNextId();
|
||||
|
||||
// CharCode <-> KeyChar.
|
||||
var keyMap =
|
||||
{
|
||||
8 : "BACKSPACE",
|
||||
9 : "TAB" ,
|
||||
13 : "ENTER" ,
|
||||
16 : "SHIFT" ,
|
||||
17 : "CTRL" ,
|
||||
18 : "ALT" ,
|
||||
19 : "PAUSE" ,
|
||||
20 : "CAPSLOCK" ,
|
||||
27 : "ESCAPE" ,
|
||||
33 : "PAGE UP" ,
|
||||
34 : "PAGE DOWN" ,
|
||||
35 : "END" ,
|
||||
36 : "HOME" ,
|
||||
37 : "LEFT ARROW" ,
|
||||
38 : "UP ARROW" ,
|
||||
39 : "RIGHT ARROW" ,
|
||||
40 : "DOWN ARROW" ,
|
||||
45 : "INSERT" ,
|
||||
46 : "DELETE" ,
|
||||
91 : "LEFT WINDOW KEY" ,
|
||||
92 : "RIGHT WINDOW KEY" ,
|
||||
93 : "SELECT KEY" ,
|
||||
96 : "NUMPAD 0" ,
|
||||
97 : "NUMPAD 1" ,
|
||||
98 : "NUMPAD 2" ,
|
||||
99 : "NUMPAD 3" ,
|
||||
100 : "NUMPAD 4" ,
|
||||
101 : "NUMPAD 5" ,
|
||||
102 : "NUMPAD 6" ,
|
||||
103 : "NUMPAD 7" ,
|
||||
104 : "NUMPAD 8" ,
|
||||
105 : "NUMPAD 9" ,
|
||||
106 : "MULTIPLY" ,
|
||||
107 : "ADD" ,
|
||||
109 : "SUBTRACT" ,
|
||||
110 : "DECIMAL POINT" ,
|
||||
111 : "DIVIDE" ,
|
||||
112 : "F1" ,
|
||||
113 : "F2" ,
|
||||
114 : "F3" ,
|
||||
115 : "F4" ,
|
||||
116 : "F5" ,
|
||||
117 : "F6" ,
|
||||
118 : "F7" ,
|
||||
119 : "F8" ,
|
||||
120 : "F9" ,
|
||||
121 : "F10" ,
|
||||
122 : "F11" ,
|
||||
123 : "F12" ,
|
||||
144 : "NUM LOCK" ,
|
||||
145 : "SCROLL LOCK" ,
|
||||
186 : "SEMI-COLON" ,
|
||||
187 : "EQUAL SIGN" ,
|
||||
188 : "COMMA" ,
|
||||
189 : "DASH" ,
|
||||
190 : "PERIOD" ,
|
||||
191 : "FORWARD SLASH" ,
|
||||
192 : "GRAVE ACCENT" ,
|
||||
219 : "OPEN BRACKET" ,
|
||||
220 : "BACK SLASH" ,
|
||||
221 : "CLOSE BRAKET" ,
|
||||
222 : "SINGLE QUOTE"
|
||||
};
|
||||
|
||||
// Modifier keys override.
|
||||
keyMap[ CKEDITOR.ALT ] = 'ALT';
|
||||
keyMap[ CKEDITOR.SHIFT ] = 'SHIFT';
|
||||
keyMap[ CKEDITOR.CTRL ] = 'CTRL';
|
||||
|
||||
// Sort in desc.
|
||||
var modifiers = [ CKEDITOR.ALT, CKEDITOR.SHIFT, CKEDITOR.CTRL ];
|
||||
|
||||
function representKeyStroke( keystroke )
|
||||
{
|
||||
var quotient,
|
||||
modifier,
|
||||
presentation = [];
|
||||
|
||||
for ( var i = 0; i < modifiers.length; i++ )
|
||||
{
|
||||
modifier = modifiers[ i ];
|
||||
quotient = keystroke / modifiers[ i ];
|
||||
if ( quotient > 1 && quotient <= 2 )
|
||||
{
|
||||
keystroke -= modifier;
|
||||
presentation.push( keyMap[ modifier ] );
|
||||
}
|
||||
}
|
||||
|
||||
presentation.push( keyMap[ keystroke ]
|
||||
|| String.fromCharCode( keystroke ) );
|
||||
|
||||
return presentation.join( '+' );
|
||||
}
|
||||
|
||||
var variablesPattern = /\$\{(.*?)\}/g;
|
||||
function replaceVariables( match, name )
|
||||
{
|
||||
var keystrokes = editor.config.keystrokes,
|
||||
definition,
|
||||
length = keystrokes.length;
|
||||
|
||||
for ( var i = 0; i < length; i++ )
|
||||
{
|
||||
definition = keystrokes[ i ];
|
||||
if ( definition[ 1 ] == name )
|
||||
break;
|
||||
}
|
||||
return representKeyStroke( definition[ 0 ] );
|
||||
}
|
||||
|
||||
// Create the help list directly from lang file entries.
|
||||
function buildHelpContents()
|
||||
{
|
||||
var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + id + '_arialbl" tabIndex="-1">%1</div>' +
|
||||
'<span id="' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
|
||||
sectionTpl = '<h1>%1</h1><dl>%2</dl>',
|
||||
itemTpl = '<dt>%1</dt><dd>%2</dd>';
|
||||
|
||||
var pageHtml = [],
|
||||
sections = lang.legend,
|
||||
sectionLength = sections.length;
|
||||
|
||||
for ( var i = 0; i < sectionLength; i++ )
|
||||
{
|
||||
var section = sections[ i ],
|
||||
sectionHtml = [],
|
||||
items = section.items,
|
||||
itemsLength = items.length;
|
||||
|
||||
for ( var j = 0; j < itemsLength; j++ )
|
||||
{
|
||||
var item = items[ j ],
|
||||
itemHtml;
|
||||
itemHtml = itemTpl.replace( '%1', item.name ).
|
||||
replace( '%2', item.legend.replace( variablesPattern, replaceVariables ) );
|
||||
sectionHtml.push( itemHtml );
|
||||
}
|
||||
|
||||
pageHtml.push( sectionTpl.replace( '%1', section.name ).replace( '%2', sectionHtml.join( '' ) ) );
|
||||
}
|
||||
|
||||
return pageTpl.replace( '%1', pageHtml.join( '' ) );
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minWidth : 600,
|
||||
minHeight : 400,
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.common.generalTab,
|
||||
expand : true,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
id : 'legends',
|
||||
style : 'white-space:normal;',
|
||||
focus : function() {},
|
||||
html : buildHelpContents() +
|
||||
'<style type="text/css">' +
|
||||
'.cke_accessibility_legend' +
|
||||
'{' +
|
||||
'width:600px;' +
|
||||
'height:400px;' +
|
||||
'padding-right:5px;' +
|
||||
'overflow-y:auto;' +
|
||||
'overflow-x:hidden;' +
|
||||
'}' +
|
||||
// Some adjustments are to be done for IE6 and Quirks to work "properly" (#5757)
|
||||
'.cke_browser_quirks .cke_accessibility_legend,' +
|
||||
'.cke_browser_ie6 .cke_accessibility_legend' +
|
||||
'{' +
|
||||
'height:390px' +
|
||||
'}' +
|
||||
// Override non-wrapping white-space rule in reset css.
|
||||
'.cke_accessibility_legend *' +
|
||||
'{' +
|
||||
'white-space:normal;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend h1' +
|
||||
'{' +
|
||||
'font-size: 20px;' +
|
||||
'border-bottom: 1px solid #AAA;' +
|
||||
'margin: 5px 0px 15px;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dl' +
|
||||
'{' +
|
||||
'margin-left: 5px;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dt' +
|
||||
'{' +
|
||||
'font-size: 13px;' +
|
||||
'font-weight: bold;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dd' +
|
||||
'{' +
|
||||
'margin:10px' +
|
||||
'}' +
|
||||
'</style>'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'a11yHelp', function( editor )
|
||||
{
|
||||
var lang = editor.lang.accessibilityHelp,
|
||||
id = CKEDITOR.tools.getNextId();
|
||||
|
||||
// CharCode <-> KeyChar.
|
||||
var keyMap =
|
||||
{
|
||||
8 : "BACKSPACE",
|
||||
9 : "TAB" ,
|
||||
13 : "ENTER" ,
|
||||
16 : "SHIFT" ,
|
||||
17 : "CTRL" ,
|
||||
18 : "ALT" ,
|
||||
19 : "PAUSE" ,
|
||||
20 : "CAPSLOCK" ,
|
||||
27 : "ESCAPE" ,
|
||||
33 : "PAGE UP" ,
|
||||
34 : "PAGE DOWN" ,
|
||||
35 : "END" ,
|
||||
36 : "HOME" ,
|
||||
37 : "LEFT ARROW" ,
|
||||
38 : "UP ARROW" ,
|
||||
39 : "RIGHT ARROW" ,
|
||||
40 : "DOWN ARROW" ,
|
||||
45 : "INSERT" ,
|
||||
46 : "DELETE" ,
|
||||
91 : "LEFT WINDOW KEY" ,
|
||||
92 : "RIGHT WINDOW KEY" ,
|
||||
93 : "SELECT KEY" ,
|
||||
96 : "NUMPAD 0" ,
|
||||
97 : "NUMPAD 1" ,
|
||||
98 : "NUMPAD 2" ,
|
||||
99 : "NUMPAD 3" ,
|
||||
100 : "NUMPAD 4" ,
|
||||
101 : "NUMPAD 5" ,
|
||||
102 : "NUMPAD 6" ,
|
||||
103 : "NUMPAD 7" ,
|
||||
104 : "NUMPAD 8" ,
|
||||
105 : "NUMPAD 9" ,
|
||||
106 : "MULTIPLY" ,
|
||||
107 : "ADD" ,
|
||||
109 : "SUBTRACT" ,
|
||||
110 : "DECIMAL POINT" ,
|
||||
111 : "DIVIDE" ,
|
||||
112 : "F1" ,
|
||||
113 : "F2" ,
|
||||
114 : "F3" ,
|
||||
115 : "F4" ,
|
||||
116 : "F5" ,
|
||||
117 : "F6" ,
|
||||
118 : "F7" ,
|
||||
119 : "F8" ,
|
||||
120 : "F9" ,
|
||||
121 : "F10" ,
|
||||
122 : "F11" ,
|
||||
123 : "F12" ,
|
||||
144 : "NUM LOCK" ,
|
||||
145 : "SCROLL LOCK" ,
|
||||
186 : "SEMI-COLON" ,
|
||||
187 : "EQUAL SIGN" ,
|
||||
188 : "COMMA" ,
|
||||
189 : "DASH" ,
|
||||
190 : "PERIOD" ,
|
||||
191 : "FORWARD SLASH" ,
|
||||
192 : "GRAVE ACCENT" ,
|
||||
219 : "OPEN BRACKET" ,
|
||||
220 : "BACK SLASH" ,
|
||||
221 : "CLOSE BRAKET" ,
|
||||
222 : "SINGLE QUOTE"
|
||||
};
|
||||
|
||||
// Modifier keys override.
|
||||
keyMap[ CKEDITOR.ALT ] = 'ALT';
|
||||
keyMap[ CKEDITOR.SHIFT ] = 'SHIFT';
|
||||
keyMap[ CKEDITOR.CTRL ] = 'CTRL';
|
||||
|
||||
// Sort in desc.
|
||||
var modifiers = [ CKEDITOR.ALT, CKEDITOR.SHIFT, CKEDITOR.CTRL ];
|
||||
|
||||
function representKeyStroke( keystroke )
|
||||
{
|
||||
var quotient,
|
||||
modifier,
|
||||
presentation = [];
|
||||
|
||||
for ( var i = 0; i < modifiers.length; i++ )
|
||||
{
|
||||
modifier = modifiers[ i ];
|
||||
quotient = keystroke / modifiers[ i ];
|
||||
if ( quotient > 1 && quotient <= 2 )
|
||||
{
|
||||
keystroke -= modifier;
|
||||
presentation.push( keyMap[ modifier ] );
|
||||
}
|
||||
}
|
||||
|
||||
presentation.push( keyMap[ keystroke ]
|
||||
|| String.fromCharCode( keystroke ) );
|
||||
|
||||
return presentation.join( '+' );
|
||||
}
|
||||
|
||||
var variablesPattern = /\$\{(.*?)\}/g;
|
||||
function replaceVariables( match, name )
|
||||
{
|
||||
var keystrokes = editor.config.keystrokes,
|
||||
definition,
|
||||
length = keystrokes.length;
|
||||
|
||||
for ( var i = 0; i < length; i++ )
|
||||
{
|
||||
definition = keystrokes[ i ];
|
||||
if ( definition[ 1 ] == name )
|
||||
break;
|
||||
}
|
||||
return representKeyStroke( definition[ 0 ] );
|
||||
}
|
||||
|
||||
// Create the help list directly from lang file entries.
|
||||
function buildHelpContents()
|
||||
{
|
||||
var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + id + '_arialbl" tabIndex="-1">%1</div>' +
|
||||
'<span id="' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
|
||||
sectionTpl = '<h1>%1</h1><dl>%2</dl>',
|
||||
itemTpl = '<dt>%1</dt><dd>%2</dd>';
|
||||
|
||||
var pageHtml = [],
|
||||
sections = lang.legend,
|
||||
sectionLength = sections.length;
|
||||
|
||||
for ( var i = 0; i < sectionLength; i++ )
|
||||
{
|
||||
var section = sections[ i ],
|
||||
sectionHtml = [],
|
||||
items = section.items,
|
||||
itemsLength = items.length;
|
||||
|
||||
for ( var j = 0; j < itemsLength; j++ )
|
||||
{
|
||||
var item = items[ j ],
|
||||
itemHtml;
|
||||
itemHtml = itemTpl.replace( '%1', item.name ).
|
||||
replace( '%2', item.legend.replace( variablesPattern, replaceVariables ) );
|
||||
sectionHtml.push( itemHtml );
|
||||
}
|
||||
|
||||
pageHtml.push( sectionTpl.replace( '%1', section.name ).replace( '%2', sectionHtml.join( '' ) ) );
|
||||
}
|
||||
|
||||
return pageTpl.replace( '%1', pageHtml.join( '' ) );
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minWidth : 600,
|
||||
minHeight : 400,
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.common.generalTab,
|
||||
expand : true,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
id : 'legends',
|
||||
style : 'white-space:normal;',
|
||||
focus : function() {},
|
||||
html : buildHelpContents() +
|
||||
'<style type="text/css">' +
|
||||
'.cke_accessibility_legend' +
|
||||
'{' +
|
||||
'width:600px;' +
|
||||
'height:400px;' +
|
||||
'padding-right:5px;' +
|
||||
'overflow-y:auto;' +
|
||||
'overflow-x:hidden;' +
|
||||
'}' +
|
||||
// Some adjustments are to be done for IE6 and Quirks to work "properly" (#5757)
|
||||
'.cke_browser_quirks .cke_accessibility_legend,' +
|
||||
'.cke_browser_ie6 .cke_accessibility_legend' +
|
||||
'{' +
|
||||
'height:390px' +
|
||||
'}' +
|
||||
// Override non-wrapping white-space rule in reset css.
|
||||
'.cke_accessibility_legend *' +
|
||||
'{' +
|
||||
'white-space:normal;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend h1' +
|
||||
'{' +
|
||||
'font-size: 20px;' +
|
||||
'border-bottom: 1px solid #AAA;' +
|
||||
'margin: 5px 0px 15px;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dl' +
|
||||
'{' +
|
||||
'margin-left: 5px;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dt' +
|
||||
'{' +
|
||||
'font-size: 13px;' +
|
||||
'font-weight: bold;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dd' +
|
||||
'{' +
|
||||
'margin:10px' +
|
||||
'}' +
|
||||
'</style>'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ]
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 30 Missing: 0
|
||||
cy.js Found: 30 Missing: 0
|
||||
da.js Found: 12 Missing: 18
|
||||
de.js Found: 30 Missing: 0
|
||||
el.js Found: 25 Missing: 5
|
||||
eo.js Found: 30 Missing: 0
|
||||
fa.js Found: 30 Missing: 0
|
||||
fi.js Found: 30 Missing: 0
|
||||
fr.js Found: 30 Missing: 0
|
||||
gu.js Found: 12 Missing: 18
|
||||
he.js Found: 30 Missing: 0
|
||||
it.js Found: 30 Missing: 0
|
||||
mk.js Found: 5 Missing: 25
|
||||
nb.js Found: 30 Missing: 0
|
||||
nl.js Found: 30 Missing: 0
|
||||
no.js Found: 30 Missing: 0
|
||||
pt-br.js Found: 30 Missing: 0
|
||||
ro.js Found: 6 Missing: 24
|
||||
tr.js Found: 30 Missing: 0
|
||||
ug.js Found: 27 Missing: 3
|
||||
vi.js Found: 6 Missing: 24
|
||||
zh-cn.js Found: 30 Missing: 0
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 30 Missing: 0
|
||||
cy.js Found: 30 Missing: 0
|
||||
da.js Found: 12 Missing: 18
|
||||
de.js Found: 30 Missing: 0
|
||||
el.js Found: 25 Missing: 5
|
||||
eo.js Found: 30 Missing: 0
|
||||
fa.js Found: 30 Missing: 0
|
||||
fi.js Found: 30 Missing: 0
|
||||
fr.js Found: 30 Missing: 0
|
||||
gu.js Found: 12 Missing: 18
|
||||
he.js Found: 30 Missing: 0
|
||||
it.js Found: 30 Missing: 0
|
||||
mk.js Found: 5 Missing: 25
|
||||
nb.js Found: 30 Missing: 0
|
||||
nl.js Found: 30 Missing: 0
|
||||
no.js Found: 30 Missing: 0
|
||||
pt-br.js Found: 30 Missing: 0
|
||||
ro.js Found: 6 Missing: 24
|
||||
tr.js Found: 30 Missing: 0
|
||||
ug.js Found: 27 Missing: 3
|
||||
vi.js Found: 6 Missing: 24
|
||||
zh-cn.js Found: 30 Missing: 0
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'cs',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instrukce pro přístupnost',
|
||||
contents : 'Obsah nápovědy. Pro uzavření tohoto dialogu stiskněte klávesu ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Obecné',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Panel nástrojů editoru',
|
||||
legend:
|
||||
'Stiskněte${toolbarFocus} k procházení panelu nástrojů. Přejděte na další a předchozí skupiny pomocí TAB a SHIFT-TAB. Přechod na další a předchozí tlačítko panelu nástrojů je pomocí ŠIPKA VPRAVO nebo ŠIPKA VLEVO. Stisknutím mezerníku nebo klávesy ENTER tlačítko aktivujete.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialogové okno editoru',
|
||||
legend :
|
||||
'Uvnitř dialogového okna stiskněte TAB pro přesunutí na další pole, stiskněte SHIFT + TAB pro přesun na předchozí pole, stiskněte ENTER pro odeslání dialogu, stiskněte ESC pro jeho zrušení. Pro dialogová okna, která mají mnoho karet stiskněte ALT + F10 pr oprocházení seznamu karet. Pak se přesuňte na další kartu pomocí TAB nebo ŠIPKA VPRAVO. Pro přesun na předchozí stiskněte SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání stránky karet.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kontextové menu editoru',
|
||||
legend :
|
||||
'Stiskněte ${contextMenu} nebo klávesu APPLICATION k otevření kontextového menu. Pak se přesuňte na další možnost menu pomocí TAB nebo ŠIPKY DOLŮ. Přesuňte se na předchozí možnost pomocí SHIFT+TAB nebo ŠIPKY NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti menu. Podmenu současné možnosti otevřete pomocí MEZERNÍKU nebo ENTER či ŠIPKY DOLEVA. Kontextové menu uzavřete stiskem ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Rámeček seznamu editoru',
|
||||
legend :
|
||||
'Uvnitř rámečku seznamu se přesunete na další položku menu pomocí TAB nebo ŠIPKA DOLŮ. Na předchozí položku se přesunete SHIFT + TAB nebo ŠIPKA NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti seznamu. Stiskněte ESC pro uzavření seznamu.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Lišta cesty prvku v editoru',
|
||||
legend :
|
||||
'Stiskněte ${elementsPathFocus} pro procházení lišty cesty prvku. Na další tlačítko prvku se přesunete pomocí TAB nebo ŠIPKA VPRAVO. Na předchozí položku se přesunete pomocí SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání prvku v editoru.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Příkazy',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Příkaz Zpět',
|
||||
legend : 'Stiskněte ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Znovu',
|
||||
legend : 'Stiskněte ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Tučné',
|
||||
legend : 'Stiskněte ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Kurzíva',
|
||||
legend : 'Stiskněte ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Podtržení',
|
||||
legend : 'Stiskněte ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Odkaz',
|
||||
legend : 'Stiskněte ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Skrýt panel nástrojů',
|
||||
legend : 'Stiskněte ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Nápověda přístupnosti',
|
||||
legend : 'Stiskněte ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'cs',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instrukce pro přístupnost',
|
||||
contents : 'Obsah nápovědy. Pro uzavření tohoto dialogu stiskněte klávesu ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Obecné',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Panel nástrojů editoru',
|
||||
legend:
|
||||
'Stiskněte${toolbarFocus} k procházení panelu nástrojů. Přejděte na další a předchozí skupiny pomocí TAB a SHIFT-TAB. Přechod na další a předchozí tlačítko panelu nástrojů je pomocí ŠIPKA VPRAVO nebo ŠIPKA VLEVO. Stisknutím mezerníku nebo klávesy ENTER tlačítko aktivujete.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialogové okno editoru',
|
||||
legend :
|
||||
'Uvnitř dialogového okna stiskněte TAB pro přesunutí na další pole, stiskněte SHIFT + TAB pro přesun na předchozí pole, stiskněte ENTER pro odeslání dialogu, stiskněte ESC pro jeho zrušení. Pro dialogová okna, která mají mnoho karet stiskněte ALT + F10 pr oprocházení seznamu karet. Pak se přesuňte na další kartu pomocí TAB nebo ŠIPKA VPRAVO. Pro přesun na předchozí stiskněte SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání stránky karet.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kontextové menu editoru',
|
||||
legend :
|
||||
'Stiskněte ${contextMenu} nebo klávesu APPLICATION k otevření kontextového menu. Pak se přesuňte na další možnost menu pomocí TAB nebo ŠIPKY DOLŮ. Přesuňte se na předchozí možnost pomocí SHIFT+TAB nebo ŠIPKY NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti menu. Podmenu současné možnosti otevřete pomocí MEZERNÍKU nebo ENTER či ŠIPKY DOLEVA. Kontextové menu uzavřete stiskem ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Rámeček seznamu editoru',
|
||||
legend :
|
||||
'Uvnitř rámečku seznamu se přesunete na další položku menu pomocí TAB nebo ŠIPKA DOLŮ. Na předchozí položku se přesunete SHIFT + TAB nebo ŠIPKA NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti seznamu. Stiskněte ESC pro uzavření seznamu.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Lišta cesty prvku v editoru',
|
||||
legend :
|
||||
'Stiskněte ${elementsPathFocus} pro procházení lišty cesty prvku. Na další tlačítko prvku se přesunete pomocí TAB nebo ŠIPKA VPRAVO. Na předchozí položku se přesunete pomocí SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání prvku v editoru.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Příkazy',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Příkaz Zpět',
|
||||
legend : 'Stiskněte ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Znovu',
|
||||
legend : 'Stiskněte ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Tučné',
|
||||
legend : 'Stiskněte ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Kurzíva',
|
||||
legend : 'Stiskněte ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Podtržení',
|
||||
legend : 'Stiskněte ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Odkaz',
|
||||
legend : 'Stiskněte ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Příkaz Skrýt panel nástrojů',
|
||||
legend : 'Stiskněte ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Nápověda přístupnosti',
|
||||
legend : 'Stiskněte ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'cy',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Canllawiau Hygyrchedd',
|
||||
contents : 'Cynnwys Cymorth. I gau y deialog hwn, pwyswch ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Cyffredinol',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Bar Offer y Golygydd',
|
||||
legend:
|
||||
'Pwyswch $ {toolbarFocus} i fynd at y bar offer. Symudwch i\'r grŵp bar offer nesaf a blaenorol gyda TAB a SHIFT-TAB. Symudwch i\'r botwm bar offer nesaf a blaenorol gyda SAETH DDE neu SAETH CHWITH. Pwyswch SPACE neu ENTER i wneud botwm y bar offer yn weithredol.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Deialog y Golygydd',
|
||||
legend :
|
||||
'Tu mewn i\'r deialog, pwyswch TAB i fynd i\'r maes nesaf ar y deialog, pwyswch SHIFT + TAB i symud i faes blaenorol, pwyswch ENTER i gyflwyno\'r deialog, pwyswch ESC i ddiddymu\'r deialog. Ar gyfer deialogau sydd â thudalennau aml-tab, pwyswch ALT + F10 i lywio\'r tab-restr. Yna symudwch i\'r tab nesaf gyda TAB neu SAETH DDE. Symudwch i dab blaenorol gyda SHIFT + TAB neu\'r SAETH CHWITH. Pwyswch SPACE neu ENTER i ddewis y dudalen tab.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dewislen Cyd-destun y Golygydd',
|
||||
legend :
|
||||
'Pwyswch $ {contextMenu} neu\'r ALLWEDD \'APPLICATION\' i agor y ddewislen cyd-destun. Yna symudwch i\'r opsiwn ddewislen nesaf gyda\'r TAB neu\'r SAETH I LAWR. Symudwch i\'r opsiwn blaenorol gyda SHIFT + TAB neu\'r SAETH I FYNY. Pwyswch SPACE neu ENTER i ddewis yr opsiwn ddewislen. Agorwch is-dewislen yr opsiwn cyfredol gyda SPACE neu ENTER neu SAETH DDE. Ewch yn ôl i\'r eitem ar y ddewislen uwch gydag ESC neu SAETH CHWITH. Ceuwch y ddewislen cyd-destun gydag ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Blwch Rhestr y Golygydd',
|
||||
legend :
|
||||
'Tu mewn rhestr-bocs, ewch i\'r eitem rhestr nesaf gyda TAB neu\'r SAETH I LAWR. Symudwch i restr eitem flaenorol gyda SHIFT + TAB neu SAETH I FYNY. Pwyswch SPACE neu ENTER i ddewis yr opsiwn o\'r rhestr. Pwyswch ESC i gau\'r rhestr.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Bar Llwybr Elfen y Golygydd',
|
||||
legend :
|
||||
'Pwyswch $ {elementsPathFocus} i fynd i\'r elfennau llwybr bar. Symudwch i fotwm yr elfen nesaf gyda TAB neu SAETH DDE. Symudwch i fotwm blaenorol gyda SHIFT + TAB neu SAETH CHWITH. Pwyswch SPACE neu ENTER i ddewis yr elfen yn y golygydd.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Gorchmynion',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Gorchymyn dadwneud',
|
||||
legend : 'Pwyswch ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn ailadrodd',
|
||||
legend : 'Pwyswch ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn Bras',
|
||||
legend : 'Pwyswch ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn italig',
|
||||
legend : 'Pwyswch ${italig}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn tanlinellu',
|
||||
legend : 'Pwyso ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn dolen',
|
||||
legend : 'Pwyswch ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn Cwympo\'r Dewislen',
|
||||
legend : 'Pwyswch ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Cymorth Hygyrchedd',
|
||||
legend : 'Pwyswch ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'cy',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Canllawiau Hygyrchedd',
|
||||
contents : 'Cynnwys Cymorth. I gau y deialog hwn, pwyswch ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Cyffredinol',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Bar Offer y Golygydd',
|
||||
legend:
|
||||
'Pwyswch $ {toolbarFocus} i fynd at y bar offer. Symudwch i\'r grŵp bar offer nesaf a blaenorol gyda TAB a SHIFT-TAB. Symudwch i\'r botwm bar offer nesaf a blaenorol gyda SAETH DDE neu SAETH CHWITH. Pwyswch SPACE neu ENTER i wneud botwm y bar offer yn weithredol.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Deialog y Golygydd',
|
||||
legend :
|
||||
'Tu mewn i\'r deialog, pwyswch TAB i fynd i\'r maes nesaf ar y deialog, pwyswch SHIFT + TAB i symud i faes blaenorol, pwyswch ENTER i gyflwyno\'r deialog, pwyswch ESC i ddiddymu\'r deialog. Ar gyfer deialogau sydd â thudalennau aml-tab, pwyswch ALT + F10 i lywio\'r tab-restr. Yna symudwch i\'r tab nesaf gyda TAB neu SAETH DDE. Symudwch i dab blaenorol gyda SHIFT + TAB neu\'r SAETH CHWITH. Pwyswch SPACE neu ENTER i ddewis y dudalen tab.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dewislen Cyd-destun y Golygydd',
|
||||
legend :
|
||||
'Pwyswch $ {contextMenu} neu\'r ALLWEDD \'APPLICATION\' i agor y ddewislen cyd-destun. Yna symudwch i\'r opsiwn ddewislen nesaf gyda\'r TAB neu\'r SAETH I LAWR. Symudwch i\'r opsiwn blaenorol gyda SHIFT + TAB neu\'r SAETH I FYNY. Pwyswch SPACE neu ENTER i ddewis yr opsiwn ddewislen. Agorwch is-dewislen yr opsiwn cyfredol gyda SPACE neu ENTER neu SAETH DDE. Ewch yn ôl i\'r eitem ar y ddewislen uwch gydag ESC neu SAETH CHWITH. Ceuwch y ddewislen cyd-destun gydag ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Blwch Rhestr y Golygydd',
|
||||
legend :
|
||||
'Tu mewn rhestr-bocs, ewch i\'r eitem rhestr nesaf gyda TAB neu\'r SAETH I LAWR. Symudwch i restr eitem flaenorol gyda SHIFT + TAB neu SAETH I FYNY. Pwyswch SPACE neu ENTER i ddewis yr opsiwn o\'r rhestr. Pwyswch ESC i gau\'r rhestr.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Bar Llwybr Elfen y Golygydd',
|
||||
legend :
|
||||
'Pwyswch $ {elementsPathFocus} i fynd i\'r elfennau llwybr bar. Symudwch i fotwm yr elfen nesaf gyda TAB neu SAETH DDE. Symudwch i fotwm blaenorol gyda SHIFT + TAB neu SAETH CHWITH. Pwyswch SPACE neu ENTER i ddewis yr elfen yn y golygydd.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Gorchmynion',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Gorchymyn dadwneud',
|
||||
legend : 'Pwyswch ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn ailadrodd',
|
||||
legend : 'Pwyswch ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn Bras',
|
||||
legend : 'Pwyswch ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn italig',
|
||||
legend : 'Pwyswch ${italig}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn tanlinellu',
|
||||
legend : 'Pwyso ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn dolen',
|
||||
legend : 'Pwyswch ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Gorchymyn Cwympo\'r Dewislen',
|
||||
legend : 'Pwyswch ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Cymorth Hygyrchedd',
|
||||
legend : 'Pwyswch ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'da',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Tilgængelighedsinstrukser',
|
||||
contents : 'Help Contents. To close this dialog press ESC.', // MISSING
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generelt',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor værktøjslinje',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog', // MISSING
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu', // MISSING
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Kommandoer',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Fortryd kommando',
|
||||
legend : 'Klik på ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gentag kommando',
|
||||
legend : 'Klik ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Klik ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Klik ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Klik ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Kilk ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'da',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Tilgængelighedsinstrukser',
|
||||
contents : 'Help Contents. To close this dialog press ESC.', // MISSING
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generelt',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor værktøjslinje',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog', // MISSING
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu', // MISSING
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Kommandoer',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Fortryd kommando',
|
||||
legend : 'Klik på ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gentag kommando',
|
||||
legend : 'Klik ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Klik ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Klik ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Klik ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Kilk ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'de',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Barrierefreiheitinformationen',
|
||||
contents : 'Hilfeinhalt. Um den Dialog zu schliessen die Taste \'ESC\' drücken.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Allgemein',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor Symbolleiste',
|
||||
legend:
|
||||
'Drücken Sie ${toolbarFocus} auf der Symbolleiste. Gehen Sie zur nächsten oder vorherigen Symbolleistengruppe mit TAB und SHIFT-TAB. Gehen Sie zur nächsten oder vorherigen Symbolleiste auf die Schaltfläche mit dem RECHTS- oder LINKS-Pfeil. Drücken Sie die Leertaste oder Eingabetaste, um die Schaltfläche in der Symbolleiste aktivieren.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog',
|
||||
legend :
|
||||
'Innerhalb des Dialogs drücken Sie TAB um zum nächsten Dialogfeld zu gelangen, drücken Sie SHIFT-TAG um zum vorherigen Feld zu wechseln, drücken Sie ENTER um den Dialog abzusenden und ESC um den Dialog zu abzubrechen. Um zwischen den Reitern innerhalb eines Dialogs zu wechseln drücken sie ALT-F10. Um zum nächsten Reiter zu gelangen können Sie TAB oder die rechte Pfeiltaste. Zurück gelangt man mit SHIFT-TAB oder der linken Pfeiltaste. Mit der Leertaste oder Enter kann man den Reiter auswählen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Kontextmenü',
|
||||
legend :
|
||||
'Dürcken Sie ${contextMenu} oder die Anwendungstaste um das Kontextmenü zu öffnen. Man kann die Pfeiltasten zum Wechsel benutzen. Mit der Leertaste oder der Enter-Taste kann man den Menüpunkt aufrufen. Schliessen Sie das Kontextmenü mit der ESC-Taste.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Listen',
|
||||
legend :
|
||||
'Innerhalb einer Listenbox kann man mit der TAB-Taste oder den Pfeilrunter-Taste den nächsten Menüeintrag wählen. Mit der Shift-TAB Tastenkombination oder der Pfeilhoch-Taste gelangt man zum vorherigen Menüpunkt. Mit der Leertaste oder Enter kann man den Menüpunkt auswählen. Drücken Sie ESC zum Verlassen des Menüs.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Elementpfadleiste',
|
||||
legend :
|
||||
'Drücken Sie ${elementsPathFocus} um sich durch die Pfadleiste zu bewegen. Um zum nächsten Element zu gelangen drücken Sie TAB oder die Pfeilrechts-Taste. Zum vorherigen Element gelangen Sie mit der SHIFT-TAB oder der Pfeillinks-Taste. Drücken Sie die Leertaste oder Enter um das Element auszuwählen.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Befehle',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Wiederholen Befehl',
|
||||
legend : 'Drücken Sie ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Rückgängig Befehl',
|
||||
legend : 'Drücken Sie ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Fettschrift Befehl',
|
||||
legend : 'Drücken Sie ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Italic Befehl',
|
||||
legend : 'Drücken Sie ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Unterstreichung Befehl',
|
||||
legend : 'Drücken Sie ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link Befehl',
|
||||
legend : 'Drücken Sie ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Symbolleiste zuammenklappen Befehl',
|
||||
legend : 'Drücken Sie ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Eingabehilfen',
|
||||
legend : 'Drücken Sie ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'de',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Barrierefreiheitinformationen',
|
||||
contents : 'Hilfeinhalt. Um den Dialog zu schliessen die Taste \'ESC\' drücken.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Allgemein',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor Symbolleiste',
|
||||
legend:
|
||||
'Drücken Sie ${toolbarFocus} auf der Symbolleiste. Gehen Sie zur nächsten oder vorherigen Symbolleistengruppe mit TAB und SHIFT-TAB. Gehen Sie zur nächsten oder vorherigen Symbolleiste auf die Schaltfläche mit dem RECHTS- oder LINKS-Pfeil. Drücken Sie die Leertaste oder Eingabetaste, um die Schaltfläche in der Symbolleiste aktivieren.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog',
|
||||
legend :
|
||||
'Innerhalb des Dialogs drücken Sie TAB um zum nächsten Dialogfeld zu gelangen, drücken Sie SHIFT-TAG um zum vorherigen Feld zu wechseln, drücken Sie ENTER um den Dialog abzusenden und ESC um den Dialog zu abzubrechen. Um zwischen den Reitern innerhalb eines Dialogs zu wechseln drücken sie ALT-F10. Um zum nächsten Reiter zu gelangen können Sie TAB oder die rechte Pfeiltaste. Zurück gelangt man mit SHIFT-TAB oder der linken Pfeiltaste. Mit der Leertaste oder Enter kann man den Reiter auswählen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Kontextmenü',
|
||||
legend :
|
||||
'Dürcken Sie ${contextMenu} oder die Anwendungstaste um das Kontextmenü zu öffnen. Man kann die Pfeiltasten zum Wechsel benutzen. Mit der Leertaste oder der Enter-Taste kann man den Menüpunkt aufrufen. Schliessen Sie das Kontextmenü mit der ESC-Taste.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Listen',
|
||||
legend :
|
||||
'Innerhalb einer Listenbox kann man mit der TAB-Taste oder den Pfeilrunter-Taste den nächsten Menüeintrag wählen. Mit der Shift-TAB Tastenkombination oder der Pfeilhoch-Taste gelangt man zum vorherigen Menüpunkt. Mit der Leertaste oder Enter kann man den Menüpunkt auswählen. Drücken Sie ESC zum Verlassen des Menüs.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Elementpfadleiste',
|
||||
legend :
|
||||
'Drücken Sie ${elementsPathFocus} um sich durch die Pfadleiste zu bewegen. Um zum nächsten Element zu gelangen drücken Sie TAB oder die Pfeilrechts-Taste. Zum vorherigen Element gelangen Sie mit der SHIFT-TAB oder der Pfeillinks-Taste. Drücken Sie die Leertaste oder Enter um das Element auszuwählen.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Befehle',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Wiederholen Befehl',
|
||||
legend : 'Drücken Sie ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Rückgängig Befehl',
|
||||
legend : 'Drücken Sie ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Fettschrift Befehl',
|
||||
legend : 'Drücken Sie ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Italic Befehl',
|
||||
legend : 'Drücken Sie ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Unterstreichung Befehl',
|
||||
legend : 'Drücken Sie ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link Befehl',
|
||||
legend : 'Drücken Sie ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Symbolleiste zuammenklappen Befehl',
|
||||
legend : 'Drücken Sie ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Eingabehilfen',
|
||||
legend : 'Drücken Sie ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'el',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Οδηγίες Προσβασιμότητας',
|
||||
contents : 'Περιεχόμενα Βοήθειας. Πατήστε ESC για κλείσιμο.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Γενικά',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Εργαλειοθήκη Επεξεργαστή',
|
||||
legend:
|
||||
'Πατήστε ${toolbarFocus} για να περιηγηθείτε στην γραμμή εργαλείων. Μετακινηθείτε ανάμεσα στις ομάδες της γραμμής εργαλείων με TAB και Shift-TAB. Μετακινηθείτε ανάμεσα στα κουμπία εργαλείων με ΔΕΞΙ και ΑΡΙΣΤΕΡΟ ΒΕΛΑΚΙ. Πατήστε ΚΕΝΟ ή ENTER για να ενεργοποιήσετε το ενεργό κουμπί εργαλείου.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Παράθυρο Διαλόγου Επεξεργαστή',
|
||||
legend :
|
||||
'Μέσα σε ένα παράθυρο διαλόγου, πατήστε TAB για να μεταβείτε στο επόμενο πεδίο ή SHIFT + TAB για να μεταβείτε στο προηγούμενο. Πατήστε ENTER για να υποβάλετε την φόρμα. Πατήστε ESC για να ακυρώσετε την διαδικασία της φόρμας. Για παράθυρα διαλόγων που έχουν πολλές σελίδες σε καρτέλες πατήστε ALT + F10 για να μεταβείτε στην λίστα των καρτέλων. Στην συνέχεια μπορείτε να μεταβείτε στην επόμενη καρτέλα πατώντας TAB ή RIGHT ARROW. Μπορείτε να μεταβείτε στην προηγούμενη καρτέλα πατώντας SHIFT + TAB ή LEFT ARROW. Πατήστε SPACE ή ENTER για να επιλέξετε την καρτέλα για προβολή.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Αναδυόμενο Μενού Επεξεργαστή',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Εντολές',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Εντολή αναίρεσης',
|
||||
legend : 'Πατήστε ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή επανάληψης',
|
||||
legend : 'Πατήστε ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή έντονης γραφής',
|
||||
legend : 'Πατήστε ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή πλάγιας γραφής',
|
||||
legend : 'Πατήστε ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή υπογράμμισης',
|
||||
legend : 'Πατήστε ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή συνδέσμου',
|
||||
legend : 'Πατήστε ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή Σύμπτηξης Εργαλειοθήκης',
|
||||
legend : 'Πατήστε ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Βοήθεια Προσβασιμότητας',
|
||||
legend : 'Πατήστε ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'el',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Οδηγίες Προσβασιμότητας',
|
||||
contents : 'Περιεχόμενα Βοήθειας. Πατήστε ESC για κλείσιμο.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Γενικά',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Εργαλειοθήκη Επεξεργαστή',
|
||||
legend:
|
||||
'Πατήστε ${toolbarFocus} για να περιηγηθείτε στην γραμμή εργαλείων. Μετακινηθείτε ανάμεσα στις ομάδες της γραμμής εργαλείων με TAB και Shift-TAB. Μετακινηθείτε ανάμεσα στα κουμπία εργαλείων με ΔΕΞΙ και ΑΡΙΣΤΕΡΟ ΒΕΛΑΚΙ. Πατήστε ΚΕΝΟ ή ENTER για να ενεργοποιήσετε το ενεργό κουμπί εργαλείου.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Παράθυρο Διαλόγου Επεξεργαστή',
|
||||
legend :
|
||||
'Μέσα σε ένα παράθυρο διαλόγου, πατήστε TAB για να μεταβείτε στο επόμενο πεδίο ή SHIFT + TAB για να μεταβείτε στο προηγούμενο. Πατήστε ENTER για να υποβάλετε την φόρμα. Πατήστε ESC για να ακυρώσετε την διαδικασία της φόρμας. Για παράθυρα διαλόγων που έχουν πολλές σελίδες σε καρτέλες πατήστε ALT + F10 για να μεταβείτε στην λίστα των καρτέλων. Στην συνέχεια μπορείτε να μεταβείτε στην επόμενη καρτέλα πατώντας TAB ή RIGHT ARROW. Μπορείτε να μεταβείτε στην προηγούμενη καρτέλα πατώντας SHIFT + TAB ή LEFT ARROW. Πατήστε SPACE ή ENTER για να επιλέξετε την καρτέλα για προβολή.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Αναδυόμενο Μενού Επεξεργαστή',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Εντολές',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Εντολή αναίρεσης',
|
||||
legend : 'Πατήστε ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή επανάληψης',
|
||||
legend : 'Πατήστε ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή έντονης γραφής',
|
||||
legend : 'Πατήστε ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή πλάγιας γραφής',
|
||||
legend : 'Πατήστε ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή υπογράμμισης',
|
||||
legend : 'Πατήστε ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή συνδέσμου',
|
||||
legend : 'Πατήστε ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Εντολή Σύμπτηξης Εργαλειοθήκης',
|
||||
legend : 'Πατήστε ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Βοήθεια Προσβασιμότητας',
|
||||
legend : 'Πατήστε ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,108 +1,108 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'en',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Accessibility Instructions',
|
||||
contents : 'Help Contents. To close this dialog press ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'General',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor Toolbar',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. ' +
|
||||
'Move to the next and previous toolbar group with TAB and SHIFT-TAB. ' +
|
||||
'Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to activate the toolbar button.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. ' +
|
||||
'For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. ' +
|
||||
'Then move to next tab with TAB OR RIGTH ARROW. ' +
|
||||
'Move to previous tab with SHIFT + TAB or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to select the tab page.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. ' +
|
||||
'Then move to next menu option with TAB or DOWN ARROW. ' +
|
||||
'Move to previous option with SHIFT+TAB or UP ARROW. ' +
|
||||
'Press SPACE or ENTER to select the menu option. ' +
|
||||
'Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. ' +
|
||||
'Go back to parent menu item with ESC or LEFT ARROW. ' +
|
||||
'Close context menu with ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box',
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. ' +
|
||||
'Move to previous list item with SHIFT + TAB or UP ARROW. ' +
|
||||
'Press SPACE or ENTER to select the list option. ' +
|
||||
'Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar',
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. ' +
|
||||
'Move to next element button with TAB or RIGHT ARROW. ' +
|
||||
'Move to previous button with SHIFT+TAB or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to select the element in editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command',
|
||||
legend : 'Press ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Redo command',
|
||||
legend : 'Press ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Bold command',
|
||||
legend : 'Press ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command',
|
||||
legend : 'Press ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Underline command',
|
||||
legend : 'Press ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Link command',
|
||||
legend : 'Press ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command',
|
||||
legend : 'Press ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help',
|
||||
legend : 'Press ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'en',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Accessibility Instructions',
|
||||
contents : 'Help Contents. To close this dialog press ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'General',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor Toolbar',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. ' +
|
||||
'Move to the next and previous toolbar group with TAB and SHIFT-TAB. ' +
|
||||
'Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to activate the toolbar button.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. ' +
|
||||
'For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. ' +
|
||||
'Then move to next tab with TAB OR RIGTH ARROW. ' +
|
||||
'Move to previous tab with SHIFT + TAB or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to select the tab page.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. ' +
|
||||
'Then move to next menu option with TAB or DOWN ARROW. ' +
|
||||
'Move to previous option with SHIFT+TAB or UP ARROW. ' +
|
||||
'Press SPACE or ENTER to select the menu option. ' +
|
||||
'Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. ' +
|
||||
'Go back to parent menu item with ESC or LEFT ARROW. ' +
|
||||
'Close context menu with ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box',
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. ' +
|
||||
'Move to previous list item with SHIFT + TAB or UP ARROW. ' +
|
||||
'Press SPACE or ENTER to select the list option. ' +
|
||||
'Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar',
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. ' +
|
||||
'Move to next element button with TAB or RIGHT ARROW. ' +
|
||||
'Move to previous button with SHIFT+TAB or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to select the element in editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command',
|
||||
legend : 'Press ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Redo command',
|
||||
legend : 'Press ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Bold command',
|
||||
legend : 'Press ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command',
|
||||
legend : 'Press ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Underline command',
|
||||
legend : 'Press ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Link command',
|
||||
legend : 'Press ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command',
|
||||
legend : 'Press ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help',
|
||||
legend : 'Press ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'eo',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Uzindikoj pri atingeblo',
|
||||
contents : 'Helpilenhavo. Por fermi tiun dialogon, premu la ESKAPAN klavon.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Ĝeneralaĵoj',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Ilbreto de la redaktilo',
|
||||
legend:
|
||||
'Premu ${toolbarFocus} por atingi la ilbreton. Moviĝu al la sekva aŭ antaŭa grupoj de la ilbreto per la klavoj TABA kaj MAJUSKLIGA-TABA. Moviĝu al la sekva aŭ antaŭa butonoj de la ilbreto per la klavoj SAGO DEKSTREN kaj SAGO MALDEKSTREN. Premu la SPACETklavon aŭ la ENENklavon por aktivigi la ilbretbutonon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Redaktildialogo',
|
||||
legend :
|
||||
'En dialogo, premu la TABAN klavon por navigi al la sekva dialogkampo, premu la MAJUSKLIGAN + TABAN klavojn por reveni al la antaŭa kampo, premu la ENENklavon por sendi la dialogon, premu la ESKAPAN klavon por nuligi la dialogon. Por dialogoj kun pluraj retpaĝoj sub langetoj, premu ALT + F10 por navigi al la langetlisto. Poste moviĝu al la sekva langeto per la klavo TABA aŭ SAGO DEKSTREN. Moviĝu al la antaŭa langeto per la klavoj MAJUSKLIGA + TABA aŭ SAGO MALDEKSTREN. Premu la SPACETklavon aŭ la ENENklavon por selekti la langetretpaĝon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kunteksta menuo de la redaktilo',
|
||||
legend :
|
||||
'Premu ${contextMenu} aŭ entajpu la KLAVKOMBINAĴON por malfermi la kuntekstan menuon. Poste moviĝu al la sekva opcio de la menuo per la klavoj TABA aŭ SAGO SUBEN. Moviĝu al la antaŭa opcio per la klavoj MAJUSKLGA + TABA aŭ SAGO SUPREN. Premu la SPACETklavon aŭ ENENklavon por selekti la menuopcion. Malfermu la submenuon de la kuranta opcio per la SPACETklavo aŭ la ENENklavo aŭ la SAGO DEKSTREN. Revenu al la elemento de la patra menuo per la klavoj ESKAPA aŭ SAGO MALDEKSTREN. Fermu la kuntekstan menuon per la ESKAPA klavo.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Fallisto de la redaktilo',
|
||||
legend :
|
||||
'En fallisto, moviĝu al la sekva listelemento per la klavoj TABA aŭ SAGO SUBEN. Moviĝu al la antaŭa listelemento per la klavoj MAJUSKLIGA + TABA aŭ SAGO SUPREN. Premu la SPACETklavon aŭ ENENklavon por selekti la opcion en la listo. Premu la ESKAPAN klavon por fermi la falmenuon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Breto indikanta la vojon al la redaktilelementoj',
|
||||
legend :
|
||||
'Premu ${elementsPathFocus} por navigi al la breto indikanta la vojon al la redaktilelementoj. Moviĝu al la butono de la sekva elemento per la klavoj TABA aŭ SAGO DEKSTREN. Moviĝu al la butono de la antaŭa elemento per la klavoj MAJUSKLIGA + TABA aŭ SAGO MALDEKSTREN. Premu la SPACETklavon aŭ ENENklavon por selekti la elementon en la redaktilo.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Komandoj',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Komando malfari',
|
||||
legend : 'Premu ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Komando refari',
|
||||
legend : 'Premu ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Komando grasa',
|
||||
legend : 'Premu ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Komando kursiva',
|
||||
legend : 'Premu ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Komando substreki',
|
||||
legend : 'Premu ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Komando ligilo',
|
||||
legend : 'Premu ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Komando faldi la ilbreton',
|
||||
legend : 'Premu ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Helpilo pri atingeblo',
|
||||
legend : 'Premu ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'eo',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Uzindikoj pri atingeblo',
|
||||
contents : 'Helpilenhavo. Por fermi tiun dialogon, premu la ESKAPAN klavon.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Ĝeneralaĵoj',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Ilbreto de la redaktilo',
|
||||
legend:
|
||||
'Premu ${toolbarFocus} por atingi la ilbreton. Moviĝu al la sekva aŭ antaŭa grupoj de la ilbreto per la klavoj TABA kaj MAJUSKLIGA-TABA. Moviĝu al la sekva aŭ antaŭa butonoj de la ilbreto per la klavoj SAGO DEKSTREN kaj SAGO MALDEKSTREN. Premu la SPACETklavon aŭ la ENENklavon por aktivigi la ilbretbutonon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Redaktildialogo',
|
||||
legend :
|
||||
'En dialogo, premu la TABAN klavon por navigi al la sekva dialogkampo, premu la MAJUSKLIGAN + TABAN klavojn por reveni al la antaŭa kampo, premu la ENENklavon por sendi la dialogon, premu la ESKAPAN klavon por nuligi la dialogon. Por dialogoj kun pluraj retpaĝoj sub langetoj, premu ALT + F10 por navigi al la langetlisto. Poste moviĝu al la sekva langeto per la klavo TABA aŭ SAGO DEKSTREN. Moviĝu al la antaŭa langeto per la klavoj MAJUSKLIGA + TABA aŭ SAGO MALDEKSTREN. Premu la SPACETklavon aŭ la ENENklavon por selekti la langetretpaĝon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kunteksta menuo de la redaktilo',
|
||||
legend :
|
||||
'Premu ${contextMenu} aŭ entajpu la KLAVKOMBINAĴON por malfermi la kuntekstan menuon. Poste moviĝu al la sekva opcio de la menuo per la klavoj TABA aŭ SAGO SUBEN. Moviĝu al la antaŭa opcio per la klavoj MAJUSKLGA + TABA aŭ SAGO SUPREN. Premu la SPACETklavon aŭ ENENklavon por selekti la menuopcion. Malfermu la submenuon de la kuranta opcio per la SPACETklavo aŭ la ENENklavo aŭ la SAGO DEKSTREN. Revenu al la elemento de la patra menuo per la klavoj ESKAPA aŭ SAGO MALDEKSTREN. Fermu la kuntekstan menuon per la ESKAPA klavo.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Fallisto de la redaktilo',
|
||||
legend :
|
||||
'En fallisto, moviĝu al la sekva listelemento per la klavoj TABA aŭ SAGO SUBEN. Moviĝu al la antaŭa listelemento per la klavoj MAJUSKLIGA + TABA aŭ SAGO SUPREN. Premu la SPACETklavon aŭ ENENklavon por selekti la opcion en la listo. Premu la ESKAPAN klavon por fermi la falmenuon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Breto indikanta la vojon al la redaktilelementoj',
|
||||
legend :
|
||||
'Premu ${elementsPathFocus} por navigi al la breto indikanta la vojon al la redaktilelementoj. Moviĝu al la butono de la sekva elemento per la klavoj TABA aŭ SAGO DEKSTREN. Moviĝu al la butono de la antaŭa elemento per la klavoj MAJUSKLIGA + TABA aŭ SAGO MALDEKSTREN. Premu la SPACETklavon aŭ ENENklavon por selekti la elementon en la redaktilo.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Komandoj',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Komando malfari',
|
||||
legend : 'Premu ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Komando refari',
|
||||
legend : 'Premu ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Komando grasa',
|
||||
legend : 'Premu ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Komando kursiva',
|
||||
legend : 'Premu ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Komando substreki',
|
||||
legend : 'Premu ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Komando ligilo',
|
||||
legend : 'Premu ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Komando faldi la ilbreton',
|
||||
legend : 'Premu ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Helpilo pri atingeblo',
|
||||
legend : 'Premu ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'fa',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'دستورالعملهای دسترسی',
|
||||
contents : 'راهنمای فهرست مطالب. برای بستن این کادر محاورهای ESC را فشار دهید.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'عمومی',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'نوار ابزار ویرایشگر',
|
||||
legend:
|
||||
'${toolbarFocus} را برای باز کردن نوار ابزار بفشارید. با کلید Tab و Shif-Tab در مجموعه نوار ابزار بعدی و قبلی حرکت کنید. برای حرکت در کلید نوار ابزار قبلی و بعدی با کلید جهتنمای راست و چپ جابجا شوید. کلید Space یا Enter را برای فعال کردن کلید نوار ابزار بفشارید.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'پنجره محاورهای ویرایشگر',
|
||||
legend :
|
||||
'در داخل یک پنجره محاورهای، کلید Tab را بفشارید تا به پنجرهی بعدی بروید، Shift+Tab برای حرکت به فیلد قبلی، فشردن Enter برای ثبت اطلاعات پنجره، فشردن Esc برای لغو پنجره محاورهای و برای پنجرههایی که چندین برگه دارند، فشردن Alt+F10 جهت رفتن به Tab-List. در نهایت حرکت به برگه بعدی با Tab یا کلید جهتنمای راست. حرکت به برگه قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک برگه.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'منوی متنی ویرایشگر',
|
||||
legend :
|
||||
'${contextMenu} یا کلید برنامههای کاربردی را برای باز کردن منوی متن را بفشارید. سپس میتوانید برای حرکت به گزینه بعدی منو با کلید Tab و یا کلید جهتنمای پایین جابجا شوید. حرکت به گزینه قبلی با Shift+Tab یا کلید جهتنمای بالا. فشردن Space یا Enter برای انتخاب یک گزینه از منو. باز کردن زیر شاخه گزینه منو جاری با کلید Space یا Enter و یا کلید جهتنمای راست و چپ. بازگشت به منوی والد با کلید Esc یا کلید جهتنمای چپ. بستن منوی متن با Esc.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'جعبه فهرست ویرایشگر',
|
||||
legend :
|
||||
'در داخل جعبه لیست، قلم دوم از اقلام لیست بعدی را با TAB و یا Arrow Down حرکت دهید. انتقال به قلم دوم از اقلام لیست قبلی را با SHIFT + TAB یا UP ARROW. کلید Space یا ENTER را برای انتخاب گزینه لیست بفشارید. کلید ESC را برای بستن جعبه لیست بفشارید.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'ویرایشگر عنصر نوار راه',
|
||||
legend :
|
||||
'برای رفتن به مسیر عناصر ${elementsPathFocus} را بفشارید. حرکت به کلید عنصر بعدی با کلید Tab یا کلید جهتنمای راست. برگشت به کلید قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک عنصر در ویرایشگر.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'فرمانها',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'بازگشت فرمان',
|
||||
legend : 'فشردن ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'انجام مجدد فرمان',
|
||||
legend : 'فشردن ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان متن درشت',
|
||||
legend : 'فشردن ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان متن کج',
|
||||
legend : 'فشردن ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان متن زیرخطدار',
|
||||
legend : 'فشردن ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان پیوند',
|
||||
legend : 'فشردن ${link}'
|
||||
},
|
||||
{
|
||||
name : 'بستن نوار ابزار فرمان',
|
||||
legend : 'فشردن ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'راهنمای دسترسی',
|
||||
legend : 'فشردن ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'fa',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'دستورالعملهای دسترسی',
|
||||
contents : 'راهنمای فهرست مطالب. برای بستن این کادر محاورهای ESC را فشار دهید.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'عمومی',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'نوار ابزار ویرایشگر',
|
||||
legend:
|
||||
'${toolbarFocus} را برای باز کردن نوار ابزار بفشارید. با کلید Tab و Shif-Tab در مجموعه نوار ابزار بعدی و قبلی حرکت کنید. برای حرکت در کلید نوار ابزار قبلی و بعدی با کلید جهتنمای راست و چپ جابجا شوید. کلید Space یا Enter را برای فعال کردن کلید نوار ابزار بفشارید.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'پنجره محاورهای ویرایشگر',
|
||||
legend :
|
||||
'در داخل یک پنجره محاورهای، کلید Tab را بفشارید تا به پنجرهی بعدی بروید، Shift+Tab برای حرکت به فیلد قبلی، فشردن Enter برای ثبت اطلاعات پنجره، فشردن Esc برای لغو پنجره محاورهای و برای پنجرههایی که چندین برگه دارند، فشردن Alt+F10 جهت رفتن به Tab-List. در نهایت حرکت به برگه بعدی با Tab یا کلید جهتنمای راست. حرکت به برگه قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک برگه.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'منوی متنی ویرایشگر',
|
||||
legend :
|
||||
'${contextMenu} یا کلید برنامههای کاربردی را برای باز کردن منوی متن را بفشارید. سپس میتوانید برای حرکت به گزینه بعدی منو با کلید Tab و یا کلید جهتنمای پایین جابجا شوید. حرکت به گزینه قبلی با Shift+Tab یا کلید جهتنمای بالا. فشردن Space یا Enter برای انتخاب یک گزینه از منو. باز کردن زیر شاخه گزینه منو جاری با کلید Space یا Enter و یا کلید جهتنمای راست و چپ. بازگشت به منوی والد با کلید Esc یا کلید جهتنمای چپ. بستن منوی متن با Esc.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'جعبه فهرست ویرایشگر',
|
||||
legend :
|
||||
'در داخل جعبه لیست، قلم دوم از اقلام لیست بعدی را با TAB و یا Arrow Down حرکت دهید. انتقال به قلم دوم از اقلام لیست قبلی را با SHIFT + TAB یا UP ARROW. کلید Space یا ENTER را برای انتخاب گزینه لیست بفشارید. کلید ESC را برای بستن جعبه لیست بفشارید.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'ویرایشگر عنصر نوار راه',
|
||||
legend :
|
||||
'برای رفتن به مسیر عناصر ${elementsPathFocus} را بفشارید. حرکت به کلید عنصر بعدی با کلید Tab یا کلید جهتنمای راست. برگشت به کلید قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک عنصر در ویرایشگر.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'فرمانها',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'بازگشت فرمان',
|
||||
legend : 'فشردن ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'انجام مجدد فرمان',
|
||||
legend : 'فشردن ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان متن درشت',
|
||||
legend : 'فشردن ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان متن کج',
|
||||
legend : 'فشردن ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان متن زیرخطدار',
|
||||
legend : 'فشردن ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'فرمان پیوند',
|
||||
legend : 'فشردن ${link}'
|
||||
},
|
||||
{
|
||||
name : 'بستن نوار ابزار فرمان',
|
||||
legend : 'فشردن ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'راهنمای دسترسی',
|
||||
legend : 'فشردن ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'fi',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Saavutettavuus ohjeet',
|
||||
contents : 'Ohjeen sisällöt. Sulkeaksesi tämän dialogin paina ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Yleinen',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editorin työkalupalkki',
|
||||
legend:
|
||||
'Paina ${toolbarFocus} siirtyäksesi työkalupalkkiin. Siirry seuraavaan ja edelliseen työkalupalkin ryhmään TAB ja SHIFT-TAB näppäimillä. Siirry seuraavaan ja edelliseen työkalupainikkeeseen käyttämällä NUOLI OIKEALLE tai NUOLI VASEMMALLE näppäimillä. Paina VÄLILYÖNTI tai ENTER näppäintä aktivoidaksesi työkalupainikkeen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin dialogi',
|
||||
legend :
|
||||
'Dialogin sisällä, painamalla TAB siirryt seuraavaan dialogin kenttään, painamalla SHIFT+TAB siirryt aiempaan kenttään, painamalla ENTER lähetät dialogin, painamalla ESC peruutat dialogin. Dialogeille joissa on useita välilehtiä, paina ALT+F10 siirtyäksesi välillehtilistaan. Siirtyäksesi seuraavaan välilehteen paina TAB tai NUOLI OIKEALLE. Siirry edelliseen välilehteen painamalla SHIFT+TAB tai nuoli vasemmalle. Paina VÄLILYÖNTI tai ENTER valitaksesi välilehden.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin oheisvalikko',
|
||||
legend :
|
||||
'Paina ${contextMenu} tai SOVELLUSPAINIKETTA avataksesi oheisvalikon. Liiku seuraavaan valikon vaihtoehtoon TAB tai NUOLI ALAS näppäimillä. Siirry edelliseen vaihtoehtoon SHIFT+TAB tai NUOLI YLÖS näppäimillä. Paina VÄLILYÖNTI tai ENTER valitaksesi valikon kohdan. Avataksesi nykyisen kohdan alivalikon paina VÄLILYÖNTI tai ENTER tai NUOLI OIKEALLE painiketta. Siirtyäksesi takaisin valikon ylemmälle tasolle paina ESC tai NUOLI vasemmalle. Oheisvalikko suljetaan ESC painikkeella.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin listalaatikko',
|
||||
legend :
|
||||
'Listalaatikon sisällä siirry seuraavaan listan kohtaan TAB tai NUOLI ALAS painikkeilla. Siirry edelliseen listan kohtaan SHIFT+TAB tai NUOLI YLÖS painikkeilla. Paina VÄLILYÖNTI tai ENTER valitaksesi listan vaihtoehdon. Paina ESC sulkeaksesi listalaatikon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin elementtipolun palkki',
|
||||
legend :
|
||||
'Paina ${elementsPathFocus} siirtyäksesi elementtipolun palkkiin. Siirry seuraavaan elementtipainikkeeseen TAB tai NUOLI OIKEALLE painikkeilla. Siirry aiempaan painikkeeseen SHIFT+TAB tai NUOLI VASEMMALLE painikkeilla. Paina VÄLILYÖNTI tai ENTER valitaksesi elementin editorissa.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Komennot',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Peruuta komento',
|
||||
legend : 'Paina ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Tee uudelleen komento',
|
||||
legend : 'Paina ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Lihavoi komento',
|
||||
legend : 'Paina ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Kursivoi komento',
|
||||
legend : 'Paina ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Alleviivaa komento',
|
||||
legend : 'Paina ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Linkki komento',
|
||||
legend : 'Paina ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Pienennä työkalupalkki komento',
|
||||
legend : 'Paina ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Saavutettavuus ohjeet',
|
||||
legend : 'Paina ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'fi',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Saavutettavuus ohjeet',
|
||||
contents : 'Ohjeen sisällöt. Sulkeaksesi tämän dialogin paina ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Yleinen',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editorin työkalupalkki',
|
||||
legend:
|
||||
'Paina ${toolbarFocus} siirtyäksesi työkalupalkkiin. Siirry seuraavaan ja edelliseen työkalupalkin ryhmään TAB ja SHIFT-TAB näppäimillä. Siirry seuraavaan ja edelliseen työkalupainikkeeseen käyttämällä NUOLI OIKEALLE tai NUOLI VASEMMALLE näppäimillä. Paina VÄLILYÖNTI tai ENTER näppäintä aktivoidaksesi työkalupainikkeen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin dialogi',
|
||||
legend :
|
||||
'Dialogin sisällä, painamalla TAB siirryt seuraavaan dialogin kenttään, painamalla SHIFT+TAB siirryt aiempaan kenttään, painamalla ENTER lähetät dialogin, painamalla ESC peruutat dialogin. Dialogeille joissa on useita välilehtiä, paina ALT+F10 siirtyäksesi välillehtilistaan. Siirtyäksesi seuraavaan välilehteen paina TAB tai NUOLI OIKEALLE. Siirry edelliseen välilehteen painamalla SHIFT+TAB tai nuoli vasemmalle. Paina VÄLILYÖNTI tai ENTER valitaksesi välilehden.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin oheisvalikko',
|
||||
legend :
|
||||
'Paina ${contextMenu} tai SOVELLUSPAINIKETTA avataksesi oheisvalikon. Liiku seuraavaan valikon vaihtoehtoon TAB tai NUOLI ALAS näppäimillä. Siirry edelliseen vaihtoehtoon SHIFT+TAB tai NUOLI YLÖS näppäimillä. Paina VÄLILYÖNTI tai ENTER valitaksesi valikon kohdan. Avataksesi nykyisen kohdan alivalikon paina VÄLILYÖNTI tai ENTER tai NUOLI OIKEALLE painiketta. Siirtyäksesi takaisin valikon ylemmälle tasolle paina ESC tai NUOLI vasemmalle. Oheisvalikko suljetaan ESC painikkeella.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin listalaatikko',
|
||||
legend :
|
||||
'Listalaatikon sisällä siirry seuraavaan listan kohtaan TAB tai NUOLI ALAS painikkeilla. Siirry edelliseen listan kohtaan SHIFT+TAB tai NUOLI YLÖS painikkeilla. Paina VÄLILYÖNTI tai ENTER valitaksesi listan vaihtoehdon. Paina ESC sulkeaksesi listalaatikon.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editorin elementtipolun palkki',
|
||||
legend :
|
||||
'Paina ${elementsPathFocus} siirtyäksesi elementtipolun palkkiin. Siirry seuraavaan elementtipainikkeeseen TAB tai NUOLI OIKEALLE painikkeilla. Siirry aiempaan painikkeeseen SHIFT+TAB tai NUOLI VASEMMALLE painikkeilla. Paina VÄLILYÖNTI tai ENTER valitaksesi elementin editorissa.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Komennot',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Peruuta komento',
|
||||
legend : 'Paina ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Tee uudelleen komento',
|
||||
legend : 'Paina ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Lihavoi komento',
|
||||
legend : 'Paina ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Kursivoi komento',
|
||||
legend : 'Paina ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Alleviivaa komento',
|
||||
legend : 'Paina ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Linkki komento',
|
||||
legend : 'Paina ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Pienennä työkalupalkki komento',
|
||||
legend : 'Paina ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Saavutettavuus ohjeet',
|
||||
legend : 'Paina ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'fr',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instructions pour l\'accessibilité',
|
||||
contents : 'Contenu de l\'aide. Pour fermer ce dialogue, appuyez sur la touche ESC (Echappement).',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Général',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Barre d\'outils de l\'éditeur',
|
||||
legend:
|
||||
'Appuyer sur ${toolbarFocus} pour accéder à la barre d\'outils. Se déplacer vers les groupes suivant ou précédent de la barre d\'outil avec les touches TAB et SHIFT-TAB. Se déplacer vers les boutons suivant ou précédent de la barre d\'outils avec les touches FLECHE DROITE et FLECHE GAUCHE. Appuyer sur la barre d\'espace ou la touche ENTRER pour activer le bouton de barre d\'outils.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialogue de léditeur',
|
||||
legend :
|
||||
'A l\'intérieur d\'un dialogue, appuyer sur la touche TAB pour naviguer jusqu\'au champ de dalogue suivant, appuyez sur les touches SHIFT + TAB pour revenir au champ précédent, appuyez sur la touche ENTRER pour soumettre le dialogue, appuyer sur la touche ESC pour annuler le dialogue. Pour les dialogues avec plusieurs pages d\'onglets, appuyer sur ALT + F10 pour naviguer jusqu\'à la liste des onglets. Puis se déplacer vers l\'onglet suivant avec la touche TAB ou FLECHE DROITE. Se déplacer vers l\'onglet précédent avec les touches SHIFT + TAB ou FLECHE GAUCHE. Appuyer sur la barre d\'espace ou la touche ENTRER pour sélectionner la page de l\'onglet.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Menu contextuel de l\'éditeur',
|
||||
legend :
|
||||
'Appuyer sur ${contextMenu} ou entrer le RACCOURCI CLAVIER pour ouvrir le menu contextuel. Puis se déplacer vers l\'option suivante du menu avec les touches TAB ou FLECHE BAS. Se déplacer vers l\'option précédente avec les touches SHIFT+TAB ou FLECHE HAUT. appuyer sur la BARRE D\'ESPACE ou la touche ENTREE pour sélectionner l\'option du menu. Oovrir le sous-menu de l\'option courante avec la BARRE D\'ESPACE ou les touches ENTREE ou FLECHE DROITE. Revenir à l\'élément de menu parent avec les touches ESC ou FLECHE GAUCHE. Fermer le menu contextuel avec ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Zone de liste en menu déroulant de l\'éditeur',
|
||||
legend :
|
||||
'A l\'intérieur d\'une liste en menu déroulant, se déplacer vers l\'élément suivant de la liste avec les touches TAB ou FLECHE BAS. Se déplacer vers l\'élément précédent de la liste avec les touches SHIFT + TAB ou FLECHE HAUT. Appuyer sur la BARRE D\'ESPACE ou sur ENTREE pour sélectionner l\'option dans la liste. Appuyer sur ESC pour fermer le menu déroulant.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Barre d\'emplacement des éléments de léditeur',
|
||||
legend :
|
||||
'Appuyer sur ${elementsPathFocus} pour naviguer vers la barre d\'emplacement des éléments de léditeur. Se déplacer vers le bouton d\'élément suivant avec les touches TAB ou FLECHE DROITE. Se déplacer vers le bouton d\'élément précédent avec les touches SHIFT+TAB ou FLECHE GAUCHE. Appuyer sur la BARRE D\'ESPACE ou sur ENTREE pour sélectionner l\'élément dans l\'éditeur.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commandes',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Commande défaire',
|
||||
legend : 'Appuyer sur ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Commande refaire',
|
||||
legend : 'Appuyer sur ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Commande gras',
|
||||
legend : 'Appuyer sur ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Commande italique',
|
||||
legend : 'Appuyer sur ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Commande souligné',
|
||||
legend : 'Appuyer sur ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Commande lien',
|
||||
legend : 'Appuyer sur ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Commande enrouler la barre d\'outils',
|
||||
legend : 'Appuyer sur ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Aide Accessibilité',
|
||||
legend : 'Appuyer sur ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'fr',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instructions pour l\'accessibilité',
|
||||
contents : 'Contenu de l\'aide. Pour fermer ce dialogue, appuyez sur la touche ESC (Echappement).',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Général',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Barre d\'outils de l\'éditeur',
|
||||
legend:
|
||||
'Appuyer sur ${toolbarFocus} pour accéder à la barre d\'outils. Se déplacer vers les groupes suivant ou précédent de la barre d\'outil avec les touches TAB et SHIFT-TAB. Se déplacer vers les boutons suivant ou précédent de la barre d\'outils avec les touches FLECHE DROITE et FLECHE GAUCHE. Appuyer sur la barre d\'espace ou la touche ENTRER pour activer le bouton de barre d\'outils.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialogue de léditeur',
|
||||
legend :
|
||||
'A l\'intérieur d\'un dialogue, appuyer sur la touche TAB pour naviguer jusqu\'au champ de dalogue suivant, appuyez sur les touches SHIFT + TAB pour revenir au champ précédent, appuyez sur la touche ENTRER pour soumettre le dialogue, appuyer sur la touche ESC pour annuler le dialogue. Pour les dialogues avec plusieurs pages d\'onglets, appuyer sur ALT + F10 pour naviguer jusqu\'à la liste des onglets. Puis se déplacer vers l\'onglet suivant avec la touche TAB ou FLECHE DROITE. Se déplacer vers l\'onglet précédent avec les touches SHIFT + TAB ou FLECHE GAUCHE. Appuyer sur la barre d\'espace ou la touche ENTRER pour sélectionner la page de l\'onglet.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Menu contextuel de l\'éditeur',
|
||||
legend :
|
||||
'Appuyer sur ${contextMenu} ou entrer le RACCOURCI CLAVIER pour ouvrir le menu contextuel. Puis se déplacer vers l\'option suivante du menu avec les touches TAB ou FLECHE BAS. Se déplacer vers l\'option précédente avec les touches SHIFT+TAB ou FLECHE HAUT. appuyer sur la BARRE D\'ESPACE ou la touche ENTREE pour sélectionner l\'option du menu. Oovrir le sous-menu de l\'option courante avec la BARRE D\'ESPACE ou les touches ENTREE ou FLECHE DROITE. Revenir à l\'élément de menu parent avec les touches ESC ou FLECHE GAUCHE. Fermer le menu contextuel avec ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Zone de liste en menu déroulant de l\'éditeur',
|
||||
legend :
|
||||
'A l\'intérieur d\'une liste en menu déroulant, se déplacer vers l\'élément suivant de la liste avec les touches TAB ou FLECHE BAS. Se déplacer vers l\'élément précédent de la liste avec les touches SHIFT + TAB ou FLECHE HAUT. Appuyer sur la BARRE D\'ESPACE ou sur ENTREE pour sélectionner l\'option dans la liste. Appuyer sur ESC pour fermer le menu déroulant.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Barre d\'emplacement des éléments de léditeur',
|
||||
legend :
|
||||
'Appuyer sur ${elementsPathFocus} pour naviguer vers la barre d\'emplacement des éléments de léditeur. Se déplacer vers le bouton d\'élément suivant avec les touches TAB ou FLECHE DROITE. Se déplacer vers le bouton d\'élément précédent avec les touches SHIFT+TAB ou FLECHE GAUCHE. Appuyer sur la BARRE D\'ESPACE ou sur ENTREE pour sélectionner l\'élément dans l\'éditeur.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commandes',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Commande défaire',
|
||||
legend : 'Appuyer sur ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Commande refaire',
|
||||
legend : 'Appuyer sur ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Commande gras',
|
||||
legend : 'Appuyer sur ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Commande italique',
|
||||
legend : 'Appuyer sur ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Commande souligné',
|
||||
legend : 'Appuyer sur ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Commande lien',
|
||||
legend : 'Appuyer sur ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Commande enrouler la barre d\'outils',
|
||||
legend : 'Appuyer sur ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Aide Accessibilité',
|
||||
legend : 'Appuyer sur ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'gu',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'એક્ક્ષેબિલિટી ની વિગતો',
|
||||
contents : 'હેલ્પ. આ બંધ કરવા ESC દબાવો.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'જનરલ',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'એડિટર ટૂલબાર',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'એડિટર ડાયલોગ',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu', // MISSING
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'કમાંડસ',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'અન્ડું કમાંડ',
|
||||
legend : '$ દબાવો {undo}'
|
||||
},
|
||||
{
|
||||
name : 'ફરી કરો કમાંડ',
|
||||
legend : '$ દબાવો {redo}'
|
||||
},
|
||||
{
|
||||
name : 'બોલ્દનો કમાંડ',
|
||||
legend : '$ દબાવો {bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'gu',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'એક્ક્ષેબિલિટી ની વિગતો',
|
||||
contents : 'હેલ્પ. આ બંધ કરવા ESC દબાવો.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'જનરલ',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'એડિટર ટૂલબાર',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'એડિટર ડાયલોગ',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu', // MISSING
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'કમાંડસ',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'અન્ડું કમાંડ',
|
||||
legend : '$ દબાવો {undo}'
|
||||
},
|
||||
{
|
||||
name : 'ફરી કરો કમાંડ',
|
||||
legend : '$ દબાવો {redo}'
|
||||
},
|
||||
{
|
||||
name : 'બોલ્દનો કમાંડ',
|
||||
legend : '$ દબાવો {bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'he',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'הוראות נגישות',
|
||||
contents : 'הוראות נגישות. לסגירה לחץ אסקייפ (ESC).',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'כללי',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'סרגל הכלים',
|
||||
legend:
|
||||
'לחץ על ${toolbarFocus} כדי לנווט לסרגל הכלים. עבור לכפתור הבא עם מקש הטאב (TAB) או חץ שמאלי. עבור לכפתור הקודם עם מקש השיפט (SHIFT) + טאב (TAB) או חץ ימני. לחץ רווח או אנטר (ENTER) כדי להפעיל את הכפתור הנבחר.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'דיאלוגים (חלונות תשאול)',
|
||||
legend :
|
||||
'בתוך דיאלוג, לחץ טאב (TAB) כדי לנווט לשדה הבא, לחץ שיפט (SHIFT) + טאב (TAB) כדי לנווט לשדה הקודם, לחץ אנטר (ENTER) כדי לשלוח את הדיאלוג, לחץ אסקייפ (ESC) כדי לבטל. בתוך דיאלוגים בעלי מספר טאבים (לשוניות), לחץ אלט (ALT) + F10 כדי לנווט לשורת הטאבים. נווט לטאב הבא עם טאב (TAB) או חץ שמאלי. עבור לטאב הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי להיכנס לטאב.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריט ההקשר (Context Menu)',
|
||||
legend :
|
||||
'לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. סגור את תפריט ההקשר עם אסקייפ (ESC).'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריטים צפים (List boxes)',
|
||||
legend :
|
||||
'בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'עץ אלמנטים (Elements Path)',
|
||||
legend :
|
||||
'לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. עבור לפריט הבא עם טאב (TAB) או חץ ימני. עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'פקודות',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' ביטול צעד אחרון',
|
||||
legend : 'לחץ ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' חזרה על צעד אחרון',
|
||||
legend : 'לחץ ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' הדגשה',
|
||||
legend : 'לחץ ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' הטייה',
|
||||
legend : 'לחץ ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת קו תחתון',
|
||||
legend : 'לחץ ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת לינק',
|
||||
legend : 'לחץ ${link}'
|
||||
},
|
||||
{
|
||||
name : ' כיווץ סרגל הכלים',
|
||||
legend : 'לחץ ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' הוראות נגישות',
|
||||
legend : 'לחץ ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'he',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'הוראות נגישות',
|
||||
contents : 'הוראות נגישות. לסגירה לחץ אסקייפ (ESC).',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'כללי',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'סרגל הכלים',
|
||||
legend:
|
||||
'לחץ על ${toolbarFocus} כדי לנווט לסרגל הכלים. עבור לכפתור הבא עם מקש הטאב (TAB) או חץ שמאלי. עבור לכפתור הקודם עם מקש השיפט (SHIFT) + טאב (TAB) או חץ ימני. לחץ רווח או אנטר (ENTER) כדי להפעיל את הכפתור הנבחר.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'דיאלוגים (חלונות תשאול)',
|
||||
legend :
|
||||
'בתוך דיאלוג, לחץ טאב (TAB) כדי לנווט לשדה הבא, לחץ שיפט (SHIFT) + טאב (TAB) כדי לנווט לשדה הקודם, לחץ אנטר (ENTER) כדי לשלוח את הדיאלוג, לחץ אסקייפ (ESC) כדי לבטל. בתוך דיאלוגים בעלי מספר טאבים (לשוניות), לחץ אלט (ALT) + F10 כדי לנווט לשורת הטאבים. נווט לטאב הבא עם טאב (TAB) או חץ שמאלי. עבור לטאב הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי להיכנס לטאב.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריט ההקשר (Context Menu)',
|
||||
legend :
|
||||
'לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. סגור את תפריט ההקשר עם אסקייפ (ESC).'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריטים צפים (List boxes)',
|
||||
legend :
|
||||
'בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'עץ אלמנטים (Elements Path)',
|
||||
legend :
|
||||
'לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. עבור לפריט הבא עם טאב (TAB) או חץ ימני. עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'פקודות',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' ביטול צעד אחרון',
|
||||
legend : 'לחץ ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' חזרה על צעד אחרון',
|
||||
legend : 'לחץ ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' הדגשה',
|
||||
legend : 'לחץ ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' הטייה',
|
||||
legend : 'לחץ ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת קו תחתון',
|
||||
legend : 'לחץ ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת לינק',
|
||||
legend : 'לחץ ${link}'
|
||||
},
|
||||
{
|
||||
name : ' כיווץ סרגל הכלים',
|
||||
legend : 'לחץ ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' הוראות נגישות',
|
||||
legend : 'לחץ ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'it',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Istruzioni di Accessibilità',
|
||||
contents : 'Contenuti di Aiuto. Per chiudere questa finestra premi ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generale',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Barra degli strumenti Editor',
|
||||
legend:
|
||||
'Premi ${toolbarFocus} per navigare fino alla barra degli strumenti. Muoviti tra i gruppi della barra degli strumenti con i tasti Tab e Maiusc-Tab. Spostati tra il successivo ed il precedente pulsante della barra degli strumenti usando le frecce direzionali Destra e Sinistra. Premi Spazio o Invio per attivare il pulsante della barra degli strumenti.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Finestra Editor',
|
||||
legend :
|
||||
'All\'interno di una finestra di dialogo, premi Tab per navigare fino al campo successivo della finestra di dialogo, premi Maiusc-Tab per tornare al campo precedente, premi Invio per inviare la finestra di dialogo, premi Esc per uscire. Per le finestre che hanno schede multiple, premi Alt+F10 per navigare nella lista delle schede. Quindi spostati alla scheda successiva con il tasto Tab oppure con la Freccia Destra. Torna alla scheda precedente con Maiusc+Tab oppure con la Freccia Sinistra. Premi Spazio o Invio per scegliere la scheda.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Menù contestuale Editor',
|
||||
legend :
|
||||
'Premi ${contextMenu} o TASTO APPLICAZIONE per aprire il menu contestuale. Dunque muoviti all\'opzione successiva del menu con il tasto TAB o con la Freccia Sotto. Muoviti all\'opzione precedente con MAIUSC+TAB o con Freccia Sopra. Premi SPAZIO o INVIO per scegliere l\'opzione di menu. Apri il sottomenu dell\'opzione corrente con SPAZIO o INVIO oppure con la Freccia Destra. Torna indietro al menu superiore con ESC oppure Freccia Sinistra. Chiudi il menu contestuale con ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Box Lista Editor',
|
||||
legend :
|
||||
'Dentro un box-lista, muoviti al prossimo elemento della lista con TAB o con la Freccia direzionale giù. Spostati all\'elemento precedente con MAIUSC+TAB oppure con Freccia direzionale sopra. Premi SPAZIO o INVIO per scegliere l\'opzione della lista. Premi ESC per chiudere il box-lista.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Barra percorso elementi editor',
|
||||
legend :
|
||||
'Premi ${elementsPathFocus} per navigare tra gli elementi della barra percorso. Muoviti al prossimo pulsante di elemento con TAB o la Freccia direzionale destra. Muoviti al pulsante precedente con MAIUSC+TAB o la Freccia Direzionale Sinistra. Premi SPAZIO o INVIO per scegliere l\'elemento nell\'editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Comandi',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Annulla comando',
|
||||
legend : 'Premi ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Ripeti comando',
|
||||
legend : 'Premi ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Grassetto',
|
||||
legend : 'Premi ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Corsivo',
|
||||
legend : 'Premi ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Sottolineato',
|
||||
legend : 'Premi ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Link',
|
||||
legend : 'Premi ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Comando riduci barra degli strumenti',
|
||||
legend : 'Premi ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Aiuto Accessibilità',
|
||||
legend : 'Premi ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'it',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Istruzioni di Accessibilità',
|
||||
contents : 'Contenuti di Aiuto. Per chiudere questa finestra premi ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generale',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Barra degli strumenti Editor',
|
||||
legend:
|
||||
'Premi ${toolbarFocus} per navigare fino alla barra degli strumenti. Muoviti tra i gruppi della barra degli strumenti con i tasti Tab e Maiusc-Tab. Spostati tra il successivo ed il precedente pulsante della barra degli strumenti usando le frecce direzionali Destra e Sinistra. Premi Spazio o Invio per attivare il pulsante della barra degli strumenti.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Finestra Editor',
|
||||
legend :
|
||||
'All\'interno di una finestra di dialogo, premi Tab per navigare fino al campo successivo della finestra di dialogo, premi Maiusc-Tab per tornare al campo precedente, premi Invio per inviare la finestra di dialogo, premi Esc per uscire. Per le finestre che hanno schede multiple, premi Alt+F10 per navigare nella lista delle schede. Quindi spostati alla scheda successiva con il tasto Tab oppure con la Freccia Destra. Torna alla scheda precedente con Maiusc+Tab oppure con la Freccia Sinistra. Premi Spazio o Invio per scegliere la scheda.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Menù contestuale Editor',
|
||||
legend :
|
||||
'Premi ${contextMenu} o TASTO APPLICAZIONE per aprire il menu contestuale. Dunque muoviti all\'opzione successiva del menu con il tasto TAB o con la Freccia Sotto. Muoviti all\'opzione precedente con MAIUSC+TAB o con Freccia Sopra. Premi SPAZIO o INVIO per scegliere l\'opzione di menu. Apri il sottomenu dell\'opzione corrente con SPAZIO o INVIO oppure con la Freccia Destra. Torna indietro al menu superiore con ESC oppure Freccia Sinistra. Chiudi il menu contestuale con ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Box Lista Editor',
|
||||
legend :
|
||||
'Dentro un box-lista, muoviti al prossimo elemento della lista con TAB o con la Freccia direzionale giù. Spostati all\'elemento precedente con MAIUSC+TAB oppure con Freccia direzionale sopra. Premi SPAZIO o INVIO per scegliere l\'opzione della lista. Premi ESC per chiudere il box-lista.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Barra percorso elementi editor',
|
||||
legend :
|
||||
'Premi ${elementsPathFocus} per navigare tra gli elementi della barra percorso. Muoviti al prossimo pulsante di elemento con TAB o la Freccia direzionale destra. Muoviti al pulsante precedente con MAIUSC+TAB o la Freccia Direzionale Sinistra. Premi SPAZIO o INVIO per scegliere l\'elemento nell\'editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Comandi',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Annulla comando',
|
||||
legend : 'Premi ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Ripeti comando',
|
||||
legend : 'Premi ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Grassetto',
|
||||
legend : 'Premi ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Corsivo',
|
||||
legend : 'Premi ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Sottolineato',
|
||||
legend : 'Premi ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Link',
|
||||
legend : 'Premi ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Comando riduci barra degli strumenti',
|
||||
legend : 'Premi ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Aiuto Accessibilità',
|
||||
legend : 'Premi ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'mk',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Инструкции за пристапност',
|
||||
contents : 'Содржина на делот за помош. За да го затворите овој дијалот притиснете ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Општо',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Мени за едиторот',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Дијалот за едиторот',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu', // MISSING
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands', // MISSING
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command', // MISSING
|
||||
legend : 'Press ${undo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Redo command', // MISSING
|
||||
legend : 'Press ${redo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Press ${bold}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'mk',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Инструкции за пристапност',
|
||||
contents : 'Содржина на делот за помош. За да го затворите овој дијалот притиснете ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Општо',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Мени за едиторот',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Дијалот за едиторот',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu', // MISSING
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands', // MISSING
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command', // MISSING
|
||||
legend : 'Press ${undo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Redo command', // MISSING
|
||||
legend : 'Press ${redo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Press ${bold}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'nb',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instruksjoner for tilgjengelighet',
|
||||
contents : 'Innhold for hjelp. Trykk ESC for å lukke denne dialogen.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generelt',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Verktøylinje for editor',
|
||||
legend:
|
||||
'Trykk ${toolbarFocus} for å navigere til verktøylinjen. Flytt til neste og forrige verktøylinjegruppe med TAB og SHIFT-TAB. Flytt til neste og forrige verktøylinjeknapp med HØYRE PILTAST og VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å aktivere verktøylinjeknappen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog for editor',
|
||||
legend :
|
||||
'Mens du er i en dialog, trykk TAB for å navigere til neste dialogfelt, press SHIFT + TAB for å flytte til forrige felt, trykk ENTER for å akseptere dialogen, trykk ESC for å avbryte dialogen. For dialoger med flere faner, trykk ALT + F10 for å navigere til listen over faner. Gå til neste fane med TAB eller HØYRE PILTAST. Gå til forrige fane med SHIFT + TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge fanen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kontekstmeny for editor',
|
||||
legend :
|
||||
'Trykk ${contextMenu} eller MENYKNAPP for å åpne kontekstmeny. Gå til neste alternativ i menyen med TAB eller PILTAST NED. Gå til forrige alternativ med SHIFT+TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge menyalternativet. Åpne undermenyen på valgt alternativ med MELLOMROM eller ENTER eller HØYRE PILTAST. Gå tilbake til overordnet menyelement med ESC eller VENSTRE PILTAST. Lukk kontekstmenyen med ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Listeboks for editor',
|
||||
legend :
|
||||
'I en listeboks, gå til neste alternativ i listen med TAB eller PILTAST NED. Gå til forrige alternativ i listen med SHIFT + TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge alternativet i listen. Trykk ESC for å lukke listeboksen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Verktøylinje for elementsti',
|
||||
legend :
|
||||
'Trykk ${elementsPathFocus} for å navigere til verktøylinjen som viser elementsti. Gå til neste elementknapp med TAB eller HØYRE PILTAST. Gå til forrige elementknapp med SHIFT+TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge elementet i editoren.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Kommandoer',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Angre',
|
||||
legend : 'Trykk ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gjør om',
|
||||
legend : 'Trykk ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Fet tekst',
|
||||
legend : 'Trykk ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Kursiv tekst',
|
||||
legend : 'Trykk ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Understreking',
|
||||
legend : 'Trykk ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link',
|
||||
legend : 'Trykk ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Skjul verktøylinje',
|
||||
legend : 'Trykk ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Hjelp for tilgjengelighet',
|
||||
legend : 'Trykk ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'nb',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instruksjoner for tilgjengelighet',
|
||||
contents : 'Innhold for hjelp. Trykk ESC for å lukke denne dialogen.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generelt',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Verktøylinje for editor',
|
||||
legend:
|
||||
'Trykk ${toolbarFocus} for å navigere til verktøylinjen. Flytt til neste og forrige verktøylinjegruppe med TAB og SHIFT-TAB. Flytt til neste og forrige verktøylinjeknapp med HØYRE PILTAST og VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å aktivere verktøylinjeknappen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog for editor',
|
||||
legend :
|
||||
'Mens du er i en dialog, trykk TAB for å navigere til neste dialogfelt, press SHIFT + TAB for å flytte til forrige felt, trykk ENTER for å akseptere dialogen, trykk ESC for å avbryte dialogen. For dialoger med flere faner, trykk ALT + F10 for å navigere til listen over faner. Gå til neste fane med TAB eller HØYRE PILTAST. Gå til forrige fane med SHIFT + TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge fanen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kontekstmeny for editor',
|
||||
legend :
|
||||
'Trykk ${contextMenu} eller MENYKNAPP for å åpne kontekstmeny. Gå til neste alternativ i menyen med TAB eller PILTAST NED. Gå til forrige alternativ med SHIFT+TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge menyalternativet. Åpne undermenyen på valgt alternativ med MELLOMROM eller ENTER eller HØYRE PILTAST. Gå tilbake til overordnet menyelement med ESC eller VENSTRE PILTAST. Lukk kontekstmenyen med ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Listeboks for editor',
|
||||
legend :
|
||||
'I en listeboks, gå til neste alternativ i listen med TAB eller PILTAST NED. Gå til forrige alternativ i listen med SHIFT + TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge alternativet i listen. Trykk ESC for å lukke listeboksen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Verktøylinje for elementsti',
|
||||
legend :
|
||||
'Trykk ${elementsPathFocus} for å navigere til verktøylinjen som viser elementsti. Gå til neste elementknapp med TAB eller HØYRE PILTAST. Gå til forrige elementknapp med SHIFT+TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge elementet i editoren.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Kommandoer',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Angre',
|
||||
legend : 'Trykk ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gjør om',
|
||||
legend : 'Trykk ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Fet tekst',
|
||||
legend : 'Trykk ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Kursiv tekst',
|
||||
legend : 'Trykk ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Understreking',
|
||||
legend : 'Trykk ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link',
|
||||
legend : 'Trykk ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Skjul verktøylinje',
|
||||
legend : 'Trykk ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Hjelp for tilgjengelighet',
|
||||
legend : 'Trykk ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'nl',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Toegankelijkheidsinstructies',
|
||||
contents : 'Help inhoud. Druk op ESC om dit dialoog te sluiten.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Algemeen',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Werkbalk tekstverwerker',
|
||||
legend:
|
||||
'Druk op ${toolbarFocus} om naar de werkbalk te navigeren. Om te schakelen naar de volgende en vorige werkbalkgroep, gebruik TAB en SHIFT+TAB. Om te schakelen naar de volgende en vorige werkbalkknop, gebruik de PIJL RECHTS en PIJL LINKS. Druk op SPATIE of ENTER om een werkbalkknop te activeren.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialoog tekstverwerker',
|
||||
legend :
|
||||
'In een dialoogvenster, druk op TAB om te navigeren naar het volgende veld. Druk op SHIFT+TAB om naar het vorige veld te navigeren. Druk op ENTER om het dialoogvenster te verzenden. Druk op ESC om het dialoogvenster te sluiten. Voor dialoogvensters met meerdere tabbladen, druk op ALT+F10 om naar de tabset te navigeren. Schakel naar het volgende tabblad met TAB of PIJL RECHTS. Schakel naar het vorige tabblad met SHIFT+TAB of PIJL LINKS. Druk op SPATIE of ENTER om het tabblad te selecteren.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Contextmenu tekstverwerker',
|
||||
legend :
|
||||
'Druk op ${contextMenu} of APPLICATION KEY om het contextmenu te openen. Schakel naar de volgende menuoptie met TAB of PIJL OMLAAG. Schakel naar de vorige menuoptie met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om een menuoptie te selecteren. Op een submenu van de huidige optie met SPATIE, ENTER of PIJL RECHTS. Ga terug naar de bovenliggende menuoptie met ESC of PIJL LINKS. Sluit het contextmenu met ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Keuzelijst tekstverwerker',
|
||||
legend :
|
||||
'In een keuzelijst, schakel naar het volgende item met TAB of PIJL OMLAAG. Schakel naar het vorige item met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om het item te selecteren. Druk op ESC om de keuzelijst te sluiten.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Elementenpad werkbalk tekstverwerker',
|
||||
legend :
|
||||
'Druk op ${elementsPathFocus} om naar het elementenpad te navigeren. Om te schakelen naar het volgende element, gebruik TAB of PIJL RECHTS. Om te schakelen naar het vorige element, gebruik SHIFT+TAB or PIJL LINKS. Druk op SPATIE of ENTER om een element te selecteren in de tekstverwerker.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Opdrachten',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Ongedaan maken opdracht',
|
||||
legend : 'Druk op ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Opnieuw uitvoeren opdracht',
|
||||
legend : 'Druk op ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Vetgedrukt opdracht',
|
||||
legend : 'Druk up ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Cursief opdracht',
|
||||
legend : 'Druk op ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Onderstrepen opdracht',
|
||||
legend : 'Druk op ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link opdracht',
|
||||
legend : 'Druk op ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Werkbalk inklappen opdracht',
|
||||
legend : 'Druk op ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Toegankelijkheidshulp',
|
||||
legend : 'Druk op ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'nl',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Toegankelijkheidsinstructies',
|
||||
contents : 'Help inhoud. Druk op ESC om dit dialoog te sluiten.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Algemeen',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Werkbalk tekstverwerker',
|
||||
legend:
|
||||
'Druk op ${toolbarFocus} om naar de werkbalk te navigeren. Om te schakelen naar de volgende en vorige werkbalkgroep, gebruik TAB en SHIFT+TAB. Om te schakelen naar de volgende en vorige werkbalkknop, gebruik de PIJL RECHTS en PIJL LINKS. Druk op SPATIE of ENTER om een werkbalkknop te activeren.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialoog tekstverwerker',
|
||||
legend :
|
||||
'In een dialoogvenster, druk op TAB om te navigeren naar het volgende veld. Druk op SHIFT+TAB om naar het vorige veld te navigeren. Druk op ENTER om het dialoogvenster te verzenden. Druk op ESC om het dialoogvenster te sluiten. Voor dialoogvensters met meerdere tabbladen, druk op ALT+F10 om naar de tabset te navigeren. Schakel naar het volgende tabblad met TAB of PIJL RECHTS. Schakel naar het vorige tabblad met SHIFT+TAB of PIJL LINKS. Druk op SPATIE of ENTER om het tabblad te selecteren.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Contextmenu tekstverwerker',
|
||||
legend :
|
||||
'Druk op ${contextMenu} of APPLICATION KEY om het contextmenu te openen. Schakel naar de volgende menuoptie met TAB of PIJL OMLAAG. Schakel naar de vorige menuoptie met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om een menuoptie te selecteren. Op een submenu van de huidige optie met SPATIE, ENTER of PIJL RECHTS. Ga terug naar de bovenliggende menuoptie met ESC of PIJL LINKS. Sluit het contextmenu met ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Keuzelijst tekstverwerker',
|
||||
legend :
|
||||
'In een keuzelijst, schakel naar het volgende item met TAB of PIJL OMLAAG. Schakel naar het vorige item met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om het item te selecteren. Druk op ESC om de keuzelijst te sluiten.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Elementenpad werkbalk tekstverwerker',
|
||||
legend :
|
||||
'Druk op ${elementsPathFocus} om naar het elementenpad te navigeren. Om te schakelen naar het volgende element, gebruik TAB of PIJL RECHTS. Om te schakelen naar het vorige element, gebruik SHIFT+TAB or PIJL LINKS. Druk op SPATIE of ENTER om een element te selecteren in de tekstverwerker.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Opdrachten',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Ongedaan maken opdracht',
|
||||
legend : 'Druk op ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Opnieuw uitvoeren opdracht',
|
||||
legend : 'Druk op ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Vetgedrukt opdracht',
|
||||
legend : 'Druk up ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Cursief opdracht',
|
||||
legend : 'Druk op ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Onderstrepen opdracht',
|
||||
legend : 'Druk op ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link opdracht',
|
||||
legend : 'Druk op ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Werkbalk inklappen opdracht',
|
||||
legend : 'Druk op ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Toegankelijkheidshulp',
|
||||
legend : 'Druk op ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'no',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instruksjoner for tilgjengelighet',
|
||||
contents : 'Innhold for hjelp. Trykk ESC for å lukke denne dialogen.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generelt',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Verktøylinje for editor',
|
||||
legend:
|
||||
'Trykk ${toolbarFocus} for å navigere til verktøylinjen. Flytt til neste og forrige verktøylinjegruppe med TAB og SHIFT-TAB. Flytt til neste og forrige verktøylinjeknapp med HØYRE PILTAST og VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å aktivere verktøylinjeknappen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog for editor',
|
||||
legend :
|
||||
'Mens du er i en dialog, trykk TAB for å navigere til neste dialogfelt, press SHIFT + TAB for å flytte til forrige felt, trykk ENTER for å akseptere dialogen, trykk ESC for å avbryte dialogen. For dialoger med flere faner, trykk ALT + F10 for å navigere til listen over faner. Gå til neste fane med TAB eller HØYRE PILTAST. Gå til forrige fane med SHIFT + TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge fanen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kontekstmeny for editor',
|
||||
legend :
|
||||
'Trykk ${contextMenu} eller MENYKNAPP for å åpne kontekstmeny. Gå til neste alternativ i menyen med TAB eller PILTAST NED. Gå til forrige alternativ med SHIFT+TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge menyalternativet. Åpne undermenyen på valgt alternativ med MELLOMROM eller ENTER eller HØYRE PILTAST. Gå tilbake til overordnet menyelement med ESC eller VENSTRE PILTAST. Lukk kontekstmenyen med ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Listeboks for editor',
|
||||
legend :
|
||||
'I en listeboks, gå til neste alternativ i listen med TAB eller PILTAST NED. Gå til forrige alternativ i listen med SHIFT + TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge alternativet i listen. Trykk ESC for å lukke listeboksen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Verktøylinje for elementsti',
|
||||
legend :
|
||||
'Trykk ${elementsPathFocus} for å navigere til verktøylinjen som viser elementsti. Gå til neste elementknapp med TAB eller HØYRE PILTAST. Gå til forrige elementknapp med SHIFT+TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge elementet i editoren.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Kommandoer',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Angre',
|
||||
legend : 'Trykk ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gjør om',
|
||||
legend : 'Trykk ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Fet tekst',
|
||||
legend : 'Trykk ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Kursiv tekst',
|
||||
legend : 'Trykk ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Understreking',
|
||||
legend : 'Trykk ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link',
|
||||
legend : 'Trykk ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Skjul verktøylinje',
|
||||
legend : 'Trykk ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Hjelp for tilgjengelighet',
|
||||
legend : 'Trykk ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'no',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instruksjoner for tilgjengelighet',
|
||||
contents : 'Innhold for hjelp. Trykk ESC for å lukke denne dialogen.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Generelt',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Verktøylinje for editor',
|
||||
legend:
|
||||
'Trykk ${toolbarFocus} for å navigere til verktøylinjen. Flytt til neste og forrige verktøylinjegruppe med TAB og SHIFT-TAB. Flytt til neste og forrige verktøylinjeknapp med HØYRE PILTAST og VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å aktivere verktøylinjeknappen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog for editor',
|
||||
legend :
|
||||
'Mens du er i en dialog, trykk TAB for å navigere til neste dialogfelt, press SHIFT + TAB for å flytte til forrige felt, trykk ENTER for å akseptere dialogen, trykk ESC for å avbryte dialogen. For dialoger med flere faner, trykk ALT + F10 for å navigere til listen over faner. Gå til neste fane med TAB eller HØYRE PILTAST. Gå til forrige fane med SHIFT + TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge fanen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Kontekstmeny for editor',
|
||||
legend :
|
||||
'Trykk ${contextMenu} eller MENYKNAPP for å åpne kontekstmeny. Gå til neste alternativ i menyen med TAB eller PILTAST NED. Gå til forrige alternativ med SHIFT+TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge menyalternativet. Åpne undermenyen på valgt alternativ med MELLOMROM eller ENTER eller HØYRE PILTAST. Gå tilbake til overordnet menyelement med ESC eller VENSTRE PILTAST. Lukk kontekstmenyen med ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Listeboks for editor',
|
||||
legend :
|
||||
'I en listeboks, gå til neste alternativ i listen med TAB eller PILTAST NED. Gå til forrige alternativ i listen med SHIFT + TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge alternativet i listen. Trykk ESC for å lukke listeboksen.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Verktøylinje for elementsti',
|
||||
legend :
|
||||
'Trykk ${elementsPathFocus} for å navigere til verktøylinjen som viser elementsti. Gå til neste elementknapp med TAB eller HØYRE PILTAST. Gå til forrige elementknapp med SHIFT+TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge elementet i editoren.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Kommandoer',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Angre',
|
||||
legend : 'Trykk ${undo}'
|
||||
},
|
||||
{
|
||||
name : 'Gjør om',
|
||||
legend : 'Trykk ${redo}'
|
||||
},
|
||||
{
|
||||
name : 'Fet tekst',
|
||||
legend : 'Trykk ${bold}'
|
||||
},
|
||||
{
|
||||
name : 'Kursiv tekst',
|
||||
legend : 'Trykk ${italic}'
|
||||
},
|
||||
{
|
||||
name : 'Understreking',
|
||||
legend : 'Trykk ${underline}'
|
||||
},
|
||||
{
|
||||
name : 'Link',
|
||||
legend : 'Trykk ${link}'
|
||||
},
|
||||
{
|
||||
name : 'Skjul verktøylinje',
|
||||
legend : 'Trykk ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : 'Hjelp for tilgjengelighet',
|
||||
legend : 'Trykk ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'pt-br',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instruções de Acessibilidade',
|
||||
contents : 'Conteúdo da Ajuda. Para fechar este diálogo pressione ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Geral',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Barra de Ferramentas do Editor',
|
||||
legend:
|
||||
'Pressione ${toolbarFocus} para navegar para a barra de ferramentas. Mova para o anterior ou próximo grupo de ferramentas com TAB e SHIFT-TAB. Mova para o anterior ou próximo botão com SETA PARA DIREITA or SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para ativar o botão da barra de ferramentas.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Diálogo do Editor',
|
||||
legend :
|
||||
'Dentro de um diálogo, pressione TAB para navegar para o próximo campo, pressione SHIFT + TAB para mover para o campo anterior, pressione ENTER para enviar o diálogo, pressione ESC para cancelar o diálogo. Para diálogos que tem múltiplas abas, pressione ALT + F10 para navegar para a lista de abas, então mova para a próxima aba com SHIFT + TAB ou SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar a aba.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Menu de Contexto do Editor',
|
||||
legend :
|
||||
'Pressione ${contextMenu} ou TECLA DE MENU para abrir o menu de contexto, então mova para a próxima opção com TAB ou SETA PARA BAIXO. Mova para a anterior com SHIFT+TAB ou SETA PARA CIMA. Pressione ESPAÇO ou ENTER para selecionar a opção do menu. Abra o submenu da opção atual com ESPAÇO ou ENTER ou SETA PARA DIREITA. Volte para o menu pai com ESC ou SETA PARA ESQUERDA. Feche o menu de contexto com ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Caixa de Lista do Editor',
|
||||
legend :
|
||||
'Dentro de uma caixa de lista, mova para o próximo item com TAB ou SETA PARA BAIXO. Mova para o item anterior com SHIFT + TAB ou SETA PARA CIMA. Pressione ESPAÇO ou ENTER para selecionar uma opção na lista. Pressione ESC para fechar a caixa de lista.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Barra de Caminho do Elementos do Editor',
|
||||
legend :
|
||||
'Pressione ${elementsPathFocus} para a barra de caminho dos elementos. Mova para o próximo botão de elemento com TAB ou SETA PARA DIREITA. Mova para o botão anterior com SHIFT+TAB ou SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar o elemento no editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Comandos',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Comando Desfazer',
|
||||
legend : 'Pressione ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Refazer',
|
||||
legend : 'Pressione ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Negrito',
|
||||
legend : 'Pressione ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Itálico',
|
||||
legend : 'Pressione ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Sublinhado',
|
||||
legend : 'Pressione ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Link',
|
||||
legend : 'Pressione ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Fechar Barra de Ferramentas',
|
||||
legend : 'Pressione ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Ajuda de Acessibilidade',
|
||||
legend : 'Pressione ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'pt-br',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instruções de Acessibilidade',
|
||||
contents : 'Conteúdo da Ajuda. Para fechar este diálogo pressione ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Geral',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Barra de Ferramentas do Editor',
|
||||
legend:
|
||||
'Pressione ${toolbarFocus} para navegar para a barra de ferramentas. Mova para o anterior ou próximo grupo de ferramentas com TAB e SHIFT-TAB. Mova para o anterior ou próximo botão com SETA PARA DIREITA or SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para ativar o botão da barra de ferramentas.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Diálogo do Editor',
|
||||
legend :
|
||||
'Dentro de um diálogo, pressione TAB para navegar para o próximo campo, pressione SHIFT + TAB para mover para o campo anterior, pressione ENTER para enviar o diálogo, pressione ESC para cancelar o diálogo. Para diálogos que tem múltiplas abas, pressione ALT + F10 para navegar para a lista de abas, então mova para a próxima aba com SHIFT + TAB ou SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar a aba.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Menu de Contexto do Editor',
|
||||
legend :
|
||||
'Pressione ${contextMenu} ou TECLA DE MENU para abrir o menu de contexto, então mova para a próxima opção com TAB ou SETA PARA BAIXO. Mova para a anterior com SHIFT+TAB ou SETA PARA CIMA. Pressione ESPAÇO ou ENTER para selecionar a opção do menu. Abra o submenu da opção atual com ESPAÇO ou ENTER ou SETA PARA DIREITA. Volte para o menu pai com ESC ou SETA PARA ESQUERDA. Feche o menu de contexto com ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Caixa de Lista do Editor',
|
||||
legend :
|
||||
'Dentro de uma caixa de lista, mova para o próximo item com TAB ou SETA PARA BAIXO. Mova para o item anterior com SHIFT + TAB ou SETA PARA CIMA. Pressione ESPAÇO ou ENTER para selecionar uma opção na lista. Pressione ESC para fechar a caixa de lista.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Barra de Caminho do Elementos do Editor',
|
||||
legend :
|
||||
'Pressione ${elementsPathFocus} para a barra de caminho dos elementos. Mova para o próximo botão de elemento com TAB ou SETA PARA DIREITA. Mova para o botão anterior com SHIFT+TAB ou SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar o elemento no editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Comandos',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Comando Desfazer',
|
||||
legend : 'Pressione ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Refazer',
|
||||
legend : 'Pressione ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Negrito',
|
||||
legend : 'Pressione ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Itálico',
|
||||
legend : 'Pressione ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Sublinhado',
|
||||
legend : 'Pressione ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Link',
|
||||
legend : 'Pressione ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Comando Fechar Barra de Ferramentas',
|
||||
legend : 'Pressione ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Ajuda de Acessibilidade',
|
||||
legend : 'Pressione ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'ro',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instrucțiuni de accesibilitate',
|
||||
contents : 'Cuprins. Pentru a închide acest dialog, apăsați tasta ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'General',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editează bara.',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog editor',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor meniu contextual',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands', // MISSING
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command', // MISSING
|
||||
legend : 'Press ${undo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Redo command', // MISSING
|
||||
legend : 'Press ${redo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Press ${bold}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'ro',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Instrucțiuni de accesibilitate',
|
||||
contents : 'Cuprins. Pentru a închide acest dialog, apăsați tasta ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'General',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editează bara.',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog editor',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor meniu contextual',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands', // MISSING
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command', // MISSING
|
||||
legend : 'Press ${undo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Redo command', // MISSING
|
||||
legend : 'Press ${redo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Press ${bold}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'tr',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Erişilebilirlik Talimatları',
|
||||
contents : 'Yardım içeriği. Bu pencereyi kapatmak için ESC tuşuna basın.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Genel',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Araç Çubuğu Editörü',
|
||||
legend:
|
||||
'Araç çubuğunda gezinmek için ${toolbarFocus} basın. TAB ve SHIFT-TAB ile önceki ve sonraki araç çubuğu grubuna taşıyın. SAĞ OK veya SOL OK ile önceki ve sonraki bir araç çubuğu düğmesini hareket ettirin. SPACE tuşuna basın veya araç çubuğu düğmesini etkinleştirmek için ENTER tuşna basın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog Editörü',
|
||||
legend :
|
||||
'Dialog penceresi içinde, sonraki iletişim alanına gitmek için SEKME tuşuna basın, önceki alana geçmek için SHIFT + TAB tuşuna basın, pencereyi göndermek için ENTER tuşuna basın, dialog penceresini iptal etmek için ESC tuşuna basın. Birden çok sekme sayfaları olan diyalogların, sekme listesine gitmek için ALT + F10 tuşlarına basın. Sonra TAB veya SAĞ OK sonraki sekmeye taşıyın. SHIFT + TAB veya SOL OK ile önceki sekmeye geçin. Sekme sayfayı seçmek için SPACE veya ENTER tuşuna basın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'İçerik Menü Editörü',
|
||||
legend :
|
||||
'İçerik menüsünü açmak için ${contextMenu} veya UYGULAMA TUŞU\'na basın. Daha sonra SEKME veya AŞAĞI OK ile bir sonraki menü seçeneği taşıyın. SHIFT + TAB veya YUKARI OK ile önceki seçeneğe gider. Menü seçeneğini seçmek için SPACE veya ENTER tuşuna basın. Seçili seçeneğin alt menüsünü SPACE ya da ENTER veya SAĞ OK açın. Üst menü öğesini geçmek için ESC veya SOL OK ile geri dönün. ESC ile bağlam menüsünü kapatın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Liste Kutusu Editörü',
|
||||
legend :
|
||||
'Liste kutusu içinde, bir sonraki liste öğesine SEKME VEYA AŞAĞI OK ile taşıyın. SHIFT + TAB veya YUKARI önceki liste öğesi taşıyın. Liste seçeneği seçmek için SPACE veya ENTER tuşuna basın. Liste kutusunu kapatmak için ESC tuşuna basın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Element Yol Çubuğu Editörü',
|
||||
legend :
|
||||
'Elementlerin yol çubuğunda gezinmek için ${ElementsPathFocus} basın. SEKME veya SAĞ OK ile sonraki element düğmesine taşıyın. SHIFT + TAB veya SOL OK önceki düğmeye hareket ettirin. Editör içindeki elementi seçmek için ENTER veya SPACE tuşuna basın.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Komutlar',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Komutu geri al',
|
||||
legend : '${undo} basın'
|
||||
},
|
||||
{
|
||||
name : ' Tekrar komutu uygula',
|
||||
legend : '${redo} basın'
|
||||
},
|
||||
{
|
||||
name : ' Kalın komut',
|
||||
legend : '${bold} basın'
|
||||
},
|
||||
{
|
||||
name : ' İtalik komutu',
|
||||
legend : '${italic} basın'
|
||||
},
|
||||
{
|
||||
name : ' Alttan çizgi komutu',
|
||||
legend : '${underline} basın'
|
||||
},
|
||||
{
|
||||
name : ' Bağlantı komutu',
|
||||
legend : '${link} basın'
|
||||
},
|
||||
{
|
||||
name : ' Araç çubuğu Toplama komutu',
|
||||
legend : '${toolbarCollapse} basın'
|
||||
},
|
||||
{
|
||||
name : 'Erişilebilirlik Yardımı',
|
||||
legend : '${a11yHelp} basın'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'tr',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Erişilebilirlik Talimatları',
|
||||
contents : 'Yardım içeriği. Bu pencereyi kapatmak için ESC tuşuna basın.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Genel',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Araç Çubuğu Editörü',
|
||||
legend:
|
||||
'Araç çubuğunda gezinmek için ${toolbarFocus} basın. TAB ve SHIFT-TAB ile önceki ve sonraki araç çubuğu grubuna taşıyın. SAĞ OK veya SOL OK ile önceki ve sonraki bir araç çubuğu düğmesini hareket ettirin. SPACE tuşuna basın veya araç çubuğu düğmesini etkinleştirmek için ENTER tuşna basın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Dialog Editörü',
|
||||
legend :
|
||||
'Dialog penceresi içinde, sonraki iletişim alanına gitmek için SEKME tuşuna basın, önceki alana geçmek için SHIFT + TAB tuşuna basın, pencereyi göndermek için ENTER tuşuna basın, dialog penceresini iptal etmek için ESC tuşuna basın. Birden çok sekme sayfaları olan diyalogların, sekme listesine gitmek için ALT + F10 tuşlarına basın. Sonra TAB veya SAĞ OK sonraki sekmeye taşıyın. SHIFT + TAB veya SOL OK ile önceki sekmeye geçin. Sekme sayfayı seçmek için SPACE veya ENTER tuşuna basın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'İçerik Menü Editörü',
|
||||
legend :
|
||||
'İçerik menüsünü açmak için ${contextMenu} veya UYGULAMA TUŞU\'na basın. Daha sonra SEKME veya AŞAĞI OK ile bir sonraki menü seçeneği taşıyın. SHIFT + TAB veya YUKARI OK ile önceki seçeneğe gider. Menü seçeneğini seçmek için SPACE veya ENTER tuşuna basın. Seçili seçeneğin alt menüsünü SPACE ya da ENTER veya SAĞ OK açın. Üst menü öğesini geçmek için ESC veya SOL OK ile geri dönün. ESC ile bağlam menüsünü kapatın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Liste Kutusu Editörü',
|
||||
legend :
|
||||
'Liste kutusu içinde, bir sonraki liste öğesine SEKME VEYA AŞAĞI OK ile taşıyın. SHIFT + TAB veya YUKARI önceki liste öğesi taşıyın. Liste seçeneği seçmek için SPACE veya ENTER tuşuna basın. Liste kutusunu kapatmak için ESC tuşuna basın.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Element Yol Çubuğu Editörü',
|
||||
legend :
|
||||
'Elementlerin yol çubuğunda gezinmek için ${ElementsPathFocus} basın. SEKME veya SAĞ OK ile sonraki element düğmesine taşıyın. SHIFT + TAB veya SOL OK önceki düğmeye hareket ettirin. Editör içindeki elementi seçmek için ENTER veya SPACE tuşuna basın.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Komutlar',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Komutu geri al',
|
||||
legend : '${undo} basın'
|
||||
},
|
||||
{
|
||||
name : ' Tekrar komutu uygula',
|
||||
legend : '${redo} basın'
|
||||
},
|
||||
{
|
||||
name : ' Kalın komut',
|
||||
legend : '${bold} basın'
|
||||
},
|
||||
{
|
||||
name : ' İtalik komutu',
|
||||
legend : '${italic} basın'
|
||||
},
|
||||
{
|
||||
name : ' Alttan çizgi komutu',
|
||||
legend : '${underline} basın'
|
||||
},
|
||||
{
|
||||
name : ' Bağlantı komutu',
|
||||
legend : '${link} basın'
|
||||
},
|
||||
{
|
||||
name : ' Araç çubuğu Toplama komutu',
|
||||
legend : '${toolbarCollapse} basın'
|
||||
},
|
||||
{
|
||||
name : 'Erişilebilirlik Yardımı',
|
||||
legend : '${a11yHelp} basın'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'ug',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'قوشۇمچە چۈشەندۈرۈش',
|
||||
contents : 'ياردەم مەزمۇنى. بۇ سۆزلەشكۈنى ياپماقچى بولسىڭىز ESC نى بېسىڭ.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'ئادەتتىكى',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'قورال بالداق تەھرىر',
|
||||
legend:
|
||||
'${toolbarFocus} بېسىلسا قورال بالداققا يېتەكلەيدۇ، TAB ياكى SHIFT+TAB ئارقىلىق قورال بالداق گۇرۇپپىسى تاللىنىدۇ، ئوڭ سول يا ئوقتا توپچا تاللىنىدۇ، بوشلۇق ياكى Enter كۇنۇپكىسىدا تاللانغان توپچىنى قوللىنىدۇ.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ سۆزلەشكۈسى',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ تىل مۇھىت تىزىملىكى',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ تىزىمى',
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ ئېلېمېنت يول بالداق',
|
||||
legend :
|
||||
'${elementsPathFocus} بېسىلسا ئېلېمېنت يول بالداققا يېتەكلەيدۇ، TAB ياكى ئوڭ يا ئوقتا كېيىنكى ئېلېمېنت تاللىنىدۇ، SHIFT+TAB ياكى سول يا ئوقتا ئالدىنقى ئېلېمېنت تاللىنىدۇ، بوشلۇق ياكى Enter كۇنۇپكىسىدا تەھرىرلىگۈچتىكى ئېلېمېنت تاللىنىدۇ.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'بۇيرۇق',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'بۇيرۇقتىن يېنىۋال',
|
||||
legend : '${undo} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'قايتىلاش بۇيرۇقى',
|
||||
legend : '${redo} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'توملىتىش بۇيرۇقى',
|
||||
legend : '${bold} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'يانتۇ بۇيرۇقى',
|
||||
legend : '${italic} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'ئاستى سىزىق بۇيرۇقى',
|
||||
legend : '${underline} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'ئۇلانما بۇيرۇقى',
|
||||
legend : '${link} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'قورال بالداق قاتلاش بۇيرۇقى',
|
||||
legend : '${toolbarCollapse} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'توسالغۇسىز لايىھە چۈشەندۈرۈشى',
|
||||
legend : '${a11yHelp} نى بېسىڭ'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'ug',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'قوشۇمچە چۈشەندۈرۈش',
|
||||
contents : 'ياردەم مەزمۇنى. بۇ سۆزلەشكۈنى ياپماقچى بولسىڭىز ESC نى بېسىڭ.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'ئادەتتىكى',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'قورال بالداق تەھرىر',
|
||||
legend:
|
||||
'${toolbarFocus} بېسىلسا قورال بالداققا يېتەكلەيدۇ، TAB ياكى SHIFT+TAB ئارقىلىق قورال بالداق گۇرۇپپىسى تاللىنىدۇ، ئوڭ سول يا ئوقتا توپچا تاللىنىدۇ، بوشلۇق ياكى Enter كۇنۇپكىسىدا تاللانغان توپچىنى قوللىنىدۇ.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ سۆزلەشكۈسى',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ تىل مۇھىت تىزىملىكى',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ تىزىمى',
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'تەھرىرلىگۈچ ئېلېمېنت يول بالداق',
|
||||
legend :
|
||||
'${elementsPathFocus} بېسىلسا ئېلېمېنت يول بالداققا يېتەكلەيدۇ، TAB ياكى ئوڭ يا ئوقتا كېيىنكى ئېلېمېنت تاللىنىدۇ، SHIFT+TAB ياكى سول يا ئوقتا ئالدىنقى ئېلېمېنت تاللىنىدۇ، بوشلۇق ياكى Enter كۇنۇپكىسىدا تەھرىرلىگۈچتىكى ئېلېمېنت تاللىنىدۇ.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'بۇيرۇق',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'بۇيرۇقتىن يېنىۋال',
|
||||
legend : '${undo} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'قايتىلاش بۇيرۇقى',
|
||||
legend : '${redo} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'توملىتىش بۇيرۇقى',
|
||||
legend : '${bold} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'يانتۇ بۇيرۇقى',
|
||||
legend : '${italic} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'ئاستى سىزىق بۇيرۇقى',
|
||||
legend : '${underline} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'ئۇلانما بۇيرۇقى',
|
||||
legend : '${link} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'قورال بالداق قاتلاش بۇيرۇقى',
|
||||
legend : '${toolbarCollapse} نى بېسىڭ'
|
||||
},
|
||||
{
|
||||
name : 'توسالغۇسىز لايىھە چۈشەندۈرۈشى',
|
||||
legend : '${a11yHelp} نى بېسىڭ'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'vi',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Accessibility Instructions', // MISSING
|
||||
contents : 'Nội dung Hỗ trợ. Nhấn ESC để đóng hộp thoại.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Chung',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Thanh công cụ soạn th',
|
||||
legend:
|
||||
'Nhấn ${toolbarFocus} để điều hướng đến thanh công cụ. Nhấn TAB và SHIFT-TAB để chuyển đến nhóm thanh công cụ khác. Nhấn MŨI TÊN PHẢI hoặc MŨI TÊN TRÁI để chuyển sang nút khác trên thanh công cụ. Nhấn PHÍM CÁCH hoặc ENTER để kích hoạt nút trên thanh công c.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Hộp thoại Biên t',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Trình đơn Ngữ cảnh cBộ soạn thảo',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands', // MISSING
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command', // MISSING
|
||||
legend : 'Press ${undo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Redo command', // MISSING
|
||||
legend : 'Press ${redo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Press ${bold}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'vi',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Accessibility Instructions', // MISSING
|
||||
contents : 'Nội dung Hỗ trợ. Nhấn ESC để đóng hộp thoại.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'Chung',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Thanh công cụ soạn th',
|
||||
legend:
|
||||
'Nhấn ${toolbarFocus} để điều hướng đến thanh công cụ. Nhấn TAB và SHIFT-TAB để chuyển đến nhóm thanh công cụ khác. Nhấn MŨI TÊN PHẢI hoặc MŨI TÊN TRÁI để chuyển sang nút khác trên thanh công cụ. Nhấn PHÍM CÁCH hoặc ENTER để kích hoạt nút trên thanh công c.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Hộp thoại Biên t',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Trình đơn Ngữ cảnh cBộ soạn thảo',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box', // MISSING
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar', // MISSING
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands', // MISSING
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command', // MISSING
|
||||
legend : 'Press ${undo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Redo command', // MISSING
|
||||
legend : 'Press ${redo}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Bold command', // MISSING
|
||||
legend : 'Press ${bold}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Italic command', // MISSING
|
||||
legend : 'Press ${italic}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Underline command', // MISSING
|
||||
legend : 'Press ${underline}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Link command', // MISSING
|
||||
legend : 'Press ${link}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command', // MISSING
|
||||
legend : 'Press ${toolbarCollapse}' // MISSING
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help', // MISSING
|
||||
legend : 'Press ${a11yHelp}' // MISSING
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'zh-cn',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : '辅助说明',
|
||||
contents : '帮助内容。要关闭此对话框请按 ESC 键。',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : '常规',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : '编辑器工具栏',
|
||||
legend:
|
||||
'按 ${toolbarFocus} 以导航到工具栏,使用 TAB 键或 SHIFT+TAB 组合键以选择工具栏组,使用左右箭头键以选择按钮,按空格键或回车键以应用选中的按钮。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器对话框',
|
||||
legend :
|
||||
'在对话框内,TAB键移动到下一个字段,SHIFT + TAB 移动到上一个字段,ENTER键提交对话框,ESC键取消对话框。对于有多标签的对话框,用ALT + F10来移到标签列表。然后用TAB键或者向右箭头来移动到下一个标签;SHIFT + TAB或者向左箭头移动到上一个标签。用SPACE或者ENTER选择标签。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器上下文菜单',
|
||||
legend :
|
||||
'用 ${contextMenu}或者 应用程序键 打开上下文菜单。然后用TAB键或者向下箭头来移动到下一个菜单项;SHIFT + TAB或者向上箭头移动到上一个菜单项。用SPACE或者ENTER选择菜单项。用SPACE,ENTER或者向右箭头打开子菜单。返回菜单用ESC键或者向左箭头。用ESC关闭上下文菜单。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器列表框',
|
||||
legend :
|
||||
'在列表框中,移到下一列表项用TAB键或者向下箭头。移到上一列表项用SHIFT + TAB或者向上箭头,用SPACE或者ENTER选择列表项。用ESC收起列表框。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器元素路径栏',
|
||||
legend :
|
||||
'按 ${elementsPathFocus} 以导航到元素路径栏,使用 TAB 键或右箭头键选择下一个元素,使用 SHIFT+TAB 组合键或左箭头键选择上一个元素,按空格键或回车键以选定编辑器里的元素。'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : '命令',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' 撤消命令',
|
||||
legend : '按 ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' 重做命令',
|
||||
legend : '按 ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' 加粗命令',
|
||||
legend : '按 ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' 倾斜命令',
|
||||
legend : '按 ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' 下划线命令',
|
||||
legend : '按 ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' 链接命令',
|
||||
legend : '按 ${link}'
|
||||
},
|
||||
{
|
||||
name : ' 工具栏折叠命令',
|
||||
legend : '按 ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' 无障碍设计说明',
|
||||
legend : '按 ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'zh-cn',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : '辅助说明',
|
||||
contents : '帮助内容。要关闭此对话框请按 ESC 键。',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : '常规',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : '编辑器工具栏',
|
||||
legend:
|
||||
'按 ${toolbarFocus} 以导航到工具栏,使用 TAB 键或 SHIFT+TAB 组合键以选择工具栏组,使用左右箭头键以选择按钮,按空格键或回车键以应用选中的按钮。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器对话框',
|
||||
legend :
|
||||
'在对话框内,TAB键移动到下一个字段,SHIFT + TAB 移动到上一个字段,ENTER键提交对话框,ESC键取消对话框。对于有多标签的对话框,用ALT + F10来移到标签列表。然后用TAB键或者向右箭头来移动到下一个标签;SHIFT + TAB或者向左箭头移动到上一个标签。用SPACE或者ENTER选择标签。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器上下文菜单',
|
||||
legend :
|
||||
'用 ${contextMenu}或者 应用程序键 打开上下文菜单。然后用TAB键或者向下箭头来移动到下一个菜单项;SHIFT + TAB或者向上箭头移动到上一个菜单项。用SPACE或者ENTER选择菜单项。用SPACE,ENTER或者向右箭头打开子菜单。返回菜单用ESC键或者向左箭头。用ESC关闭上下文菜单。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器列表框',
|
||||
legend :
|
||||
'在列表框中,移到下一列表项用TAB键或者向下箭头。移到上一列表项用SHIFT + TAB或者向上箭头,用SPACE或者ENTER选择列表项。用ESC收起列表框。'
|
||||
},
|
||||
|
||||
{
|
||||
name : '编辑器元素路径栏',
|
||||
legend :
|
||||
'按 ${elementsPathFocus} 以导航到元素路径栏,使用 TAB 键或右箭头键选择下一个元素,使用 SHIFT+TAB 组合键或左箭头键选择上一个元素,按空格键或回车键以选定编辑器里的元素。'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : '命令',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' 撤消命令',
|
||||
legend : '按 ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' 重做命令',
|
||||
legend : '按 ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' 加粗命令',
|
||||
legend : '按 ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' 倾斜命令',
|
||||
legend : '按 ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' 下划线命令',
|
||||
legend : '按 ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' 链接命令',
|
||||
legend : '按 ${link}'
|
||||
},
|
||||
{
|
||||
name : ' 工具栏折叠命令',
|
||||
legend : '按 ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' 无障碍设计说明',
|
||||
legend : '按 ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Plugin definition for the a11yhelp, which provides a dialog
|
||||
* with accessibility related help.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var pluginName = 'a11yhelp',
|
||||
commandName = 'a11yHelp';
|
||||
|
||||
CKEDITOR.plugins.add( pluginName,
|
||||
{
|
||||
requires: [ 'dialog' ],
|
||||
|
||||
// List of available localizations.
|
||||
availableLangs : { cs:1, cy:1, da:1, de:1, el:1, en:1, eo:1, fa:1, fi:1, fr:1, gu:1, he:1, it:1, mk:1, nb:1, nl:1, no:1, 'pt-br':1, ro:1, tr:1, ug:1, vi:1, 'zh-cn':1 },
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var plugin = this;
|
||||
editor.addCommand( commandName,
|
||||
{
|
||||
exec : function()
|
||||
{
|
||||
var langCode = editor.langCode;
|
||||
langCode = plugin.availableLangs[ langCode ] ? langCode : 'en';
|
||||
|
||||
CKEDITOR.scriptLoader.load(
|
||||
CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ),
|
||||
function()
|
||||
{
|
||||
CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ langCode ] );
|
||||
editor.openDialog( commandName );
|
||||
});
|
||||
},
|
||||
modes : { wysiwyg:1, source:1 },
|
||||
readOnly : 1,
|
||||
canUndo : false
|
||||
});
|
||||
|
||||
CKEDITOR.dialog.add( commandName, this.path + 'dialogs/a11yhelp.js' );
|
||||
}
|
||||
});
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Plugin definition for the a11yhelp, which provides a dialog
|
||||
* with accessibility related help.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var pluginName = 'a11yhelp',
|
||||
commandName = 'a11yHelp';
|
||||
|
||||
CKEDITOR.plugins.add( pluginName,
|
||||
{
|
||||
requires: [ 'dialog' ],
|
||||
|
||||
// List of available localizations.
|
||||
availableLangs : { cs:1, cy:1, da:1, de:1, el:1, en:1, eo:1, fa:1, fi:1, fr:1, gu:1, he:1, it:1, mk:1, nb:1, nl:1, no:1, 'pt-br':1, ro:1, tr:1, ug:1, vi:1, 'zh-cn':1 },
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var plugin = this;
|
||||
editor.addCommand( commandName,
|
||||
{
|
||||
exec : function()
|
||||
{
|
||||
var langCode = editor.langCode;
|
||||
langCode = plugin.availableLangs[ langCode ] ? langCode : 'en';
|
||||
|
||||
CKEDITOR.scriptLoader.load(
|
||||
CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ),
|
||||
function()
|
||||
{
|
||||
CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ langCode ] );
|
||||
editor.openDialog( commandName );
|
||||
});
|
||||
},
|
||||
modes : { wysiwyg:1, source:1 },
|
||||
readOnly : 1,
|
||||
canUndo : false
|
||||
});
|
||||
|
||||
CKEDITOR.dialog.add( commandName, this.path + 'dialogs/a11yhelp.js' );
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'about', function( editor )
|
||||
{
|
||||
var lang = editor.lang.about;
|
||||
|
||||
return {
|
||||
title : CKEDITOR.env.ie ? lang.dlgTitle : lang.title,
|
||||
minWidth : 390,
|
||||
minHeight : 230,
|
||||
contents : [
|
||||
{
|
||||
id : 'tab1',
|
||||
label : '',
|
||||
title : '',
|
||||
expand : true,
|
||||
padding : 0,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html :
|
||||
'<style type="text/css">' +
|
||||
'.cke_about_container' +
|
||||
'{' +
|
||||
'color:#000 !important;' +
|
||||
'padding:10px 10px 0;' +
|
||||
'margin-top:5px' +
|
||||
'}' +
|
||||
'.cke_about_container p' +
|
||||
'{' +
|
||||
'margin: 0 0 10px;' +
|
||||
'}' +
|
||||
'.cke_about_container .cke_about_logo' +
|
||||
'{' +
|
||||
'height:81px;' +
|
||||
'background-color:#fff;' +
|
||||
'background-image:url(' + CKEDITOR.plugins.get( 'about' ).path + 'dialogs/logo_ckeditor.png);' +
|
||||
'background-position:center; ' +
|
||||
'background-repeat:no-repeat;' +
|
||||
'margin-bottom:10px;' +
|
||||
'}' +
|
||||
'.cke_about_container a' +
|
||||
'{' +
|
||||
'cursor:pointer !important;' +
|
||||
'color:blue !important;' +
|
||||
'text-decoration:underline !important;' +
|
||||
'}' +
|
||||
'</style>' +
|
||||
'<div class="cke_about_container">' +
|
||||
'<div class="cke_about_logo"></div>' +
|
||||
'<p>' +
|
||||
'CKEditor ' + CKEDITOR.version + ' (revision ' + CKEDITOR.revision + ')<br>' +
|
||||
'<a href="http://ckeditor.com/">http://ckeditor.com</a>' +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.help.replace( '$1', '<a href="http://docs.cksource.com/CKEditor_3.x/Users_Guide/Quick_Reference">' + lang.userGuide + '</a>' ) +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.moreInfo + '<br>' +
|
||||
'<a href="http://ckeditor.com/license">http://ckeditor.com/license</a>' +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.copy.replace( '$1', '<a href="http://cksource.com/">CKSource</a> - Frederico Knabben' ) +
|
||||
'</p>' +
|
||||
'</div>'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ]
|
||||
};
|
||||
} );
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'about', function( editor )
|
||||
{
|
||||
var lang = editor.lang.about;
|
||||
|
||||
return {
|
||||
title : CKEDITOR.env.ie ? lang.dlgTitle : lang.title,
|
||||
minWidth : 390,
|
||||
minHeight : 230,
|
||||
contents : [
|
||||
{
|
||||
id : 'tab1',
|
||||
label : '',
|
||||
title : '',
|
||||
expand : true,
|
||||
padding : 0,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html :
|
||||
'<style type="text/css">' +
|
||||
'.cke_about_container' +
|
||||
'{' +
|
||||
'color:#000 !important;' +
|
||||
'padding:10px 10px 0;' +
|
||||
'margin-top:5px' +
|
||||
'}' +
|
||||
'.cke_about_container p' +
|
||||
'{' +
|
||||
'margin: 0 0 10px;' +
|
||||
'}' +
|
||||
'.cke_about_container .cke_about_logo' +
|
||||
'{' +
|
||||
'height:81px;' +
|
||||
'background-color:#fff;' +
|
||||
'background-image:url(' + CKEDITOR.plugins.get( 'about' ).path + 'dialogs/logo_ckeditor.png);' +
|
||||
'background-position:center; ' +
|
||||
'background-repeat:no-repeat;' +
|
||||
'margin-bottom:10px;' +
|
||||
'}' +
|
||||
'.cke_about_container a' +
|
||||
'{' +
|
||||
'cursor:pointer !important;' +
|
||||
'color:blue !important;' +
|
||||
'text-decoration:underline !important;' +
|
||||
'}' +
|
||||
'</style>' +
|
||||
'<div class="cke_about_container">' +
|
||||
'<div class="cke_about_logo"></div>' +
|
||||
'<p>' +
|
||||
'CKEditor ' + CKEDITOR.version + ' (revision ' + CKEDITOR.revision + ')<br>' +
|
||||
'<a href="http://ckeditor.com/">http://ckeditor.com</a>' +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.help.replace( '$1', '<a href="http://docs.cksource.com/CKEditor_3.x/Users_Guide/Quick_Reference">' + lang.userGuide + '</a>' ) +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.moreInfo + '<br>' +
|
||||
'<a href="http://ckeditor.com/license">http://ckeditor.com/license</a>' +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.copy.replace( '$1', '<a href="http://cksource.com/">CKSource</a> - Frederico Knabben' ) +
|
||||
'</p>' +
|
||||
'</div>'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ]
|
||||
};
|
||||
} );
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'about',
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
init : function( editor )
|
||||
{
|
||||
var command = editor.addCommand( 'about', new CKEDITOR.dialogCommand( 'about' ) );
|
||||
command.modes = { wysiwyg:1, source:1 };
|
||||
command.canUndo = false;
|
||||
command.readOnly = 1;
|
||||
|
||||
editor.ui.addButton( 'About',
|
||||
{
|
||||
label : editor.lang.about.title,
|
||||
command : 'about'
|
||||
});
|
||||
|
||||
CKEDITOR.dialog.add( 'about', this.path + 'dialogs/about.js' );
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'about',
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
init : function( editor )
|
||||
{
|
||||
var command = editor.addCommand( 'about', new CKEDITOR.dialogCommand( 'about' ) );
|
||||
command.modes = { wysiwyg:1, source:1 };
|
||||
command.canUndo = false;
|
||||
command.readOnly = 1;
|
||||
|
||||
editor.ui.addButton( 'About',
|
||||
{
|
||||
label : editor.lang.about.title,
|
||||
command : 'about'
|
||||
});
|
||||
|
||||
CKEDITOR.dialog.add( 'about', this.path + 'dialogs/about.js' );
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,228 +1,228 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var eventNameList = [ 'click', 'keydown', 'mousedown', 'keypress', 'mouseover', 'mouseout' ];
|
||||
|
||||
// Inline event callbacks assigned via innerHTML/outerHTML, such as
|
||||
// onclick/onmouseover, are ignored in AIR.
|
||||
// Use DOM2 event listeners to substitue inline handlers instead.
|
||||
function convertInlineHandlers( container )
|
||||
{
|
||||
// TODO: document.querySelectorAll is not supported in AIR.
|
||||
var children = container.getElementsByTag( '*' ),
|
||||
count = children.count(),
|
||||
child;
|
||||
|
||||
for ( var i = 0; i < count; i++ )
|
||||
{
|
||||
child = children.getItem( i );
|
||||
|
||||
(function( node )
|
||||
{
|
||||
for ( var j = 0; j < eventNameList.length; j++ )
|
||||
{
|
||||
(function( eventName )
|
||||
{
|
||||
var inlineEventHandler = node.getAttribute( 'on' + eventName );
|
||||
if ( node.hasAttribute( 'on' + eventName ) )
|
||||
{
|
||||
node.removeAttribute( 'on' + eventName );
|
||||
node.on( eventName, function( evt )
|
||||
{
|
||||
var callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ),
|
||||
hasReturn = callFunc && callFunc[ 1 ],
|
||||
callFuncArgs = callFunc && callFunc[ 2 ].split( ',' ),
|
||||
preventDefault = /return false;/.test( inlineEventHandler );
|
||||
|
||||
if ( callFuncArgs )
|
||||
{
|
||||
var nums = callFuncArgs.length,
|
||||
argName;
|
||||
|
||||
for ( var i = 0; i < nums; i++ )
|
||||
{
|
||||
// Trim spaces around param.
|
||||
callFuncArgs[ i ] = argName = CKEDITOR.tools.trim( callFuncArgs[ i ] );
|
||||
|
||||
// String form param.
|
||||
var strPattern = argName.match( /^(["'])([^"']*?)\1$/ );
|
||||
if ( strPattern )
|
||||
{
|
||||
callFuncArgs[ i ] = strPattern[ 2 ];
|
||||
continue;
|
||||
}
|
||||
|
||||
// Integer form param.
|
||||
if ( argName.match( /\d+/ ) )
|
||||
{
|
||||
callFuncArgs[ i ] = parseInt( argName, 10 );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Speical variables.
|
||||
switch( argName )
|
||||
{
|
||||
case 'this' :
|
||||
callFuncArgs[ i ] = node.$;
|
||||
break;
|
||||
case 'event' :
|
||||
callFuncArgs[ i ] = evt.data.$;
|
||||
break;
|
||||
case 'null' :
|
||||
callFuncArgs [ i ] = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var retval = CKEDITOR.tools.callFunction.apply( window, callFuncArgs );
|
||||
if ( hasReturn && retval === false )
|
||||
preventDefault = 1;
|
||||
}
|
||||
|
||||
if ( preventDefault )
|
||||
evt.data.preventDefault();
|
||||
});
|
||||
}
|
||||
})( eventNameList[ j ] );
|
||||
}
|
||||
})( child );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'adobeair',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
if ( !CKEDITOR.env.air )
|
||||
return;
|
||||
|
||||
// Body doesn't get default margin on AIR.
|
||||
editor.addCss( 'body { padding: 8px }' );
|
||||
|
||||
editor.on( 'uiReady', function()
|
||||
{
|
||||
convertInlineHandlers( editor.container );
|
||||
|
||||
if ( editor.sharedSpaces )
|
||||
{
|
||||
for ( var space in editor.sharedSpaces )
|
||||
convertInlineHandlers( editor.sharedSpaces[ space ] );
|
||||
}
|
||||
|
||||
editor.on( 'elementsPathUpdate', function( evt ) { convertInlineHandlers( evt.data.space ); } );
|
||||
});
|
||||
|
||||
editor.on( 'contentDom', function()
|
||||
{
|
||||
// Hyperlinks are enabled in editable documents in Adobe
|
||||
// AIR. Prevent their click behavior.
|
||||
editor.document.on( 'click', function( ev )
|
||||
{
|
||||
ev.data.preventDefault( true );
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.ui.on( 'ready', function( evt )
|
||||
{
|
||||
var ui = evt.data;
|
||||
// richcombo, panelbutton and menu
|
||||
if ( ui._.panel )
|
||||
{
|
||||
var panel = ui._.panel._.panel,
|
||||
holder;
|
||||
|
||||
( function()
|
||||
{
|
||||
// Adding dom event listeners off-line are not supported in AIR,
|
||||
// waiting for panel iframe loaded.
|
||||
if ( !panel.isLoaded )
|
||||
{
|
||||
setTimeout( arguments.callee, 30 );
|
||||
return;
|
||||
}
|
||||
holder = panel._.holder;
|
||||
convertInlineHandlers( holder );
|
||||
})();
|
||||
}
|
||||
else if ( ui instanceof CKEDITOR.dialog )
|
||||
convertInlineHandlers( ui._.element );
|
||||
});
|
||||
})();
|
||||
|
||||
CKEDITOR.dom.document.prototype.write = CKEDITOR.tools.override( CKEDITOR.dom.document.prototype.write,
|
||||
function( original_write )
|
||||
{
|
||||
function appendElement( parent, tagName, fullTag, text )
|
||||
{
|
||||
var node = parent.append( tagName ),
|
||||
attrs = CKEDITOR.htmlParser.fragment.fromHtml( fullTag ).children[ 0 ].attributes;
|
||||
attrs && node.setAttributes( attrs );
|
||||
text && node.append( parent.getDocument().createText( text ) );
|
||||
}
|
||||
|
||||
return function( html, mode )
|
||||
{
|
||||
// document.write() or document.writeln() fail silently after
|
||||
// the page load event in Adobe AIR.
|
||||
// DOM manipulation could be used instead.
|
||||
if ( this.getBody() )
|
||||
{
|
||||
// We're taking the below extra work only because innerHTML
|
||||
// on <html> element doesn't work as expected.
|
||||
var doc = this,
|
||||
head = this.getHead();
|
||||
|
||||
// Create style nodes for inline css. ( <style> content doesn't applied when setting via innerHTML )
|
||||
html = html.replace( /(<style[^>]*>)([\s\S]*?)<\/style>/gi,
|
||||
function ( match, startTag, styleText )
|
||||
{
|
||||
appendElement( head, 'style', startTag, styleText );
|
||||
return '';
|
||||
});
|
||||
|
||||
html = html.replace( /<base\b[^>]*\/>/i,
|
||||
function( match )
|
||||
{
|
||||
appendElement( head, 'base', match );
|
||||
return '';
|
||||
});
|
||||
|
||||
html = html.replace( /<title>([\s\S]*)<\/title>/i,
|
||||
function( match, title )
|
||||
{
|
||||
doc.$.title = title;
|
||||
return '';
|
||||
});
|
||||
|
||||
// Move the rest of head stuff.
|
||||
html = html.replace( /<head>([\s\S]*)<\/head>/i,
|
||||
function( headHtml )
|
||||
{
|
||||
// Inject the <head> HTML inside a <div>.
|
||||
// Do that before getDocumentHead because WebKit moves
|
||||
// <link css> elements to the <head> at this point.
|
||||
var div = new CKEDITOR.dom.element( 'div', doc );
|
||||
div.setHtml( headHtml );
|
||||
// Move the <div> nodes to <head>.
|
||||
div.moveChildren( head );
|
||||
return '';
|
||||
});
|
||||
|
||||
html.replace( /(<body[^>]*>)([\s\S]*)(?=$|<\/body>)/i,
|
||||
function( match, startTag, innerHTML )
|
||||
{
|
||||
doc.getBody().setHtml( innerHTML );
|
||||
var attrs = CKEDITOR.htmlParser.fragment.fromHtml( startTag ).children[ 0 ].attributes;
|
||||
attrs && doc.getBody().setAttributes( attrs );
|
||||
});
|
||||
}
|
||||
else
|
||||
original_write.apply( this, arguments );
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var eventNameList = [ 'click', 'keydown', 'mousedown', 'keypress', 'mouseover', 'mouseout' ];
|
||||
|
||||
// Inline event callbacks assigned via innerHTML/outerHTML, such as
|
||||
// onclick/onmouseover, are ignored in AIR.
|
||||
// Use DOM2 event listeners to substitue inline handlers instead.
|
||||
function convertInlineHandlers( container )
|
||||
{
|
||||
// TODO: document.querySelectorAll is not supported in AIR.
|
||||
var children = container.getElementsByTag( '*' ),
|
||||
count = children.count(),
|
||||
child;
|
||||
|
||||
for ( var i = 0; i < count; i++ )
|
||||
{
|
||||
child = children.getItem( i );
|
||||
|
||||
(function( node )
|
||||
{
|
||||
for ( var j = 0; j < eventNameList.length; j++ )
|
||||
{
|
||||
(function( eventName )
|
||||
{
|
||||
var inlineEventHandler = node.getAttribute( 'on' + eventName );
|
||||
if ( node.hasAttribute( 'on' + eventName ) )
|
||||
{
|
||||
node.removeAttribute( 'on' + eventName );
|
||||
node.on( eventName, function( evt )
|
||||
{
|
||||
var callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ),
|
||||
hasReturn = callFunc && callFunc[ 1 ],
|
||||
callFuncArgs = callFunc && callFunc[ 2 ].split( ',' ),
|
||||
preventDefault = /return false;/.test( inlineEventHandler );
|
||||
|
||||
if ( callFuncArgs )
|
||||
{
|
||||
var nums = callFuncArgs.length,
|
||||
argName;
|
||||
|
||||
for ( var i = 0; i < nums; i++ )
|
||||
{
|
||||
// Trim spaces around param.
|
||||
callFuncArgs[ i ] = argName = CKEDITOR.tools.trim( callFuncArgs[ i ] );
|
||||
|
||||
// String form param.
|
||||
var strPattern = argName.match( /^(["'])([^"']*?)\1$/ );
|
||||
if ( strPattern )
|
||||
{
|
||||
callFuncArgs[ i ] = strPattern[ 2 ];
|
||||
continue;
|
||||
}
|
||||
|
||||
// Integer form param.
|
||||
if ( argName.match( /\d+/ ) )
|
||||
{
|
||||
callFuncArgs[ i ] = parseInt( argName, 10 );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Speical variables.
|
||||
switch( argName )
|
||||
{
|
||||
case 'this' :
|
||||
callFuncArgs[ i ] = node.$;
|
||||
break;
|
||||
case 'event' :
|
||||
callFuncArgs[ i ] = evt.data.$;
|
||||
break;
|
||||
case 'null' :
|
||||
callFuncArgs [ i ] = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var retval = CKEDITOR.tools.callFunction.apply( window, callFuncArgs );
|
||||
if ( hasReturn && retval === false )
|
||||
preventDefault = 1;
|
||||
}
|
||||
|
||||
if ( preventDefault )
|
||||
evt.data.preventDefault();
|
||||
});
|
||||
}
|
||||
})( eventNameList[ j ] );
|
||||
}
|
||||
})( child );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'adobeair',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
if ( !CKEDITOR.env.air )
|
||||
return;
|
||||
|
||||
// Body doesn't get default margin on AIR.
|
||||
editor.addCss( 'body { padding: 8px }' );
|
||||
|
||||
editor.on( 'uiReady', function()
|
||||
{
|
||||
convertInlineHandlers( editor.container );
|
||||
|
||||
if ( editor.sharedSpaces )
|
||||
{
|
||||
for ( var space in editor.sharedSpaces )
|
||||
convertInlineHandlers( editor.sharedSpaces[ space ] );
|
||||
}
|
||||
|
||||
editor.on( 'elementsPathUpdate', function( evt ) { convertInlineHandlers( evt.data.space ); } );
|
||||
});
|
||||
|
||||
editor.on( 'contentDom', function()
|
||||
{
|
||||
// Hyperlinks are enabled in editable documents in Adobe
|
||||
// AIR. Prevent their click behavior.
|
||||
editor.document.on( 'click', function( ev )
|
||||
{
|
||||
ev.data.preventDefault( true );
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.ui.on( 'ready', function( evt )
|
||||
{
|
||||
var ui = evt.data;
|
||||
// richcombo, panelbutton and menu
|
||||
if ( ui._.panel )
|
||||
{
|
||||
var panel = ui._.panel._.panel,
|
||||
holder;
|
||||
|
||||
( function()
|
||||
{
|
||||
// Adding dom event listeners off-line are not supported in AIR,
|
||||
// waiting for panel iframe loaded.
|
||||
if ( !panel.isLoaded )
|
||||
{
|
||||
setTimeout( arguments.callee, 30 );
|
||||
return;
|
||||
}
|
||||
holder = panel._.holder;
|
||||
convertInlineHandlers( holder );
|
||||
})();
|
||||
}
|
||||
else if ( ui instanceof CKEDITOR.dialog )
|
||||
convertInlineHandlers( ui._.element );
|
||||
});
|
||||
})();
|
||||
|
||||
CKEDITOR.dom.document.prototype.write = CKEDITOR.tools.override( CKEDITOR.dom.document.prototype.write,
|
||||
function( original_write )
|
||||
{
|
||||
function appendElement( parent, tagName, fullTag, text )
|
||||
{
|
||||
var node = parent.append( tagName ),
|
||||
attrs = CKEDITOR.htmlParser.fragment.fromHtml( fullTag ).children[ 0 ].attributes;
|
||||
attrs && node.setAttributes( attrs );
|
||||
text && node.append( parent.getDocument().createText( text ) );
|
||||
}
|
||||
|
||||
return function( html, mode )
|
||||
{
|
||||
// document.write() or document.writeln() fail silently after
|
||||
// the page load event in Adobe AIR.
|
||||
// DOM manipulation could be used instead.
|
||||
if ( this.getBody() )
|
||||
{
|
||||
// We're taking the below extra work only because innerHTML
|
||||
// on <html> element doesn't work as expected.
|
||||
var doc = this,
|
||||
head = this.getHead();
|
||||
|
||||
// Create style nodes for inline css. ( <style> content doesn't applied when setting via innerHTML )
|
||||
html = html.replace( /(<style[^>]*>)([\s\S]*?)<\/style>/gi,
|
||||
function ( match, startTag, styleText )
|
||||
{
|
||||
appendElement( head, 'style', startTag, styleText );
|
||||
return '';
|
||||
});
|
||||
|
||||
html = html.replace( /<base\b[^>]*\/>/i,
|
||||
function( match )
|
||||
{
|
||||
appendElement( head, 'base', match );
|
||||
return '';
|
||||
});
|
||||
|
||||
html = html.replace( /<title>([\s\S]*)<\/title>/i,
|
||||
function( match, title )
|
||||
{
|
||||
doc.$.title = title;
|
||||
return '';
|
||||
});
|
||||
|
||||
// Move the rest of head stuff.
|
||||
html = html.replace( /<head>([\s\S]*)<\/head>/i,
|
||||
function( headHtml )
|
||||
{
|
||||
// Inject the <head> HTML inside a <div>.
|
||||
// Do that before getDocumentHead because WebKit moves
|
||||
// <link css> elements to the <head> at this point.
|
||||
var div = new CKEDITOR.dom.element( 'div', doc );
|
||||
div.setHtml( headHtml );
|
||||
// Move the <div> nodes to <head>.
|
||||
div.moveChildren( head );
|
||||
return '';
|
||||
});
|
||||
|
||||
html.replace( /(<body[^>]*>)([\s\S]*)(?=$|<\/body>)/i,
|
||||
function( match, startTag, innerHTML )
|
||||
{
|
||||
doc.getBody().setHtml( innerHTML );
|
||||
var attrs = CKEDITOR.htmlParser.fragment.fromHtml( startTag ).children[ 0 ].attributes;
|
||||
attrs && doc.getBody().setAttributes( attrs );
|
||||
});
|
||||
}
|
||||
else
|
||||
original_write.apply( this, arguments );
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,152 +1,152 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for
|
||||
* data loading.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'ajax',
|
||||
{
|
||||
requires : [ 'xml' ]
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax methods for data loading.
|
||||
* @namespace
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ajax = (function()
|
||||
{
|
||||
var createXMLHttpRequest = function()
|
||||
{
|
||||
// In IE, using the native XMLHttpRequest for local files may throw
|
||||
// "Access is Denied" errors.
|
||||
if ( !CKEDITOR.env.ie || location.protocol != 'file:' )
|
||||
try { return new XMLHttpRequest(); } catch(e) {}
|
||||
|
||||
try { return new ActiveXObject( 'Msxml2.XMLHTTP' ); } catch (e) {}
|
||||
try { return new ActiveXObject( 'Microsoft.XMLHTTP' ); } catch (e) {}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
var checkStatus = function( xhr )
|
||||
{
|
||||
// HTTP Status Codes:
|
||||
// 2xx : Success
|
||||
// 304 : Not Modified
|
||||
// 0 : Returned when running locally (file://)
|
||||
// 1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450)
|
||||
|
||||
return ( xhr.readyState == 4 &&
|
||||
( ( xhr.status >= 200 && xhr.status < 300 ) ||
|
||||
xhr.status == 304 ||
|
||||
xhr.status === 0 ||
|
||||
xhr.status == 1223 ) );
|
||||
};
|
||||
|
||||
var getResponseText = function( xhr )
|
||||
{
|
||||
if ( checkStatus( xhr ) )
|
||||
return xhr.responseText;
|
||||
return null;
|
||||
};
|
||||
|
||||
var getResponseXml = function( xhr )
|
||||
{
|
||||
if ( checkStatus( xhr ) )
|
||||
{
|
||||
var xml = xhr.responseXML;
|
||||
return new CKEDITOR.xml( xml && xml.firstChild ? xml : xhr.responseText );
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
var load = function( url, callback, getResponseFn )
|
||||
{
|
||||
var async = !!callback;
|
||||
|
||||
var xhr = createXMLHttpRequest();
|
||||
|
||||
if ( !xhr )
|
||||
return null;
|
||||
|
||||
xhr.open( 'GET', url, async );
|
||||
|
||||
if ( async )
|
||||
{
|
||||
// TODO: perform leak checks on this closure.
|
||||
/** @ignore */
|
||||
xhr.onreadystatechange = function()
|
||||
{
|
||||
if ( xhr.readyState == 4 )
|
||||
{
|
||||
callback( getResponseFn( xhr ) );
|
||||
xhr = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
xhr.send(null);
|
||||
|
||||
return async ? '' : getResponseFn( xhr );
|
||||
};
|
||||
|
||||
return /** @lends CKEDITOR.ajax */ {
|
||||
|
||||
/**
|
||||
* Loads data from an URL as plain text.
|
||||
* @param {String} url The URL from which load data.
|
||||
* @param {Function} [callback] A callback function to be called on
|
||||
* data load. If not provided, the data will be loaded
|
||||
* synchronously.
|
||||
* @returns {String} The loaded data. For asynchronous requests, an
|
||||
* empty string. For invalid requests, null.
|
||||
* @example
|
||||
* // Load data synchronously.
|
||||
* var data = CKEDITOR.ajax.load( 'somedata.txt' );
|
||||
* alert( data );
|
||||
* @example
|
||||
* // Load data asynchronously.
|
||||
* var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
|
||||
* {
|
||||
* alert( data );
|
||||
* } );
|
||||
*/
|
||||
load : function( url, callback )
|
||||
{
|
||||
return load( url, callback, getResponseText );
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads data from an URL as XML.
|
||||
* @param {String} url The URL from which load data.
|
||||
* @param {Function} [callback] A callback function to be called on
|
||||
* data load. If not provided, the data will be loaded
|
||||
* synchronously.
|
||||
* @returns {CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an
|
||||
* empty string. For invalid requests, null.
|
||||
* @example
|
||||
* // Load XML synchronously.
|
||||
* var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
|
||||
* alert( xml.getInnerXml( '//' ) );
|
||||
* @example
|
||||
* // Load XML asynchronously.
|
||||
* var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
|
||||
* {
|
||||
* alert( xml.getInnerXml( '//' ) );
|
||||
* } );
|
||||
*/
|
||||
loadXml : function( url, callback )
|
||||
{
|
||||
return load( url, callback, getResponseXml );
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for
|
||||
* data loading.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'ajax',
|
||||
{
|
||||
requires : [ 'xml' ]
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax methods for data loading.
|
||||
* @namespace
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ajax = (function()
|
||||
{
|
||||
var createXMLHttpRequest = function()
|
||||
{
|
||||
// In IE, using the native XMLHttpRequest for local files may throw
|
||||
// "Access is Denied" errors.
|
||||
if ( !CKEDITOR.env.ie || location.protocol != 'file:' )
|
||||
try { return new XMLHttpRequest(); } catch(e) {}
|
||||
|
||||
try { return new ActiveXObject( 'Msxml2.XMLHTTP' ); } catch (e) {}
|
||||
try { return new ActiveXObject( 'Microsoft.XMLHTTP' ); } catch (e) {}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
var checkStatus = function( xhr )
|
||||
{
|
||||
// HTTP Status Codes:
|
||||
// 2xx : Success
|
||||
// 304 : Not Modified
|
||||
// 0 : Returned when running locally (file://)
|
||||
// 1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450)
|
||||
|
||||
return ( xhr.readyState == 4 &&
|
||||
( ( xhr.status >= 200 && xhr.status < 300 ) ||
|
||||
xhr.status == 304 ||
|
||||
xhr.status === 0 ||
|
||||
xhr.status == 1223 ) );
|
||||
};
|
||||
|
||||
var getResponseText = function( xhr )
|
||||
{
|
||||
if ( checkStatus( xhr ) )
|
||||
return xhr.responseText;
|
||||
return null;
|
||||
};
|
||||
|
||||
var getResponseXml = function( xhr )
|
||||
{
|
||||
if ( checkStatus( xhr ) )
|
||||
{
|
||||
var xml = xhr.responseXML;
|
||||
return new CKEDITOR.xml( xml && xml.firstChild ? xml : xhr.responseText );
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
var load = function( url, callback, getResponseFn )
|
||||
{
|
||||
var async = !!callback;
|
||||
|
||||
var xhr = createXMLHttpRequest();
|
||||
|
||||
if ( !xhr )
|
||||
return null;
|
||||
|
||||
xhr.open( 'GET', url, async );
|
||||
|
||||
if ( async )
|
||||
{
|
||||
// TODO: perform leak checks on this closure.
|
||||
/** @ignore */
|
||||
xhr.onreadystatechange = function()
|
||||
{
|
||||
if ( xhr.readyState == 4 )
|
||||
{
|
||||
callback( getResponseFn( xhr ) );
|
||||
xhr = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
xhr.send(null);
|
||||
|
||||
return async ? '' : getResponseFn( xhr );
|
||||
};
|
||||
|
||||
return /** @lends CKEDITOR.ajax */ {
|
||||
|
||||
/**
|
||||
* Loads data from an URL as plain text.
|
||||
* @param {String} url The URL from which load data.
|
||||
* @param {Function} [callback] A callback function to be called on
|
||||
* data load. If not provided, the data will be loaded
|
||||
* synchronously.
|
||||
* @returns {String} The loaded data. For asynchronous requests, an
|
||||
* empty string. For invalid requests, null.
|
||||
* @example
|
||||
* // Load data synchronously.
|
||||
* var data = CKEDITOR.ajax.load( 'somedata.txt' );
|
||||
* alert( data );
|
||||
* @example
|
||||
* // Load data asynchronously.
|
||||
* var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
|
||||
* {
|
||||
* alert( data );
|
||||
* } );
|
||||
*/
|
||||
load : function( url, callback )
|
||||
{
|
||||
return load( url, callback, getResponseText );
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads data from an URL as XML.
|
||||
* @param {String} url The URL from which load data.
|
||||
* @param {Function} [callback] A callback function to be called on
|
||||
* data load. If not provided, the data will be loaded
|
||||
* synchronously.
|
||||
* @returns {CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an
|
||||
* empty string. For invalid requests, null.
|
||||
* @example
|
||||
* // Load XML synchronously.
|
||||
* var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
|
||||
* alert( xml.getInnerXml( '//' ) );
|
||||
* @example
|
||||
* // Load XML asynchronously.
|
||||
* var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
|
||||
* {
|
||||
* alert( xml.getInnerXml( '//' ) );
|
||||
* } );
|
||||
*/
|
||||
loadXml : function( url, callback )
|
||||
{
|
||||
return load( url, callback, getResponseXml );
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,141 +1,141 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file AutoGrow plugin
|
||||
*/
|
||||
(function(){
|
||||
|
||||
// Actual content height, figured out by appending check the last element's document position.
|
||||
function contentHeight( scrollable )
|
||||
{
|
||||
var overflowY = scrollable.getStyle( 'overflow-y' );
|
||||
|
||||
var doc = scrollable.getDocument();
|
||||
// Create a temporary marker element.
|
||||
var marker = CKEDITOR.dom.element.createFromHtml( '<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">' + ( CKEDITOR.env.webkit ? ' ' : '' ) + '</span>', doc );
|
||||
doc[ CKEDITOR.env.ie? 'getBody' : 'getDocumentElement']().append( marker );
|
||||
|
||||
var height = marker.getDocumentPosition( doc ).y + marker.$.offsetHeight;
|
||||
marker.remove();
|
||||
scrollable.setStyle( 'overflow-y', overflowY );
|
||||
return height;
|
||||
}
|
||||
|
||||
var resizeEditor = function( editor )
|
||||
{
|
||||
if ( !editor.window )
|
||||
return;
|
||||
|
||||
var doc = editor.document,
|
||||
iframe = new CKEDITOR.dom.element( doc.getWindow().$.frameElement ),
|
||||
body = doc.getBody(),
|
||||
htmlElement = doc.getDocumentElement(),
|
||||
currentHeight = editor.window.getViewPaneSize().height,
|
||||
// Quirks mode overflows body, standards overflows document element
|
||||
scrollable = doc.$.compatMode == 'BackCompat' ? body : htmlElement,
|
||||
newHeight = contentHeight( scrollable );
|
||||
|
||||
// Additional space specified by user.
|
||||
newHeight += ( editor.config.autoGrow_bottomSpace || 0 );
|
||||
|
||||
var min = editor.config.autoGrow_minHeight != undefined ? editor.config.autoGrow_minHeight : 200,
|
||||
max = editor.config.autoGrow_maxHeight || Infinity;
|
||||
|
||||
newHeight = Math.max( newHeight, min );
|
||||
newHeight = Math.min( newHeight, max );
|
||||
|
||||
if ( newHeight != currentHeight )
|
||||
{
|
||||
newHeight = editor.fire( 'autoGrow', { currentHeight : currentHeight, newHeight : newHeight } ).newHeight;
|
||||
editor.resize( editor.container.getStyle( 'width' ), newHeight, true );
|
||||
}
|
||||
|
||||
if ( scrollable.$.scrollHeight > scrollable.$.clientHeight && newHeight < max )
|
||||
scrollable.setStyle( 'overflow-y', 'hidden' );
|
||||
else
|
||||
scrollable.removeStyle( 'overflow-y' );
|
||||
|
||||
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'autogrow',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'autogrow', { exec : resizeEditor, modes : { wysiwyg:1 }, readOnly: 1, canUndo: false, editorFocus: false } );
|
||||
|
||||
var eventsList = { contentDom:1, key:1, selectionChange:1, insertElement:1, mode:1 };
|
||||
editor.config.autoGrow_onStartup && ( eventsList[ 'instanceReady' ] = 1 );
|
||||
for ( var eventName in eventsList )
|
||||
{
|
||||
editor.on( eventName, function( evt )
|
||||
{
|
||||
var maximize = editor.getCommand( 'maximize' );
|
||||
// Some time is required for insertHtml, and it gives other events better performance as well.
|
||||
if ( evt.editor.mode == 'wysiwyg' &&
|
||||
// Disable autogrow when the editor is maximized .(#6339)
|
||||
( !maximize || maximize.state != CKEDITOR.TRISTATE_ON ) )
|
||||
{
|
||||
setTimeout( function()
|
||||
{
|
||||
resizeEditor( evt.editor );
|
||||
// Second pass to make correction upon
|
||||
// the first resize, e.g. scrollbar.
|
||||
resizeEditor( evt.editor );
|
||||
}, 100 );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
/**
|
||||
* The minimum height that the editor can reach using the AutoGrow feature.
|
||||
* @name CKEDITOR.config.autoGrow_minHeight
|
||||
* @type Number
|
||||
* @default <code>200</code>
|
||||
* @since 3.4
|
||||
* @example
|
||||
* config.autoGrow_minHeight = 300;
|
||||
*/
|
||||
|
||||
/**
|
||||
* The maximum height that the editor can reach using the AutoGrow feature. Zero means unlimited.
|
||||
* @name CKEDITOR.config.autoGrow_maxHeight
|
||||
* @type Number
|
||||
* @default <code>0</code>
|
||||
* @since 3.4
|
||||
* @example
|
||||
* config.autoGrow_maxHeight = 400;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether to have the auto grow happen on editor creation.
|
||||
* @name CKEDITOR.config.autoGrow_onStartup
|
||||
* @type Boolean
|
||||
* @default false
|
||||
* @since 3.6.2
|
||||
* @example
|
||||
* config.autoGrow_onStartup = true;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the AutoGrow plugin is about to change the size of the editor.
|
||||
* @name CKEDITOR.editor#autogrow
|
||||
* @event
|
||||
* @param {Number} data.currentHeight The current height of the editor (before resizing).
|
||||
* @param {Number} data.newHeight The new height of the editor (after resizing). It can be changed
|
||||
* to determine a different height value to be used instead.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Extra height in pixel to leave between the bottom boundary of content with document size when auto resizing.
|
||||
* @name CKEDITOR.config.autoGrow_bottomSpace
|
||||
* @type Number
|
||||
* @default 0
|
||||
* @since 3.6.2
|
||||
*/
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file AutoGrow plugin
|
||||
*/
|
||||
(function(){
|
||||
|
||||
// Actual content height, figured out by appending check the last element's document position.
|
||||
function contentHeight( scrollable )
|
||||
{
|
||||
var overflowY = scrollable.getStyle( 'overflow-y' );
|
||||
|
||||
var doc = scrollable.getDocument();
|
||||
// Create a temporary marker element.
|
||||
var marker = CKEDITOR.dom.element.createFromHtml( '<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">' + ( CKEDITOR.env.webkit ? ' ' : '' ) + '</span>', doc );
|
||||
doc[ CKEDITOR.env.ie? 'getBody' : 'getDocumentElement']().append( marker );
|
||||
|
||||
var height = marker.getDocumentPosition( doc ).y + marker.$.offsetHeight;
|
||||
marker.remove();
|
||||
scrollable.setStyle( 'overflow-y', overflowY );
|
||||
return height;
|
||||
}
|
||||
|
||||
var resizeEditor = function( editor )
|
||||
{
|
||||
if ( !editor.window )
|
||||
return;
|
||||
|
||||
var doc = editor.document,
|
||||
iframe = new CKEDITOR.dom.element( doc.getWindow().$.frameElement ),
|
||||
body = doc.getBody(),
|
||||
htmlElement = doc.getDocumentElement(),
|
||||
currentHeight = editor.window.getViewPaneSize().height,
|
||||
// Quirks mode overflows body, standards overflows document element
|
||||
scrollable = doc.$.compatMode == 'BackCompat' ? body : htmlElement,
|
||||
newHeight = contentHeight( scrollable );
|
||||
|
||||
// Additional space specified by user.
|
||||
newHeight += ( editor.config.autoGrow_bottomSpace || 0 );
|
||||
|
||||
var min = editor.config.autoGrow_minHeight != undefined ? editor.config.autoGrow_minHeight : 200,
|
||||
max = editor.config.autoGrow_maxHeight || Infinity;
|
||||
|
||||
newHeight = Math.max( newHeight, min );
|
||||
newHeight = Math.min( newHeight, max );
|
||||
|
||||
if ( newHeight != currentHeight )
|
||||
{
|
||||
newHeight = editor.fire( 'autoGrow', { currentHeight : currentHeight, newHeight : newHeight } ).newHeight;
|
||||
editor.resize( editor.container.getStyle( 'width' ), newHeight, true );
|
||||
}
|
||||
|
||||
if ( scrollable.$.scrollHeight > scrollable.$.clientHeight && newHeight < max )
|
||||
scrollable.setStyle( 'overflow-y', 'hidden' );
|
||||
else
|
||||
scrollable.removeStyle( 'overflow-y' );
|
||||
|
||||
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'autogrow',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'autogrow', { exec : resizeEditor, modes : { wysiwyg:1 }, readOnly: 1, canUndo: false, editorFocus: false } );
|
||||
|
||||
var eventsList = { contentDom:1, key:1, selectionChange:1, insertElement:1, mode:1 };
|
||||
editor.config.autoGrow_onStartup && ( eventsList[ 'instanceReady' ] = 1 );
|
||||
for ( var eventName in eventsList )
|
||||
{
|
||||
editor.on( eventName, function( evt )
|
||||
{
|
||||
var maximize = editor.getCommand( 'maximize' );
|
||||
// Some time is required for insertHtml, and it gives other events better performance as well.
|
||||
if ( evt.editor.mode == 'wysiwyg' &&
|
||||
// Disable autogrow when the editor is maximized .(#6339)
|
||||
( !maximize || maximize.state != CKEDITOR.TRISTATE_ON ) )
|
||||
{
|
||||
setTimeout( function()
|
||||
{
|
||||
resizeEditor( evt.editor );
|
||||
// Second pass to make correction upon
|
||||
// the first resize, e.g. scrollbar.
|
||||
resizeEditor( evt.editor );
|
||||
}, 100 );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
/**
|
||||
* The minimum height that the editor can reach using the AutoGrow feature.
|
||||
* @name CKEDITOR.config.autoGrow_minHeight
|
||||
* @type Number
|
||||
* @default <code>200</code>
|
||||
* @since 3.4
|
||||
* @example
|
||||
* config.autoGrow_minHeight = 300;
|
||||
*/
|
||||
|
||||
/**
|
||||
* The maximum height that the editor can reach using the AutoGrow feature. Zero means unlimited.
|
||||
* @name CKEDITOR.config.autoGrow_maxHeight
|
||||
* @type Number
|
||||
* @default <code>0</code>
|
||||
* @since 3.4
|
||||
* @example
|
||||
* config.autoGrow_maxHeight = 400;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether to have the auto grow happen on editor creation.
|
||||
* @name CKEDITOR.config.autoGrow_onStartup
|
||||
* @type Boolean
|
||||
* @default false
|
||||
* @since 3.6.2
|
||||
* @example
|
||||
* config.autoGrow_onStartup = true;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the AutoGrow plugin is about to change the size of the editor.
|
||||
* @name CKEDITOR.editor#autogrow
|
||||
* @event
|
||||
* @param {Number} data.currentHeight The current height of the editor (before resizing).
|
||||
* @param {Number} data.newHeight The new height of the editor (after resizing). It can be changed
|
||||
* to determine a different height value to be used instead.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Extra height in pixel to leave between the bottom boundary of content with document size when auto resizing.
|
||||
* @name CKEDITOR.config.autoGrow_bottomSpace
|
||||
* @type Number
|
||||
* @default 0
|
||||
* @since 3.6.2
|
||||
*/
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'basicstyles',
|
||||
{
|
||||
requires : [ 'styles', 'button' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
// All buttons use the same code to register. So, to avoid
|
||||
// duplications, let's use this tool function.
|
||||
var addButtonCommand = function( buttonName, buttonLabel, commandName, styleDefiniton )
|
||||
{
|
||||
var style = new CKEDITOR.style( styleDefiniton );
|
||||
|
||||
editor.attachStyleStateChange( style, function( state )
|
||||
{
|
||||
!editor.readOnly && editor.getCommand( commandName ).setState( state );
|
||||
});
|
||||
|
||||
editor.addCommand( commandName, new CKEDITOR.styleCommand( style ) );
|
||||
|
||||
editor.ui.addButton( buttonName,
|
||||
{
|
||||
label : buttonLabel,
|
||||
command : commandName
|
||||
});
|
||||
};
|
||||
|
||||
var config = editor.config,
|
||||
lang = editor.lang;
|
||||
|
||||
addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold );
|
||||
addButtonCommand( 'Italic' , lang.italic , 'italic' , config.coreStyles_italic );
|
||||
addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline );
|
||||
addButtonCommand( 'Strike' , lang.strike , 'strike' , config.coreStyles_strike );
|
||||
addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript );
|
||||
addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript );
|
||||
}
|
||||
});
|
||||
|
||||
// Basic Inline Styles.
|
||||
|
||||
/**
|
||||
* The style definition that applies the <strong>bold</strong> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'strong', overrides : 'b' }</code>
|
||||
* @example
|
||||
* config.coreStyles_bold = { element : 'b', overrides : 'strong' };
|
||||
* @example
|
||||
* config.coreStyles_bold =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Bold' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the <em>italics</em> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'em', overrides : 'i' }</code>
|
||||
* @example
|
||||
* config.coreStyles_italic = { element : 'i', overrides : 'em' };
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_italic =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Italic' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the <u>underline</u> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'u' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_underline =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Underline' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_underline = { element : 'u' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the <strike>strike-through</strike> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'strike' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_strike =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'StrikeThrough' },
|
||||
* overrides : 'strike'
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_strike = { element : 'strike' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the subscript style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'sub' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_subscript =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Subscript' },
|
||||
* overrides : 'sub'
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_subscript = { element : 'sub' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the superscript style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'sup' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_superscript =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Superscript' },
|
||||
* overrides : 'sup'
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_superscript = { element : 'sup' };
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'basicstyles',
|
||||
{
|
||||
requires : [ 'styles', 'button' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
// All buttons use the same code to register. So, to avoid
|
||||
// duplications, let's use this tool function.
|
||||
var addButtonCommand = function( buttonName, buttonLabel, commandName, styleDefiniton )
|
||||
{
|
||||
var style = new CKEDITOR.style( styleDefiniton );
|
||||
|
||||
editor.attachStyleStateChange( style, function( state )
|
||||
{
|
||||
!editor.readOnly && editor.getCommand( commandName ).setState( state );
|
||||
});
|
||||
|
||||
editor.addCommand( commandName, new CKEDITOR.styleCommand( style ) );
|
||||
|
||||
editor.ui.addButton( buttonName,
|
||||
{
|
||||
label : buttonLabel,
|
||||
command : commandName
|
||||
});
|
||||
};
|
||||
|
||||
var config = editor.config,
|
||||
lang = editor.lang;
|
||||
|
||||
addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold );
|
||||
addButtonCommand( 'Italic' , lang.italic , 'italic' , config.coreStyles_italic );
|
||||
addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline );
|
||||
addButtonCommand( 'Strike' , lang.strike , 'strike' , config.coreStyles_strike );
|
||||
addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript );
|
||||
addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript );
|
||||
}
|
||||
});
|
||||
|
||||
// Basic Inline Styles.
|
||||
|
||||
/**
|
||||
* The style definition that applies the <strong>bold</strong> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'strong', overrides : 'b' }</code>
|
||||
* @example
|
||||
* config.coreStyles_bold = { element : 'b', overrides : 'strong' };
|
||||
* @example
|
||||
* config.coreStyles_bold =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Bold' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the <em>italics</em> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'em', overrides : 'i' }</code>
|
||||
* @example
|
||||
* config.coreStyles_italic = { element : 'i', overrides : 'em' };
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_italic =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Italic' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the <u>underline</u> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'u' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_underline =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Underline' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_underline = { element : 'u' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the <strike>strike-through</strike> style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'strike' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_strike =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'StrikeThrough' },
|
||||
* overrides : 'strike'
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_strike = { element : 'strike' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the subscript style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'sub' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_subscript =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Subscript' },
|
||||
* overrides : 'sub'
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_subscript = { element : 'sub' };
|
||||
|
||||
/**
|
||||
* The style definition that applies the superscript style to the text.
|
||||
* @type Object
|
||||
* @default <code>{ element : 'sup' }</code>
|
||||
* @example
|
||||
* CKEDITOR.config.coreStyles_superscript =
|
||||
* {
|
||||
* element : 'span',
|
||||
* attributes : { 'class' : 'Superscript' },
|
||||
* overrides : 'sup'
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.coreStyles_superscript = { element : 'sup' };
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,334 +1,334 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 },
|
||||
directSelectionGuardElements = {},
|
||||
// All guard elements which can have a direction applied on them.
|
||||
allGuardElements = {};
|
||||
CKEDITOR.tools.extend( directSelectionGuardElements, guardElements, { tr:1, p:1, div:1, li:1 } );
|
||||
CKEDITOR.tools.extend( allGuardElements, directSelectionGuardElements, { td:1 } );
|
||||
|
||||
function onSelectionChange( e )
|
||||
{
|
||||
setToolbarStates( e );
|
||||
handleMixedDirContent( e );
|
||||
}
|
||||
|
||||
function setToolbarStates( evt )
|
||||
{
|
||||
var editor = evt.editor,
|
||||
path = evt.data.path;
|
||||
|
||||
if ( editor.readOnly )
|
||||
return;
|
||||
|
||||
var useComputedState = editor.config.useComputedState,
|
||||
selectedElement;
|
||||
|
||||
useComputedState = useComputedState === undefined || useComputedState;
|
||||
|
||||
// We can use computedState provided by the browser or traverse parents manually.
|
||||
if ( !useComputedState )
|
||||
selectedElement = getElementForDirection( path.lastElement );
|
||||
|
||||
selectedElement = selectedElement || path.block || path.blockLimit;
|
||||
|
||||
// If we're having BODY here, user probably done CTRL+A, let's try to get the enclosed node, if any.
|
||||
if ( selectedElement.is( 'body' ) )
|
||||
{
|
||||
var enclosedNode = editor.getSelection().getRanges()[ 0 ].getEnclosedNode();
|
||||
enclosedNode && enclosedNode.type == CKEDITOR.NODE_ELEMENT && ( selectedElement = enclosedNode );
|
||||
}
|
||||
|
||||
if ( !selectedElement )
|
||||
return;
|
||||
|
||||
var selectionDir = useComputedState ?
|
||||
selectedElement.getComputedStyle( 'direction' ) :
|
||||
selectedElement.getStyle( 'direction' ) || selectedElement.getAttribute( 'dir' );
|
||||
|
||||
editor.getCommand( 'bidirtl' ).setState( selectionDir == 'rtl' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
||||
editor.getCommand( 'bidiltr' ).setState( selectionDir == 'ltr' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
||||
}
|
||||
|
||||
function handleMixedDirContent( evt )
|
||||
{
|
||||
var editor = evt.editor,
|
||||
directionNode = evt.data.path.block || evt.data.path.blockLimit;
|
||||
|
||||
editor.fire( 'contentDirChanged', directionNode ? directionNode.getComputedStyle( 'direction' ) : editor.lang.dir );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns element with possibility of applying the direction.
|
||||
* @param node
|
||||
*/
|
||||
function getElementForDirection( node )
|
||||
{
|
||||
while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) ) )
|
||||
{
|
||||
var parent = node.getParent();
|
||||
if ( !parent )
|
||||
break;
|
||||
|
||||
node = parent;
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function switchDir( element, dir, editor, database )
|
||||
{
|
||||
if ( element.isReadOnly() )
|
||||
return;
|
||||
|
||||
// Mark this element as processed by switchDir.
|
||||
CKEDITOR.dom.element.setMarker( database, element, 'bidi_processed', 1 );
|
||||
|
||||
// Check whether one of the ancestors has already been styled.
|
||||
var parent = element;
|
||||
while ( ( parent = parent.getParent() ) && !parent.is( 'body' ) )
|
||||
{
|
||||
if ( parent.getCustomData( 'bidi_processed' ) )
|
||||
{
|
||||
// Ancestor style must dominate.
|
||||
element.removeStyle( 'direction' );
|
||||
element.removeAttribute( 'dir' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var useComputedState = ( 'useComputedState' in editor.config ) ? editor.config.useComputedState : 1;
|
||||
|
||||
var elementDir = useComputedState ? element.getComputedStyle( 'direction' )
|
||||
: element.getStyle( 'direction' ) || element.hasAttribute( 'dir' );
|
||||
|
||||
// Stop if direction is same as present.
|
||||
if ( elementDir == dir )
|
||||
return;
|
||||
|
||||
// Clear direction on this element.
|
||||
element.removeStyle( 'direction' );
|
||||
|
||||
// Do the second check when computed state is ON, to check
|
||||
// if we need to apply explicit direction on this element.
|
||||
if ( useComputedState )
|
||||
{
|
||||
element.removeAttribute( 'dir' );
|
||||
if ( dir != element.getComputedStyle( 'direction' ) )
|
||||
element.setAttribute( 'dir', dir );
|
||||
}
|
||||
else
|
||||
// Set new direction for this element.
|
||||
element.setAttribute( 'dir', dir );
|
||||
|
||||
editor.forceNextSelectionCheck();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function getFullySelected( range, elements, enterMode )
|
||||
{
|
||||
var ancestor = range.getCommonAncestor( false, true );
|
||||
|
||||
range = range.clone();
|
||||
range.enlarge( enterMode == CKEDITOR.ENTER_BR ?
|
||||
CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS
|
||||
: CKEDITOR.ENLARGE_BLOCK_CONTENTS );
|
||||
|
||||
if ( range.checkBoundaryOfElement( ancestor, CKEDITOR.START )
|
||||
&& range.checkBoundaryOfElement( ancestor, CKEDITOR.END ) )
|
||||
{
|
||||
var parent;
|
||||
while ( ancestor && ancestor.type == CKEDITOR.NODE_ELEMENT
|
||||
&& ( parent = ancestor.getParent() )
|
||||
&& parent.getChildCount() == 1
|
||||
&& !( ancestor.getName() in elements ) )
|
||||
ancestor = parent;
|
||||
|
||||
return ancestor.type == CKEDITOR.NODE_ELEMENT
|
||||
&& ( ancestor.getName() in elements )
|
||||
&& ancestor;
|
||||
}
|
||||
}
|
||||
|
||||
function bidiCommand( dir )
|
||||
{
|
||||
return function( editor )
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
enterMode = editor.config.enterMode,
|
||||
ranges = selection.getRanges();
|
||||
|
||||
if ( ranges && ranges.length )
|
||||
{
|
||||
var database = {};
|
||||
|
||||
// Creates bookmarks for selection, as we may split some blocks.
|
||||
var bookmarks = selection.createBookmarks();
|
||||
|
||||
var rangeIterator = ranges.createIterator(),
|
||||
range,
|
||||
i = 0;
|
||||
|
||||
while ( ( range = rangeIterator.getNextRange( 1 ) ) )
|
||||
{
|
||||
// Apply do directly selected elements from guardElements.
|
||||
var selectedElement = range.getEnclosedNode();
|
||||
|
||||
// If this is not our element of interest, apply to fully selected elements from guardElements.
|
||||
if ( !selectedElement || selectedElement
|
||||
&& !( selectedElement.type == CKEDITOR.NODE_ELEMENT && selectedElement.getName() in directSelectionGuardElements )
|
||||
)
|
||||
selectedElement = getFullySelected( range, guardElements, enterMode );
|
||||
|
||||
selectedElement && switchDir( selectedElement, dir, editor, database );
|
||||
|
||||
var iterator,
|
||||
block;
|
||||
|
||||
// Walker searching for guardElements.
|
||||
var walker = new CKEDITOR.dom.walker( range );
|
||||
|
||||
var start = bookmarks[ i ].startNode,
|
||||
end = bookmarks[ i++ ].endNode;
|
||||
|
||||
walker.evaluator = function( node )
|
||||
{
|
||||
return !! ( node.type == CKEDITOR.NODE_ELEMENT
|
||||
&& node.getName() in guardElements
|
||||
&& !( node.getName() == ( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' )
|
||||
&& node.getParent().type == CKEDITOR.NODE_ELEMENT
|
||||
&& node.getParent().getName() == 'blockquote' )
|
||||
// Element must be fully included in the range as well. (#6485).
|
||||
&& node.getPosition( start ) & CKEDITOR.POSITION_FOLLOWING
|
||||
&& ( ( node.getPosition( end ) & CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_CONTAINS ) == CKEDITOR.POSITION_PRECEDING ) );
|
||||
};
|
||||
|
||||
while ( ( block = walker.next() ) )
|
||||
switchDir( block, dir, editor, database );
|
||||
|
||||
iterator = range.createIterator();
|
||||
iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
|
||||
|
||||
while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
|
||||
switchDir( block, dir, editor, database );
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
editor.forceNextSelectionCheck();
|
||||
// Restore selection position.
|
||||
selection.selectBookmarks( bookmarks );
|
||||
|
||||
editor.focus();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'bidi',
|
||||
{
|
||||
requires : [ 'styles', 'button' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
// All buttons use the same code to register. So, to avoid
|
||||
// duplications, let's use this tool function.
|
||||
var addButtonCommand = function( buttonName, buttonLabel, commandName, commandExec )
|
||||
{
|
||||
editor.addCommand( commandName, new CKEDITOR.command( editor, { exec : commandExec }) );
|
||||
|
||||
editor.ui.addButton( buttonName,
|
||||
{
|
||||
label : buttonLabel,
|
||||
command : commandName
|
||||
});
|
||||
};
|
||||
|
||||
var lang = editor.lang.bidi;
|
||||
|
||||
addButtonCommand( 'BidiLtr', lang.ltr, 'bidiltr', bidiCommand( 'ltr' ) );
|
||||
addButtonCommand( 'BidiRtl', lang.rtl, 'bidirtl', bidiCommand( 'rtl' ) );
|
||||
|
||||
editor.on( 'selectionChange', onSelectionChange );
|
||||
editor.on( 'contentDom', function()
|
||||
{
|
||||
editor.document.on( 'dirChanged', function( evt )
|
||||
{
|
||||
editor.fire( 'dirChanged',
|
||||
{
|
||||
node : evt.data,
|
||||
dir : evt.data.getDirection( 1 )
|
||||
} );
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// If the element direction changed, we need to switch the margins of
|
||||
// the element and all its children, so it will get really reflected
|
||||
// like a mirror. (#5910)
|
||||
function isOffline( el )
|
||||
{
|
||||
var html = el.getDocument().getBody().getParent();
|
||||
while ( el )
|
||||
{
|
||||
if ( el.equals( html ) )
|
||||
return false;
|
||||
el = el.getParent();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function dirChangeNotifier( org )
|
||||
{
|
||||
var isAttribute = org == elementProto.setAttribute,
|
||||
isRemoveAttribute = org == elementProto.removeAttribute,
|
||||
dirStyleRegexp = /\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
|
||||
|
||||
return function( name, val )
|
||||
{
|
||||
if ( !this.getDocument().equals( CKEDITOR.document ) )
|
||||
{
|
||||
var orgDir;
|
||||
if ( ( name == ( isAttribute || isRemoveAttribute ? 'dir' : 'direction' ) ||
|
||||
name == 'style' && ( isRemoveAttribute || dirStyleRegexp.test( val ) ) ) && !isOffline( this ) )
|
||||
{
|
||||
orgDir = this.getDirection( 1 );
|
||||
var retval = org.apply( this, arguments );
|
||||
if ( orgDir != this.getDirection( 1 ) )
|
||||
{
|
||||
this.getDocument().fire( 'dirChanged', this );
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return org.apply( this, arguments );
|
||||
};
|
||||
}
|
||||
|
||||
var elementProto = CKEDITOR.dom.element.prototype,
|
||||
methods = [ 'setStyle', 'removeStyle', 'setAttribute', 'removeAttribute' ];
|
||||
for ( var i = 0; i < methods.length; i++ )
|
||||
elementProto[ methods[ i ] ] = CKEDITOR.tools.override( elementProto[ methods [ i ] ], dirChangeNotifier );
|
||||
})();
|
||||
|
||||
/**
|
||||
* Fired when the language direction of an element is changed
|
||||
* @name CKEDITOR.editor#dirChanged
|
||||
* @event
|
||||
* @param {CKEDITOR.editor} editor This editor instance.
|
||||
* @param {Object} eventData.node The element that is being changed.
|
||||
* @param {String} eventData.dir The new direction.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the language direction in the specific cursor position is changed
|
||||
* @name CKEDITOR.editor#contentDirChanged
|
||||
* @event
|
||||
* @param {String} eventData The direction in the current position.
|
||||
*/
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 },
|
||||
directSelectionGuardElements = {},
|
||||
// All guard elements which can have a direction applied on them.
|
||||
allGuardElements = {};
|
||||
CKEDITOR.tools.extend( directSelectionGuardElements, guardElements, { tr:1, p:1, div:1, li:1 } );
|
||||
CKEDITOR.tools.extend( allGuardElements, directSelectionGuardElements, { td:1 } );
|
||||
|
||||
function onSelectionChange( e )
|
||||
{
|
||||
setToolbarStates( e );
|
||||
handleMixedDirContent( e );
|
||||
}
|
||||
|
||||
function setToolbarStates( evt )
|
||||
{
|
||||
var editor = evt.editor,
|
||||
path = evt.data.path;
|
||||
|
||||
if ( editor.readOnly )
|
||||
return;
|
||||
|
||||
var useComputedState = editor.config.useComputedState,
|
||||
selectedElement;
|
||||
|
||||
useComputedState = useComputedState === undefined || useComputedState;
|
||||
|
||||
// We can use computedState provided by the browser or traverse parents manually.
|
||||
if ( !useComputedState )
|
||||
selectedElement = getElementForDirection( path.lastElement );
|
||||
|
||||
selectedElement = selectedElement || path.block || path.blockLimit;
|
||||
|
||||
// If we're having BODY here, user probably done CTRL+A, let's try to get the enclosed node, if any.
|
||||
if ( selectedElement.is( 'body' ) )
|
||||
{
|
||||
var enclosedNode = editor.getSelection().getRanges()[ 0 ].getEnclosedNode();
|
||||
enclosedNode && enclosedNode.type == CKEDITOR.NODE_ELEMENT && ( selectedElement = enclosedNode );
|
||||
}
|
||||
|
||||
if ( !selectedElement )
|
||||
return;
|
||||
|
||||
var selectionDir = useComputedState ?
|
||||
selectedElement.getComputedStyle( 'direction' ) :
|
||||
selectedElement.getStyle( 'direction' ) || selectedElement.getAttribute( 'dir' );
|
||||
|
||||
editor.getCommand( 'bidirtl' ).setState( selectionDir == 'rtl' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
||||
editor.getCommand( 'bidiltr' ).setState( selectionDir == 'ltr' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
||||
}
|
||||
|
||||
function handleMixedDirContent( evt )
|
||||
{
|
||||
var editor = evt.editor,
|
||||
directionNode = evt.data.path.block || evt.data.path.blockLimit;
|
||||
|
||||
editor.fire( 'contentDirChanged', directionNode ? directionNode.getComputedStyle( 'direction' ) : editor.lang.dir );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns element with possibility of applying the direction.
|
||||
* @param node
|
||||
*/
|
||||
function getElementForDirection( node )
|
||||
{
|
||||
while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) ) )
|
||||
{
|
||||
var parent = node.getParent();
|
||||
if ( !parent )
|
||||
break;
|
||||
|
||||
node = parent;
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function switchDir( element, dir, editor, database )
|
||||
{
|
||||
if ( element.isReadOnly() )
|
||||
return;
|
||||
|
||||
// Mark this element as processed by switchDir.
|
||||
CKEDITOR.dom.element.setMarker( database, element, 'bidi_processed', 1 );
|
||||
|
||||
// Check whether one of the ancestors has already been styled.
|
||||
var parent = element;
|
||||
while ( ( parent = parent.getParent() ) && !parent.is( 'body' ) )
|
||||
{
|
||||
if ( parent.getCustomData( 'bidi_processed' ) )
|
||||
{
|
||||
// Ancestor style must dominate.
|
||||
element.removeStyle( 'direction' );
|
||||
element.removeAttribute( 'dir' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var useComputedState = ( 'useComputedState' in editor.config ) ? editor.config.useComputedState : 1;
|
||||
|
||||
var elementDir = useComputedState ? element.getComputedStyle( 'direction' )
|
||||
: element.getStyle( 'direction' ) || element.hasAttribute( 'dir' );
|
||||
|
||||
// Stop if direction is same as present.
|
||||
if ( elementDir == dir )
|
||||
return;
|
||||
|
||||
// Clear direction on this element.
|
||||
element.removeStyle( 'direction' );
|
||||
|
||||
// Do the second check when computed state is ON, to check
|
||||
// if we need to apply explicit direction on this element.
|
||||
if ( useComputedState )
|
||||
{
|
||||
element.removeAttribute( 'dir' );
|
||||
if ( dir != element.getComputedStyle( 'direction' ) )
|
||||
element.setAttribute( 'dir', dir );
|
||||
}
|
||||
else
|
||||
// Set new direction for this element.
|
||||
element.setAttribute( 'dir', dir );
|
||||
|
||||
editor.forceNextSelectionCheck();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function getFullySelected( range, elements, enterMode )
|
||||
{
|
||||
var ancestor = range.getCommonAncestor( false, true );
|
||||
|
||||
range = range.clone();
|
||||
range.enlarge( enterMode == CKEDITOR.ENTER_BR ?
|
||||
CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS
|
||||
: CKEDITOR.ENLARGE_BLOCK_CONTENTS );
|
||||
|
||||
if ( range.checkBoundaryOfElement( ancestor, CKEDITOR.START )
|
||||
&& range.checkBoundaryOfElement( ancestor, CKEDITOR.END ) )
|
||||
{
|
||||
var parent;
|
||||
while ( ancestor && ancestor.type == CKEDITOR.NODE_ELEMENT
|
||||
&& ( parent = ancestor.getParent() )
|
||||
&& parent.getChildCount() == 1
|
||||
&& !( ancestor.getName() in elements ) )
|
||||
ancestor = parent;
|
||||
|
||||
return ancestor.type == CKEDITOR.NODE_ELEMENT
|
||||
&& ( ancestor.getName() in elements )
|
||||
&& ancestor;
|
||||
}
|
||||
}
|
||||
|
||||
function bidiCommand( dir )
|
||||
{
|
||||
return function( editor )
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
enterMode = editor.config.enterMode,
|
||||
ranges = selection.getRanges();
|
||||
|
||||
if ( ranges && ranges.length )
|
||||
{
|
||||
var database = {};
|
||||
|
||||
// Creates bookmarks for selection, as we may split some blocks.
|
||||
var bookmarks = selection.createBookmarks();
|
||||
|
||||
var rangeIterator = ranges.createIterator(),
|
||||
range,
|
||||
i = 0;
|
||||
|
||||
while ( ( range = rangeIterator.getNextRange( 1 ) ) )
|
||||
{
|
||||
// Apply do directly selected elements from guardElements.
|
||||
var selectedElement = range.getEnclosedNode();
|
||||
|
||||
// If this is not our element of interest, apply to fully selected elements from guardElements.
|
||||
if ( !selectedElement || selectedElement
|
||||
&& !( selectedElement.type == CKEDITOR.NODE_ELEMENT && selectedElement.getName() in directSelectionGuardElements )
|
||||
)
|
||||
selectedElement = getFullySelected( range, guardElements, enterMode );
|
||||
|
||||
selectedElement && switchDir( selectedElement, dir, editor, database );
|
||||
|
||||
var iterator,
|
||||
block;
|
||||
|
||||
// Walker searching for guardElements.
|
||||
var walker = new CKEDITOR.dom.walker( range );
|
||||
|
||||
var start = bookmarks[ i ].startNode,
|
||||
end = bookmarks[ i++ ].endNode;
|
||||
|
||||
walker.evaluator = function( node )
|
||||
{
|
||||
return !! ( node.type == CKEDITOR.NODE_ELEMENT
|
||||
&& node.getName() in guardElements
|
||||
&& !( node.getName() == ( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' )
|
||||
&& node.getParent().type == CKEDITOR.NODE_ELEMENT
|
||||
&& node.getParent().getName() == 'blockquote' )
|
||||
// Element must be fully included in the range as well. (#6485).
|
||||
&& node.getPosition( start ) & CKEDITOR.POSITION_FOLLOWING
|
||||
&& ( ( node.getPosition( end ) & CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_CONTAINS ) == CKEDITOR.POSITION_PRECEDING ) );
|
||||
};
|
||||
|
||||
while ( ( block = walker.next() ) )
|
||||
switchDir( block, dir, editor, database );
|
||||
|
||||
iterator = range.createIterator();
|
||||
iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
|
||||
|
||||
while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
|
||||
switchDir( block, dir, editor, database );
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
editor.forceNextSelectionCheck();
|
||||
// Restore selection position.
|
||||
selection.selectBookmarks( bookmarks );
|
||||
|
||||
editor.focus();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'bidi',
|
||||
{
|
||||
requires : [ 'styles', 'button' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
// All buttons use the same code to register. So, to avoid
|
||||
// duplications, let's use this tool function.
|
||||
var addButtonCommand = function( buttonName, buttonLabel, commandName, commandExec )
|
||||
{
|
||||
editor.addCommand( commandName, new CKEDITOR.command( editor, { exec : commandExec }) );
|
||||
|
||||
editor.ui.addButton( buttonName,
|
||||
{
|
||||
label : buttonLabel,
|
||||
command : commandName
|
||||
});
|
||||
};
|
||||
|
||||
var lang = editor.lang.bidi;
|
||||
|
||||
addButtonCommand( 'BidiLtr', lang.ltr, 'bidiltr', bidiCommand( 'ltr' ) );
|
||||
addButtonCommand( 'BidiRtl', lang.rtl, 'bidirtl', bidiCommand( 'rtl' ) );
|
||||
|
||||
editor.on( 'selectionChange', onSelectionChange );
|
||||
editor.on( 'contentDom', function()
|
||||
{
|
||||
editor.document.on( 'dirChanged', function( evt )
|
||||
{
|
||||
editor.fire( 'dirChanged',
|
||||
{
|
||||
node : evt.data,
|
||||
dir : evt.data.getDirection( 1 )
|
||||
} );
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// If the element direction changed, we need to switch the margins of
|
||||
// the element and all its children, so it will get really reflected
|
||||
// like a mirror. (#5910)
|
||||
function isOffline( el )
|
||||
{
|
||||
var html = el.getDocument().getBody().getParent();
|
||||
while ( el )
|
||||
{
|
||||
if ( el.equals( html ) )
|
||||
return false;
|
||||
el = el.getParent();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function dirChangeNotifier( org )
|
||||
{
|
||||
var isAttribute = org == elementProto.setAttribute,
|
||||
isRemoveAttribute = org == elementProto.removeAttribute,
|
||||
dirStyleRegexp = /\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
|
||||
|
||||
return function( name, val )
|
||||
{
|
||||
if ( !this.getDocument().equals( CKEDITOR.document ) )
|
||||
{
|
||||
var orgDir;
|
||||
if ( ( name == ( isAttribute || isRemoveAttribute ? 'dir' : 'direction' ) ||
|
||||
name == 'style' && ( isRemoveAttribute || dirStyleRegexp.test( val ) ) ) && !isOffline( this ) )
|
||||
{
|
||||
orgDir = this.getDirection( 1 );
|
||||
var retval = org.apply( this, arguments );
|
||||
if ( orgDir != this.getDirection( 1 ) )
|
||||
{
|
||||
this.getDocument().fire( 'dirChanged', this );
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return org.apply( this, arguments );
|
||||
};
|
||||
}
|
||||
|
||||
var elementProto = CKEDITOR.dom.element.prototype,
|
||||
methods = [ 'setStyle', 'removeStyle', 'setAttribute', 'removeAttribute' ];
|
||||
for ( var i = 0; i < methods.length; i++ )
|
||||
elementProto[ methods[ i ] ] = CKEDITOR.tools.override( elementProto[ methods [ i ] ], dirChangeNotifier );
|
||||
})();
|
||||
|
||||
/**
|
||||
* Fired when the language direction of an element is changed
|
||||
* @name CKEDITOR.editor#dirChanged
|
||||
* @event
|
||||
* @param {CKEDITOR.editor} editor This editor instance.
|
||||
* @param {Object} eventData.node The element that is being changed.
|
||||
* @param {String} eventData.dir The new direction.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the language direction in the specific cursor position is changed
|
||||
* @name CKEDITOR.editor#contentDirChanged
|
||||
* @event
|
||||
* @param {String} eventData The direction in the current position.
|
||||
*/
|
||||
|
||||
@@ -1,305 +1,305 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file Blockquote.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
function getState( editor, path )
|
||||
{
|
||||
var firstBlock = path.block || path.blockLimit;
|
||||
|
||||
if ( !firstBlock || firstBlock.getName() == 'body' )
|
||||
return CKEDITOR.TRISTATE_OFF;
|
||||
|
||||
// See if the first block has a blockquote parent.
|
||||
if ( firstBlock.getAscendant( 'blockquote', true ) )
|
||||
return CKEDITOR.TRISTATE_ON;
|
||||
|
||||
return CKEDITOR.TRISTATE_OFF;
|
||||
}
|
||||
|
||||
function onSelectionChange( evt )
|
||||
{
|
||||
var editor = evt.editor;
|
||||
if ( editor.readOnly )
|
||||
return;
|
||||
|
||||
var command = editor.getCommand( 'blockquote' );
|
||||
command.state = getState( editor, evt.data.path );
|
||||
command.fire( 'state' );
|
||||
}
|
||||
|
||||
function noBlockLeft( bqBlock )
|
||||
{
|
||||
for ( var i = 0, length = bqBlock.getChildCount(), child ; i < length && ( child = bqBlock.getChild( i ) ) ; i++ )
|
||||
{
|
||||
if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() )
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
var commandObject =
|
||||
{
|
||||
exec : function( editor )
|
||||
{
|
||||
var state = editor.getCommand( 'blockquote' ).state,
|
||||
selection = editor.getSelection(),
|
||||
range = selection && selection.getRanges( true )[0];
|
||||
|
||||
if ( !range )
|
||||
return;
|
||||
|
||||
var bookmarks = selection.createBookmarks();
|
||||
|
||||
// Kludge for #1592: if the bookmark nodes are in the beginning of
|
||||
// blockquote, then move them to the nearest block element in the
|
||||
// blockquote.
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var bookmarkStart = bookmarks[0].startNode,
|
||||
bookmarkEnd = bookmarks[0].endNode,
|
||||
cursor;
|
||||
|
||||
if ( bookmarkStart && bookmarkStart.getParent().getName() == 'blockquote' )
|
||||
{
|
||||
cursor = bookmarkStart;
|
||||
while ( ( cursor = cursor.getNext() ) )
|
||||
{
|
||||
if ( cursor.type == CKEDITOR.NODE_ELEMENT &&
|
||||
cursor.isBlockBoundary() )
|
||||
{
|
||||
bookmarkStart.move( cursor, true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( bookmarkEnd
|
||||
&& bookmarkEnd.getParent().getName() == 'blockquote' )
|
||||
{
|
||||
cursor = bookmarkEnd;
|
||||
while ( ( cursor = cursor.getPrevious() ) )
|
||||
{
|
||||
if ( cursor.type == CKEDITOR.NODE_ELEMENT &&
|
||||
cursor.isBlockBoundary() )
|
||||
{
|
||||
bookmarkEnd.move( cursor );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var iterator = range.createIterator(),
|
||||
block;
|
||||
iterator.enlargeBr = editor.config.enterMode != CKEDITOR.ENTER_BR;
|
||||
|
||||
if ( state == CKEDITOR.TRISTATE_OFF )
|
||||
{
|
||||
var paragraphs = [];
|
||||
while ( ( block = iterator.getNextParagraph() ) )
|
||||
paragraphs.push( block );
|
||||
|
||||
// If no paragraphs, create one from the current selection position.
|
||||
if ( paragraphs.length < 1 )
|
||||
{
|
||||
var para = editor.document.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ),
|
||||
firstBookmark = bookmarks.shift();
|
||||
range.insertNode( para );
|
||||
para.append( new CKEDITOR.dom.text( '\ufeff', editor.document ) );
|
||||
range.moveToBookmark( firstBookmark );
|
||||
range.selectNodeContents( para );
|
||||
range.collapse( true );
|
||||
firstBookmark = range.createBookmark();
|
||||
paragraphs.push( para );
|
||||
bookmarks.unshift( firstBookmark );
|
||||
}
|
||||
|
||||
// Make sure all paragraphs have the same parent.
|
||||
var commonParent = paragraphs[0].getParent(),
|
||||
tmp = [];
|
||||
for ( var i = 0 ; i < paragraphs.length ; i++ )
|
||||
{
|
||||
block = paragraphs[i];
|
||||
commonParent = commonParent.getCommonAncestor( block.getParent() );
|
||||
}
|
||||
|
||||
// The common parent must not be the following tags: table, tbody, tr, ol, ul.
|
||||
var denyTags = { table : 1, tbody : 1, tr : 1, ol : 1, ul : 1 };
|
||||
while ( denyTags[ commonParent.getName() ] )
|
||||
commonParent = commonParent.getParent();
|
||||
|
||||
// Reconstruct the block list to be processed such that all resulting blocks
|
||||
// satisfy parentNode.equals( commonParent ).
|
||||
var lastBlock = null;
|
||||
while ( paragraphs.length > 0 )
|
||||
{
|
||||
block = paragraphs.shift();
|
||||
while ( !block.getParent().equals( commonParent ) )
|
||||
block = block.getParent();
|
||||
if ( !block.equals( lastBlock ) )
|
||||
tmp.push( block );
|
||||
lastBlock = block;
|
||||
}
|
||||
|
||||
// If any of the selected blocks is a blockquote, remove it to prevent
|
||||
// nested blockquotes.
|
||||
while ( tmp.length > 0 )
|
||||
{
|
||||
block = tmp.shift();
|
||||
if ( block.getName() == 'blockquote' )
|
||||
{
|
||||
var docFrag = new CKEDITOR.dom.documentFragment( editor.document );
|
||||
while ( block.getFirst() )
|
||||
{
|
||||
docFrag.append( block.getFirst().remove() );
|
||||
paragraphs.push( docFrag.getLast() );
|
||||
}
|
||||
|
||||
docFrag.replace( block );
|
||||
}
|
||||
else
|
||||
paragraphs.push( block );
|
||||
}
|
||||
|
||||
// Now we have all the blocks to be included in a new blockquote node.
|
||||
var bqBlock = editor.document.createElement( 'blockquote' );
|
||||
bqBlock.insertBefore( paragraphs[0] );
|
||||
while ( paragraphs.length > 0 )
|
||||
{
|
||||
block = paragraphs.shift();
|
||||
bqBlock.append( block );
|
||||
}
|
||||
}
|
||||
else if ( state == CKEDITOR.TRISTATE_ON )
|
||||
{
|
||||
var moveOutNodes = [],
|
||||
database = {};
|
||||
|
||||
while ( ( block = iterator.getNextParagraph() ) )
|
||||
{
|
||||
var bqParent = null,
|
||||
bqChild = null;
|
||||
while ( block.getParent() )
|
||||
{
|
||||
if ( block.getParent().getName() == 'blockquote' )
|
||||
{
|
||||
bqParent = block.getParent();
|
||||
bqChild = block;
|
||||
break;
|
||||
}
|
||||
block = block.getParent();
|
||||
}
|
||||
|
||||
// Remember the blocks that were recorded down in the moveOutNodes array
|
||||
// to prevent duplicates.
|
||||
if ( bqParent && bqChild && !bqChild.getCustomData( 'blockquote_moveout' ) )
|
||||
{
|
||||
moveOutNodes.push( bqChild );
|
||||
CKEDITOR.dom.element.setMarker( database, bqChild, 'blockquote_moveout', true );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
var movedNodes = [],
|
||||
processedBlockquoteBlocks = [];
|
||||
|
||||
database = {};
|
||||
while ( moveOutNodes.length > 0 )
|
||||
{
|
||||
var node = moveOutNodes.shift();
|
||||
bqBlock = node.getParent();
|
||||
|
||||
// If the node is located at the beginning or the end, just take it out
|
||||
// without splitting. Otherwise, split the blockquote node and move the
|
||||
// paragraph in between the two blockquote nodes.
|
||||
if ( !node.getPrevious() )
|
||||
node.remove().insertBefore( bqBlock );
|
||||
else if ( !node.getNext() )
|
||||
node.remove().insertAfter( bqBlock );
|
||||
else
|
||||
{
|
||||
node.breakParent( node.getParent() );
|
||||
processedBlockquoteBlocks.push( node.getNext() );
|
||||
}
|
||||
|
||||
// Remember the blockquote node so we can clear it later (if it becomes empty).
|
||||
if ( !bqBlock.getCustomData( 'blockquote_processed' ) )
|
||||
{
|
||||
processedBlockquoteBlocks.push( bqBlock );
|
||||
CKEDITOR.dom.element.setMarker( database, bqBlock, 'blockquote_processed', true );
|
||||
}
|
||||
|
||||
movedNodes.push( node );
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
// Clear blockquote nodes that have become empty.
|
||||
for ( i = processedBlockquoteBlocks.length - 1 ; i >= 0 ; i-- )
|
||||
{
|
||||
bqBlock = processedBlockquoteBlocks[i];
|
||||
if ( noBlockLeft( bqBlock ) )
|
||||
bqBlock.remove();
|
||||
}
|
||||
|
||||
if ( editor.config.enterMode == CKEDITOR.ENTER_BR )
|
||||
{
|
||||
var firstTime = true;
|
||||
while ( movedNodes.length )
|
||||
{
|
||||
node = movedNodes.shift();
|
||||
|
||||
if ( node.getName() == 'div' )
|
||||
{
|
||||
docFrag = new CKEDITOR.dom.documentFragment( editor.document );
|
||||
var needBeginBr = firstTime && node.getPrevious() &&
|
||||
!( node.getPrevious().type == CKEDITOR.NODE_ELEMENT && node.getPrevious().isBlockBoundary() );
|
||||
if ( needBeginBr )
|
||||
docFrag.append( editor.document.createElement( 'br' ) );
|
||||
|
||||
var needEndBr = node.getNext() &&
|
||||
!( node.getNext().type == CKEDITOR.NODE_ELEMENT && node.getNext().isBlockBoundary() );
|
||||
while ( node.getFirst() )
|
||||
node.getFirst().remove().appendTo( docFrag );
|
||||
|
||||
if ( needEndBr )
|
||||
docFrag.append( editor.document.createElement( 'br' ) );
|
||||
|
||||
docFrag.replace( node );
|
||||
firstTime = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
selection.selectBookmarks( bookmarks );
|
||||
editor.focus();
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'blockquote',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'blockquote', commandObject );
|
||||
|
||||
editor.ui.addButton( 'Blockquote',
|
||||
{
|
||||
label : editor.lang.blockquote,
|
||||
command : 'blockquote'
|
||||
} );
|
||||
|
||||
editor.on( 'selectionChange', onSelectionChange );
|
||||
},
|
||||
|
||||
requires : [ 'domiterator' ]
|
||||
} );
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file Blockquote.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
function getState( editor, path )
|
||||
{
|
||||
var firstBlock = path.block || path.blockLimit;
|
||||
|
||||
if ( !firstBlock || firstBlock.getName() == 'body' )
|
||||
return CKEDITOR.TRISTATE_OFF;
|
||||
|
||||
// See if the first block has a blockquote parent.
|
||||
if ( firstBlock.getAscendant( 'blockquote', true ) )
|
||||
return CKEDITOR.TRISTATE_ON;
|
||||
|
||||
return CKEDITOR.TRISTATE_OFF;
|
||||
}
|
||||
|
||||
function onSelectionChange( evt )
|
||||
{
|
||||
var editor = evt.editor;
|
||||
if ( editor.readOnly )
|
||||
return;
|
||||
|
||||
var command = editor.getCommand( 'blockquote' );
|
||||
command.state = getState( editor, evt.data.path );
|
||||
command.fire( 'state' );
|
||||
}
|
||||
|
||||
function noBlockLeft( bqBlock )
|
||||
{
|
||||
for ( var i = 0, length = bqBlock.getChildCount(), child ; i < length && ( child = bqBlock.getChild( i ) ) ; i++ )
|
||||
{
|
||||
if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() )
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
var commandObject =
|
||||
{
|
||||
exec : function( editor )
|
||||
{
|
||||
var state = editor.getCommand( 'blockquote' ).state,
|
||||
selection = editor.getSelection(),
|
||||
range = selection && selection.getRanges( true )[0];
|
||||
|
||||
if ( !range )
|
||||
return;
|
||||
|
||||
var bookmarks = selection.createBookmarks();
|
||||
|
||||
// Kludge for #1592: if the bookmark nodes are in the beginning of
|
||||
// blockquote, then move them to the nearest block element in the
|
||||
// blockquote.
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var bookmarkStart = bookmarks[0].startNode,
|
||||
bookmarkEnd = bookmarks[0].endNode,
|
||||
cursor;
|
||||
|
||||
if ( bookmarkStart && bookmarkStart.getParent().getName() == 'blockquote' )
|
||||
{
|
||||
cursor = bookmarkStart;
|
||||
while ( ( cursor = cursor.getNext() ) )
|
||||
{
|
||||
if ( cursor.type == CKEDITOR.NODE_ELEMENT &&
|
||||
cursor.isBlockBoundary() )
|
||||
{
|
||||
bookmarkStart.move( cursor, true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( bookmarkEnd
|
||||
&& bookmarkEnd.getParent().getName() == 'blockquote' )
|
||||
{
|
||||
cursor = bookmarkEnd;
|
||||
while ( ( cursor = cursor.getPrevious() ) )
|
||||
{
|
||||
if ( cursor.type == CKEDITOR.NODE_ELEMENT &&
|
||||
cursor.isBlockBoundary() )
|
||||
{
|
||||
bookmarkEnd.move( cursor );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var iterator = range.createIterator(),
|
||||
block;
|
||||
iterator.enlargeBr = editor.config.enterMode != CKEDITOR.ENTER_BR;
|
||||
|
||||
if ( state == CKEDITOR.TRISTATE_OFF )
|
||||
{
|
||||
var paragraphs = [];
|
||||
while ( ( block = iterator.getNextParagraph() ) )
|
||||
paragraphs.push( block );
|
||||
|
||||
// If no paragraphs, create one from the current selection position.
|
||||
if ( paragraphs.length < 1 )
|
||||
{
|
||||
var para = editor.document.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ),
|
||||
firstBookmark = bookmarks.shift();
|
||||
range.insertNode( para );
|
||||
para.append( new CKEDITOR.dom.text( '\ufeff', editor.document ) );
|
||||
range.moveToBookmark( firstBookmark );
|
||||
range.selectNodeContents( para );
|
||||
range.collapse( true );
|
||||
firstBookmark = range.createBookmark();
|
||||
paragraphs.push( para );
|
||||
bookmarks.unshift( firstBookmark );
|
||||
}
|
||||
|
||||
// Make sure all paragraphs have the same parent.
|
||||
var commonParent = paragraphs[0].getParent(),
|
||||
tmp = [];
|
||||
for ( var i = 0 ; i < paragraphs.length ; i++ )
|
||||
{
|
||||
block = paragraphs[i];
|
||||
commonParent = commonParent.getCommonAncestor( block.getParent() );
|
||||
}
|
||||
|
||||
// The common parent must not be the following tags: table, tbody, tr, ol, ul.
|
||||
var denyTags = { table : 1, tbody : 1, tr : 1, ol : 1, ul : 1 };
|
||||
while ( denyTags[ commonParent.getName() ] )
|
||||
commonParent = commonParent.getParent();
|
||||
|
||||
// Reconstruct the block list to be processed such that all resulting blocks
|
||||
// satisfy parentNode.equals( commonParent ).
|
||||
var lastBlock = null;
|
||||
while ( paragraphs.length > 0 )
|
||||
{
|
||||
block = paragraphs.shift();
|
||||
while ( !block.getParent().equals( commonParent ) )
|
||||
block = block.getParent();
|
||||
if ( !block.equals( lastBlock ) )
|
||||
tmp.push( block );
|
||||
lastBlock = block;
|
||||
}
|
||||
|
||||
// If any of the selected blocks is a blockquote, remove it to prevent
|
||||
// nested blockquotes.
|
||||
while ( tmp.length > 0 )
|
||||
{
|
||||
block = tmp.shift();
|
||||
if ( block.getName() == 'blockquote' )
|
||||
{
|
||||
var docFrag = new CKEDITOR.dom.documentFragment( editor.document );
|
||||
while ( block.getFirst() )
|
||||
{
|
||||
docFrag.append( block.getFirst().remove() );
|
||||
paragraphs.push( docFrag.getLast() );
|
||||
}
|
||||
|
||||
docFrag.replace( block );
|
||||
}
|
||||
else
|
||||
paragraphs.push( block );
|
||||
}
|
||||
|
||||
// Now we have all the blocks to be included in a new blockquote node.
|
||||
var bqBlock = editor.document.createElement( 'blockquote' );
|
||||
bqBlock.insertBefore( paragraphs[0] );
|
||||
while ( paragraphs.length > 0 )
|
||||
{
|
||||
block = paragraphs.shift();
|
||||
bqBlock.append( block );
|
||||
}
|
||||
}
|
||||
else if ( state == CKEDITOR.TRISTATE_ON )
|
||||
{
|
||||
var moveOutNodes = [],
|
||||
database = {};
|
||||
|
||||
while ( ( block = iterator.getNextParagraph() ) )
|
||||
{
|
||||
var bqParent = null,
|
||||
bqChild = null;
|
||||
while ( block.getParent() )
|
||||
{
|
||||
if ( block.getParent().getName() == 'blockquote' )
|
||||
{
|
||||
bqParent = block.getParent();
|
||||
bqChild = block;
|
||||
break;
|
||||
}
|
||||
block = block.getParent();
|
||||
}
|
||||
|
||||
// Remember the blocks that were recorded down in the moveOutNodes array
|
||||
// to prevent duplicates.
|
||||
if ( bqParent && bqChild && !bqChild.getCustomData( 'blockquote_moveout' ) )
|
||||
{
|
||||
moveOutNodes.push( bqChild );
|
||||
CKEDITOR.dom.element.setMarker( database, bqChild, 'blockquote_moveout', true );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
var movedNodes = [],
|
||||
processedBlockquoteBlocks = [];
|
||||
|
||||
database = {};
|
||||
while ( moveOutNodes.length > 0 )
|
||||
{
|
||||
var node = moveOutNodes.shift();
|
||||
bqBlock = node.getParent();
|
||||
|
||||
// If the node is located at the beginning or the end, just take it out
|
||||
// without splitting. Otherwise, split the blockquote node and move the
|
||||
// paragraph in between the two blockquote nodes.
|
||||
if ( !node.getPrevious() )
|
||||
node.remove().insertBefore( bqBlock );
|
||||
else if ( !node.getNext() )
|
||||
node.remove().insertAfter( bqBlock );
|
||||
else
|
||||
{
|
||||
node.breakParent( node.getParent() );
|
||||
processedBlockquoteBlocks.push( node.getNext() );
|
||||
}
|
||||
|
||||
// Remember the blockquote node so we can clear it later (if it becomes empty).
|
||||
if ( !bqBlock.getCustomData( 'blockquote_processed' ) )
|
||||
{
|
||||
processedBlockquoteBlocks.push( bqBlock );
|
||||
CKEDITOR.dom.element.setMarker( database, bqBlock, 'blockquote_processed', true );
|
||||
}
|
||||
|
||||
movedNodes.push( node );
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
// Clear blockquote nodes that have become empty.
|
||||
for ( i = processedBlockquoteBlocks.length - 1 ; i >= 0 ; i-- )
|
||||
{
|
||||
bqBlock = processedBlockquoteBlocks[i];
|
||||
if ( noBlockLeft( bqBlock ) )
|
||||
bqBlock.remove();
|
||||
}
|
||||
|
||||
if ( editor.config.enterMode == CKEDITOR.ENTER_BR )
|
||||
{
|
||||
var firstTime = true;
|
||||
while ( movedNodes.length )
|
||||
{
|
||||
node = movedNodes.shift();
|
||||
|
||||
if ( node.getName() == 'div' )
|
||||
{
|
||||
docFrag = new CKEDITOR.dom.documentFragment( editor.document );
|
||||
var needBeginBr = firstTime && node.getPrevious() &&
|
||||
!( node.getPrevious().type == CKEDITOR.NODE_ELEMENT && node.getPrevious().isBlockBoundary() );
|
||||
if ( needBeginBr )
|
||||
docFrag.append( editor.document.createElement( 'br' ) );
|
||||
|
||||
var needEndBr = node.getNext() &&
|
||||
!( node.getNext().type == CKEDITOR.NODE_ELEMENT && node.getNext().isBlockBoundary() );
|
||||
while ( node.getFirst() )
|
||||
node.getFirst().remove().appendTo( docFrag );
|
||||
|
||||
if ( needEndBr )
|
||||
docFrag.append( editor.document.createElement( 'br' ) );
|
||||
|
||||
docFrag.replace( node );
|
||||
firstTime = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
selection.selectBookmarks( bookmarks );
|
||||
editor.focus();
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'blockquote',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'blockquote', commandObject );
|
||||
|
||||
editor.ui.addButton( 'Blockquote',
|
||||
{
|
||||
label : editor.lang.blockquote,
|
||||
command : 'blockquote'
|
||||
} );
|
||||
|
||||
editor.on( 'selectionChange', onSelectionChange );
|
||||
},
|
||||
|
||||
requires : [ 'domiterator' ]
|
||||
} );
|
||||
})();
|
||||
|
||||
@@ -1,290 +1,290 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'button',
|
||||
{
|
||||
beforeInit : function( editor )
|
||||
{
|
||||
editor.ui.addHandler( CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler );
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Button UI element.
|
||||
* @constant
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.UI_BUTTON = 'button';
|
||||
|
||||
/**
|
||||
* Represents a button UI element. This class should not be called directly. To
|
||||
* create new buttons use {@link CKEDITOR.ui.prototype.addButton} instead.
|
||||
* @constructor
|
||||
* @param {Object} definition The button definition.
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ui.button = function( definition )
|
||||
{
|
||||
// Copy all definition properties to this object.
|
||||
CKEDITOR.tools.extend( this, definition,
|
||||
// Set defaults.
|
||||
{
|
||||
title : definition.label,
|
||||
className : definition.className || ( definition.command && 'cke_button_' + definition.command ) || '',
|
||||
click : definition.click || function( editor )
|
||||
{
|
||||
editor.execCommand( definition.command );
|
||||
}
|
||||
});
|
||||
|
||||
this._ = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* Transforms a button definition in a {@link CKEDITOR.ui.button} instance.
|
||||
* @type Object
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ui.button.handler =
|
||||
{
|
||||
create : function( definition )
|
||||
{
|
||||
return new CKEDITOR.ui.button( definition );
|
||||
}
|
||||
};
|
||||
|
||||
( function()
|
||||
{
|
||||
CKEDITOR.ui.button.prototype =
|
||||
{
|
||||
/**
|
||||
* Renders the button.
|
||||
* @param {CKEDITOR.editor} editor The editor instance which this button is
|
||||
* to be used by.
|
||||
* @param {Array} output The output array to which append the HTML relative
|
||||
* to this button.
|
||||
* @example
|
||||
*/
|
||||
render : function( editor, output )
|
||||
{
|
||||
var env = CKEDITOR.env,
|
||||
id = this._.id = CKEDITOR.tools.getNextId(),
|
||||
classes = '',
|
||||
command = this.command, // Get the command name.
|
||||
clickFn;
|
||||
|
||||
this._.editor = editor;
|
||||
|
||||
var instance =
|
||||
{
|
||||
id : id,
|
||||
button : this,
|
||||
editor : editor,
|
||||
focus : function()
|
||||
{
|
||||
var element = CKEDITOR.document.getById( id );
|
||||
element.focus();
|
||||
},
|
||||
execute : function()
|
||||
{
|
||||
// IE 6 needs some time before execution (#7922)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )
|
||||
CKEDITOR.tools.setTimeout( function(){ this.button.click( editor ); }, 0, this );
|
||||
else
|
||||
this.button.click( editor );
|
||||
}
|
||||
};
|
||||
|
||||
var keydownFn = CKEDITOR.tools.addFunction( function( ev )
|
||||
{
|
||||
if ( instance.onkey )
|
||||
{
|
||||
ev = new CKEDITOR.dom.event( ev );
|
||||
return ( instance.onkey( instance, ev.getKeystroke() ) !== false );
|
||||
}
|
||||
});
|
||||
|
||||
var focusFn = CKEDITOR.tools.addFunction( function( ev )
|
||||
{
|
||||
var retVal;
|
||||
|
||||
if ( instance.onfocus )
|
||||
retVal = ( instance.onfocus( instance, new CKEDITOR.dom.event( ev ) ) !== false );
|
||||
|
||||
// FF2: prevent focus event been bubbled up to editor container, which caused unexpected editor focus.
|
||||
if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 )
|
||||
ev.preventBubble();
|
||||
return retVal;
|
||||
});
|
||||
|
||||
instance.clickFn = clickFn = CKEDITOR.tools.addFunction( instance.execute, instance );
|
||||
|
||||
|
||||
// Indicate a mode sensitive button.
|
||||
if ( this.modes )
|
||||
{
|
||||
var modeStates = {};
|
||||
|
||||
function updateState()
|
||||
{
|
||||
// "this" is a CKEDITOR.ui.button instance.
|
||||
|
||||
var mode = editor.mode;
|
||||
|
||||
if ( mode )
|
||||
{
|
||||
// Restore saved button state.
|
||||
var state = this.modes[ mode ] ? modeStates[ mode ] != undefined ? modeStates[ mode ] :
|
||||
CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;
|
||||
|
||||
this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state );
|
||||
}
|
||||
}
|
||||
|
||||
editor.on( 'beforeModeUnload', function()
|
||||
{
|
||||
if ( editor.mode && this._.state != CKEDITOR.TRISTATE_DISABLED )
|
||||
modeStates[ editor.mode ] = this._.state;
|
||||
}, this );
|
||||
|
||||
editor.on( 'mode', updateState, this);
|
||||
|
||||
// If this button is sensitive to readOnly state, update it accordingly.
|
||||
!this.readOnly && editor.on( 'readOnly', updateState, this);
|
||||
}
|
||||
else if ( command )
|
||||
{
|
||||
// Get the command instance.
|
||||
command = editor.getCommand( command );
|
||||
|
||||
if ( command )
|
||||
{
|
||||
command.on( 'state', function()
|
||||
{
|
||||
this.setState( command.state );
|
||||
}, this);
|
||||
|
||||
classes += 'cke_' + (
|
||||
command.state == CKEDITOR.TRISTATE_ON ? 'on' :
|
||||
command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
|
||||
'off' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !command )
|
||||
classes += 'cke_off';
|
||||
|
||||
if ( this.className )
|
||||
classes += ' ' + this.className;
|
||||
|
||||
output.push(
|
||||
'<span class="cke_button' + ( this.icon && this.icon.indexOf( '.png' ) == -1 ? ' cke_noalphafix' : '' ) + '">',
|
||||
'<a id="', id, '"' +
|
||||
' class="', classes, '"',
|
||||
env.gecko && env.version >= 10900 && !env.hc ? '' : '" href="javascript:void(\''+ ( this.title || '' ).replace( "'", '' )+ '\')"',
|
||||
' title="', this.title, '"' +
|
||||
' tabindex="-1"' +
|
||||
' hidefocus="true"' +
|
||||
' role="button"' +
|
||||
' aria-labelledby="' + id + '_label"' +
|
||||
( this.hasArrow ? ' aria-haspopup="true"' : '' ) );
|
||||
|
||||
// Some browsers don't cancel key events in the keydown but in the
|
||||
// keypress.
|
||||
// TODO: Check if really needed for Gecko+Mac.
|
||||
if ( env.opera || ( env.gecko && env.mac ) )
|
||||
{
|
||||
output.push(
|
||||
' onkeypress="return false;"' );
|
||||
}
|
||||
|
||||
// With Firefox, we need to force the button to redraw, otherwise it
|
||||
// will remain in the focus state.
|
||||
if ( env.gecko )
|
||||
{
|
||||
output.push(
|
||||
' onblur="this.style.cssText = this.style.cssText;"' );
|
||||
}
|
||||
|
||||
output.push(
|
||||
' onkeydown="return CKEDITOR.tools.callFunction(', keydownFn, ', event);"' +
|
||||
' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);" ' +
|
||||
( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188
|
||||
'="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
|
||||
'<span class="cke_icon"' );
|
||||
|
||||
if ( this.icon )
|
||||
{
|
||||
var offset = ( this.iconOffset || 0 ) * -16;
|
||||
output.push( ' style="background-image:url(', CKEDITOR.getUrl( this.icon ), ');background-position:0 ' + offset + 'px;"' );
|
||||
}
|
||||
|
||||
output.push(
|
||||
'> </span>' +
|
||||
'<span id="', id, '_label" class="cke_label">', this.label, '</span>' );
|
||||
|
||||
if ( this.hasArrow )
|
||||
{
|
||||
output.push(
|
||||
'<span class="cke_buttonarrow">'
|
||||
// BLACK DOWN-POINTING TRIANGLE
|
||||
+ ( CKEDITOR.env.hc ? '▼' : ' ' )
|
||||
+ '</span>' );
|
||||
}
|
||||
|
||||
output.push(
|
||||
'</a>',
|
||||
'</span>' );
|
||||
|
||||
if ( this.onRender )
|
||||
this.onRender();
|
||||
|
||||
return instance;
|
||||
},
|
||||
|
||||
setState : function( state )
|
||||
{
|
||||
if ( this._.state == state )
|
||||
return false;
|
||||
|
||||
this._.state = state;
|
||||
|
||||
var element = CKEDITOR.document.getById( this._.id );
|
||||
|
||||
if ( element )
|
||||
{
|
||||
element.setState( state );
|
||||
state == CKEDITOR.TRISTATE_DISABLED ?
|
||||
element.setAttribute( 'aria-disabled', true ) :
|
||||
element.removeAttribute( 'aria-disabled' );
|
||||
|
||||
state == CKEDITOR.TRISTATE_ON ?
|
||||
element.setAttribute( 'aria-pressed', true ) :
|
||||
element.removeAttribute( 'aria-pressed' );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
/**
|
||||
* Adds a button definition to the UI elements list.
|
||||
* @param {String} name The button name.
|
||||
* @param {Object} definition The button definition.
|
||||
* @example
|
||||
* editorInstance.ui.addButton( 'MyBold',
|
||||
* {
|
||||
* label : 'My Bold',
|
||||
* command : 'bold'
|
||||
* });
|
||||
*/
|
||||
CKEDITOR.ui.prototype.addButton = function( name, definition )
|
||||
{
|
||||
this.add( name, CKEDITOR.UI_BUTTON, definition );
|
||||
};
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'button',
|
||||
{
|
||||
beforeInit : function( editor )
|
||||
{
|
||||
editor.ui.addHandler( CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler );
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Button UI element.
|
||||
* @constant
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.UI_BUTTON = 'button';
|
||||
|
||||
/**
|
||||
* Represents a button UI element. This class should not be called directly. To
|
||||
* create new buttons use {@link CKEDITOR.ui.prototype.addButton} instead.
|
||||
* @constructor
|
||||
* @param {Object} definition The button definition.
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ui.button = function( definition )
|
||||
{
|
||||
// Copy all definition properties to this object.
|
||||
CKEDITOR.tools.extend( this, definition,
|
||||
// Set defaults.
|
||||
{
|
||||
title : definition.label,
|
||||
className : definition.className || ( definition.command && 'cke_button_' + definition.command ) || '',
|
||||
click : definition.click || function( editor )
|
||||
{
|
||||
editor.execCommand( definition.command );
|
||||
}
|
||||
});
|
||||
|
||||
this._ = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* Transforms a button definition in a {@link CKEDITOR.ui.button} instance.
|
||||
* @type Object
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ui.button.handler =
|
||||
{
|
||||
create : function( definition )
|
||||
{
|
||||
return new CKEDITOR.ui.button( definition );
|
||||
}
|
||||
};
|
||||
|
||||
( function()
|
||||
{
|
||||
CKEDITOR.ui.button.prototype =
|
||||
{
|
||||
/**
|
||||
* Renders the button.
|
||||
* @param {CKEDITOR.editor} editor The editor instance which this button is
|
||||
* to be used by.
|
||||
* @param {Array} output The output array to which append the HTML relative
|
||||
* to this button.
|
||||
* @example
|
||||
*/
|
||||
render : function( editor, output )
|
||||
{
|
||||
var env = CKEDITOR.env,
|
||||
id = this._.id = CKEDITOR.tools.getNextId(),
|
||||
classes = '',
|
||||
command = this.command, // Get the command name.
|
||||
clickFn;
|
||||
|
||||
this._.editor = editor;
|
||||
|
||||
var instance =
|
||||
{
|
||||
id : id,
|
||||
button : this,
|
||||
editor : editor,
|
||||
focus : function()
|
||||
{
|
||||
var element = CKEDITOR.document.getById( id );
|
||||
element.focus();
|
||||
},
|
||||
execute : function()
|
||||
{
|
||||
// IE 6 needs some time before execution (#7922)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )
|
||||
CKEDITOR.tools.setTimeout( function(){ this.button.click( editor ); }, 0, this );
|
||||
else
|
||||
this.button.click( editor );
|
||||
}
|
||||
};
|
||||
|
||||
var keydownFn = CKEDITOR.tools.addFunction( function( ev )
|
||||
{
|
||||
if ( instance.onkey )
|
||||
{
|
||||
ev = new CKEDITOR.dom.event( ev );
|
||||
return ( instance.onkey( instance, ev.getKeystroke() ) !== false );
|
||||
}
|
||||
});
|
||||
|
||||
var focusFn = CKEDITOR.tools.addFunction( function( ev )
|
||||
{
|
||||
var retVal;
|
||||
|
||||
if ( instance.onfocus )
|
||||
retVal = ( instance.onfocus( instance, new CKEDITOR.dom.event( ev ) ) !== false );
|
||||
|
||||
// FF2: prevent focus event been bubbled up to editor container, which caused unexpected editor focus.
|
||||
if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 )
|
||||
ev.preventBubble();
|
||||
return retVal;
|
||||
});
|
||||
|
||||
instance.clickFn = clickFn = CKEDITOR.tools.addFunction( instance.execute, instance );
|
||||
|
||||
|
||||
// Indicate a mode sensitive button.
|
||||
if ( this.modes )
|
||||
{
|
||||
var modeStates = {};
|
||||
|
||||
function updateState()
|
||||
{
|
||||
// "this" is a CKEDITOR.ui.button instance.
|
||||
|
||||
var mode = editor.mode;
|
||||
|
||||
if ( mode )
|
||||
{
|
||||
// Restore saved button state.
|
||||
var state = this.modes[ mode ] ? modeStates[ mode ] != undefined ? modeStates[ mode ] :
|
||||
CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;
|
||||
|
||||
this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state );
|
||||
}
|
||||
}
|
||||
|
||||
editor.on( 'beforeModeUnload', function()
|
||||
{
|
||||
if ( editor.mode && this._.state != CKEDITOR.TRISTATE_DISABLED )
|
||||
modeStates[ editor.mode ] = this._.state;
|
||||
}, this );
|
||||
|
||||
editor.on( 'mode', updateState, this);
|
||||
|
||||
// If this button is sensitive to readOnly state, update it accordingly.
|
||||
!this.readOnly && editor.on( 'readOnly', updateState, this);
|
||||
}
|
||||
else if ( command )
|
||||
{
|
||||
// Get the command instance.
|
||||
command = editor.getCommand( command );
|
||||
|
||||
if ( command )
|
||||
{
|
||||
command.on( 'state', function()
|
||||
{
|
||||
this.setState( command.state );
|
||||
}, this);
|
||||
|
||||
classes += 'cke_' + (
|
||||
command.state == CKEDITOR.TRISTATE_ON ? 'on' :
|
||||
command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
|
||||
'off' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !command )
|
||||
classes += 'cke_off';
|
||||
|
||||
if ( this.className )
|
||||
classes += ' ' + this.className;
|
||||
|
||||
output.push(
|
||||
'<span class="cke_button' + ( this.icon && this.icon.indexOf( '.png' ) == -1 ? ' cke_noalphafix' : '' ) + '">',
|
||||
'<a id="', id, '"' +
|
||||
' class="', classes, '"',
|
||||
env.gecko && env.version >= 10900 && !env.hc ? '' : '" href="javascript:void(\''+ ( this.title || '' ).replace( "'", '' )+ '\')"',
|
||||
' title="', this.title, '"' +
|
||||
' tabindex="-1"' +
|
||||
' hidefocus="true"' +
|
||||
' role="button"' +
|
||||
' aria-labelledby="' + id + '_label"' +
|
||||
( this.hasArrow ? ' aria-haspopup="true"' : '' ) );
|
||||
|
||||
// Some browsers don't cancel key events in the keydown but in the
|
||||
// keypress.
|
||||
// TODO: Check if really needed for Gecko+Mac.
|
||||
if ( env.opera || ( env.gecko && env.mac ) )
|
||||
{
|
||||
output.push(
|
||||
' onkeypress="return false;"' );
|
||||
}
|
||||
|
||||
// With Firefox, we need to force the button to redraw, otherwise it
|
||||
// will remain in the focus state.
|
||||
if ( env.gecko )
|
||||
{
|
||||
output.push(
|
||||
' onblur="this.style.cssText = this.style.cssText;"' );
|
||||
}
|
||||
|
||||
output.push(
|
||||
' onkeydown="return CKEDITOR.tools.callFunction(', keydownFn, ', event);"' +
|
||||
' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);" ' +
|
||||
( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188
|
||||
'="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
|
||||
'<span class="cke_icon"' );
|
||||
|
||||
if ( this.icon )
|
||||
{
|
||||
var offset = ( this.iconOffset || 0 ) * -16;
|
||||
output.push( ' style="background-image:url(', CKEDITOR.getUrl( this.icon ), ');background-position:0 ' + offset + 'px;"' );
|
||||
}
|
||||
|
||||
output.push(
|
||||
'> </span>' +
|
||||
'<span id="', id, '_label" class="cke_label">', this.label, '</span>' );
|
||||
|
||||
if ( this.hasArrow )
|
||||
{
|
||||
output.push(
|
||||
'<span class="cke_buttonarrow">'
|
||||
// BLACK DOWN-POINTING TRIANGLE
|
||||
+ ( CKEDITOR.env.hc ? '▼' : ' ' )
|
||||
+ '</span>' );
|
||||
}
|
||||
|
||||
output.push(
|
||||
'</a>',
|
||||
'</span>' );
|
||||
|
||||
if ( this.onRender )
|
||||
this.onRender();
|
||||
|
||||
return instance;
|
||||
},
|
||||
|
||||
setState : function( state )
|
||||
{
|
||||
if ( this._.state == state )
|
||||
return false;
|
||||
|
||||
this._.state = state;
|
||||
|
||||
var element = CKEDITOR.document.getById( this._.id );
|
||||
|
||||
if ( element )
|
||||
{
|
||||
element.setState( state );
|
||||
state == CKEDITOR.TRISTATE_DISABLED ?
|
||||
element.setAttribute( 'aria-disabled', true ) :
|
||||
element.removeAttribute( 'aria-disabled' );
|
||||
|
||||
state == CKEDITOR.TRISTATE_ON ?
|
||||
element.setAttribute( 'aria-pressed', true ) :
|
||||
element.removeAttribute( 'aria-pressed' );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
/**
|
||||
* Adds a button definition to the UI elements list.
|
||||
* @param {String} name The button name.
|
||||
* @param {Object} definition The button definition.
|
||||
* @example
|
||||
* editorInstance.ui.addButton( 'MyBold',
|
||||
* {
|
||||
* label : 'My Bold',
|
||||
* command : 'bold'
|
||||
* });
|
||||
*/
|
||||
CKEDITOR.ui.prototype.addButton = function( name, definition )
|
||||
{
|
||||
this.add( name, CKEDITOR.UI_BUTTON, definition );
|
||||
};
|
||||
|
||||
@@ -1,223 +1,223 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
{
|
||||
var lang = editor.lang.clipboard;
|
||||
var isCustomDomain = CKEDITOR.env.isCustomDomain();
|
||||
|
||||
function onPasteFrameLoad( win )
|
||||
{
|
||||
var doc = new CKEDITOR.dom.document( win.document ),
|
||||
docElement = doc.$;
|
||||
|
||||
var script = doc.getById( 'cke_actscrpt' );
|
||||
script && script.remove();
|
||||
|
||||
CKEDITOR.env.ie ?
|
||||
docElement.body.contentEditable = "true" :
|
||||
docElement.designMode = "on";
|
||||
|
||||
// IE before version 8 will leave cursor blinking inside the document after
|
||||
// editor blurred unless we clean up the selection. (#4716)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
|
||||
{
|
||||
doc.getWindow().on( 'blur', function()
|
||||
{
|
||||
docElement.selection.empty();
|
||||
} );
|
||||
}
|
||||
|
||||
doc.on( "keydown", function( e )
|
||||
{
|
||||
var domEvent = e.data,
|
||||
key = domEvent.getKeystroke(),
|
||||
processed;
|
||||
|
||||
switch( key )
|
||||
{
|
||||
case 27 :
|
||||
this.hide();
|
||||
processed = 1;
|
||||
break;
|
||||
|
||||
case 9 :
|
||||
case CKEDITOR.SHIFT + 9 :
|
||||
this.changeFocus( 1 );
|
||||
processed = 1;
|
||||
}
|
||||
|
||||
processed && domEvent.preventDefault();
|
||||
}, this );
|
||||
|
||||
editor.fire( 'ariaWidget', new CKEDITOR.dom.element( win.frameElement ) );
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350,
|
||||
minHeight : CKEDITOR.env.quirks ? 250 : 245,
|
||||
onShow : function()
|
||||
{
|
||||
// FIREFOX BUG: Force the browser to render the dialog to make the to-be-
|
||||
// inserted iframe editable. (#3366)
|
||||
this.parts.dialog.$.offsetHeight;
|
||||
|
||||
this.setupContent();
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
if ( CKEDITOR.env.ie )
|
||||
this.getParentEditor().document.getBody().$.contentEditable = 'true';
|
||||
},
|
||||
|
||||
onLoad : function()
|
||||
{
|
||||
if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) && editor.lang.dir == 'rtl' )
|
||||
this.parts.contents.setStyle( 'overflow', 'hidden' );
|
||||
},
|
||||
|
||||
onOk : function()
|
||||
{
|
||||
this.commitContent();
|
||||
},
|
||||
|
||||
contents : [
|
||||
{
|
||||
id : 'general',
|
||||
label : editor.lang.common.generalTab,
|
||||
elements : [
|
||||
{
|
||||
type : 'html',
|
||||
id : 'securityMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">' + lang.securityMsg + '</div>'
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
id : 'pasteMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">'+lang.pasteMsg +'</div>'
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
id : 'editing_area',
|
||||
style : 'width: 100%; height: 100%;',
|
||||
html : '',
|
||||
focus : function()
|
||||
{
|
||||
var win = this.getInputElement().$.contentWindow;
|
||||
|
||||
// #3291 : JAWS needs the 500ms delay to detect that the editor iframe
|
||||
// iframe is no longer editable. So that it will put the focus into the
|
||||
// Paste from Word dialog's editable area instead.
|
||||
setTimeout( function()
|
||||
{
|
||||
win.focus();
|
||||
}, 500 );
|
||||
},
|
||||
setup : function()
|
||||
{
|
||||
var dialog = this.getDialog();
|
||||
var htmlToLoad =
|
||||
'<html dir="' + editor.config.contentsLangDirection + '"' +
|
||||
' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' +
|
||||
'<head><style>body { margin: 3px; height: 95%; } </style></head><body>' +
|
||||
'<script id="cke_actscrpt" type="text/javascript">' +
|
||||
'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, dialog ) + ', this );' +
|
||||
'</script></body>' +
|
||||
'</html>';
|
||||
|
||||
var src =
|
||||
CKEDITOR.env.air ?
|
||||
'javascript:void(0)' :
|
||||
isCustomDomain ?
|
||||
'javascript:void((function(){' +
|
||||
'document.open();' +
|
||||
'document.domain=\'' + document.domain + '\';' +
|
||||
'document.close();' +
|
||||
'})())"'
|
||||
:
|
||||
'';
|
||||
|
||||
var iframe = CKEDITOR.dom.element.createFromHtml(
|
||||
'<iframe' +
|
||||
' class="cke_pasteframe"' +
|
||||
' frameborder="0" ' +
|
||||
' allowTransparency="true"' +
|
||||
' src="' + src + '"' +
|
||||
' role="region"' +
|
||||
' aria-label="' + lang.pasteArea + '"' +
|
||||
' aria-describedby="' + dialog.getContentElement( 'general', 'pasteMsg' ).domId + '"' +
|
||||
' aria-multiple="true"' +
|
||||
'></iframe>' );
|
||||
|
||||
iframe.on( 'load', function( e )
|
||||
{
|
||||
e.removeListener();
|
||||
|
||||
var doc = iframe.getFrameDocument();
|
||||
doc.write( htmlToLoad );
|
||||
|
||||
if ( CKEDITOR.env.air )
|
||||
onPasteFrameLoad.call( this, doc.getWindow().$ );
|
||||
}, dialog );
|
||||
|
||||
iframe.setCustomData( 'dialog', dialog );
|
||||
|
||||
var container = this.getElement();
|
||||
container.setHtml( '' );
|
||||
container.append( iframe );
|
||||
|
||||
// IE need a redirect on focus to make
|
||||
// the cursor blinking inside iframe. (#5461)
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' );
|
||||
focusGrabber.on( 'focus', function()
|
||||
{
|
||||
iframe.$.contentWindow.focus();
|
||||
});
|
||||
container.append( focusGrabber );
|
||||
|
||||
// Override focus handler on field.
|
||||
this.focus = function()
|
||||
{
|
||||
focusGrabber.focus();
|
||||
this.fire( 'focus' );
|
||||
};
|
||||
}
|
||||
|
||||
this.getInputElement = function(){ return iframe; };
|
||||
|
||||
// Force container to scale in IE.
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
container.setStyle( 'display', 'block' );
|
||||
container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
|
||||
}
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var container = this.getElement(),
|
||||
editor = this.getDialog().getParentEditor(),
|
||||
body = this.getInputElement().getFrameDocument().getBody(),
|
||||
bogus = body.getBogus(),
|
||||
html;
|
||||
bogus && bogus.remove();
|
||||
|
||||
// Saving the contents so changes until paste is complete will not take place (#7500)
|
||||
html = body.getHtml();
|
||||
|
||||
setTimeout( function(){
|
||||
editor.fire( 'paste', { 'html' : html } );
|
||||
}, 0 );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
{
|
||||
var lang = editor.lang.clipboard;
|
||||
var isCustomDomain = CKEDITOR.env.isCustomDomain();
|
||||
|
||||
function onPasteFrameLoad( win )
|
||||
{
|
||||
var doc = new CKEDITOR.dom.document( win.document ),
|
||||
docElement = doc.$;
|
||||
|
||||
var script = doc.getById( 'cke_actscrpt' );
|
||||
script && script.remove();
|
||||
|
||||
CKEDITOR.env.ie ?
|
||||
docElement.body.contentEditable = "true" :
|
||||
docElement.designMode = "on";
|
||||
|
||||
// IE before version 8 will leave cursor blinking inside the document after
|
||||
// editor blurred unless we clean up the selection. (#4716)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
|
||||
{
|
||||
doc.getWindow().on( 'blur', function()
|
||||
{
|
||||
docElement.selection.empty();
|
||||
} );
|
||||
}
|
||||
|
||||
doc.on( "keydown", function( e )
|
||||
{
|
||||
var domEvent = e.data,
|
||||
key = domEvent.getKeystroke(),
|
||||
processed;
|
||||
|
||||
switch( key )
|
||||
{
|
||||
case 27 :
|
||||
this.hide();
|
||||
processed = 1;
|
||||
break;
|
||||
|
||||
case 9 :
|
||||
case CKEDITOR.SHIFT + 9 :
|
||||
this.changeFocus( 1 );
|
||||
processed = 1;
|
||||
}
|
||||
|
||||
processed && domEvent.preventDefault();
|
||||
}, this );
|
||||
|
||||
editor.fire( 'ariaWidget', new CKEDITOR.dom.element( win.frameElement ) );
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350,
|
||||
minHeight : CKEDITOR.env.quirks ? 250 : 245,
|
||||
onShow : function()
|
||||
{
|
||||
// FIREFOX BUG: Force the browser to render the dialog to make the to-be-
|
||||
// inserted iframe editable. (#3366)
|
||||
this.parts.dialog.$.offsetHeight;
|
||||
|
||||
this.setupContent();
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
if ( CKEDITOR.env.ie )
|
||||
this.getParentEditor().document.getBody().$.contentEditable = 'true';
|
||||
},
|
||||
|
||||
onLoad : function()
|
||||
{
|
||||
if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) && editor.lang.dir == 'rtl' )
|
||||
this.parts.contents.setStyle( 'overflow', 'hidden' );
|
||||
},
|
||||
|
||||
onOk : function()
|
||||
{
|
||||
this.commitContent();
|
||||
},
|
||||
|
||||
contents : [
|
||||
{
|
||||
id : 'general',
|
||||
label : editor.lang.common.generalTab,
|
||||
elements : [
|
||||
{
|
||||
type : 'html',
|
||||
id : 'securityMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">' + lang.securityMsg + '</div>'
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
id : 'pasteMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">'+lang.pasteMsg +'</div>'
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
id : 'editing_area',
|
||||
style : 'width: 100%; height: 100%;',
|
||||
html : '',
|
||||
focus : function()
|
||||
{
|
||||
var win = this.getInputElement().$.contentWindow;
|
||||
|
||||
// #3291 : JAWS needs the 500ms delay to detect that the editor iframe
|
||||
// iframe is no longer editable. So that it will put the focus into the
|
||||
// Paste from Word dialog's editable area instead.
|
||||
setTimeout( function()
|
||||
{
|
||||
win.focus();
|
||||
}, 500 );
|
||||
},
|
||||
setup : function()
|
||||
{
|
||||
var dialog = this.getDialog();
|
||||
var htmlToLoad =
|
||||
'<html dir="' + editor.config.contentsLangDirection + '"' +
|
||||
' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' +
|
||||
'<head><style>body { margin: 3px; height: 95%; } </style></head><body>' +
|
||||
'<script id="cke_actscrpt" type="text/javascript">' +
|
||||
'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, dialog ) + ', this );' +
|
||||
'</script></body>' +
|
||||
'</html>';
|
||||
|
||||
var src =
|
||||
CKEDITOR.env.air ?
|
||||
'javascript:void(0)' :
|
||||
isCustomDomain ?
|
||||
'javascript:void((function(){' +
|
||||
'document.open();' +
|
||||
'document.domain=\'' + document.domain + '\';' +
|
||||
'document.close();' +
|
||||
'})())"'
|
||||
:
|
||||
'';
|
||||
|
||||
var iframe = CKEDITOR.dom.element.createFromHtml(
|
||||
'<iframe' +
|
||||
' class="cke_pasteframe"' +
|
||||
' frameborder="0" ' +
|
||||
' allowTransparency="true"' +
|
||||
' src="' + src + '"' +
|
||||
' role="region"' +
|
||||
' aria-label="' + lang.pasteArea + '"' +
|
||||
' aria-describedby="' + dialog.getContentElement( 'general', 'pasteMsg' ).domId + '"' +
|
||||
' aria-multiple="true"' +
|
||||
'></iframe>' );
|
||||
|
||||
iframe.on( 'load', function( e )
|
||||
{
|
||||
e.removeListener();
|
||||
|
||||
var doc = iframe.getFrameDocument();
|
||||
doc.write( htmlToLoad );
|
||||
|
||||
if ( CKEDITOR.env.air )
|
||||
onPasteFrameLoad.call( this, doc.getWindow().$ );
|
||||
}, dialog );
|
||||
|
||||
iframe.setCustomData( 'dialog', dialog );
|
||||
|
||||
var container = this.getElement();
|
||||
container.setHtml( '' );
|
||||
container.append( iframe );
|
||||
|
||||
// IE need a redirect on focus to make
|
||||
// the cursor blinking inside iframe. (#5461)
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' );
|
||||
focusGrabber.on( 'focus', function()
|
||||
{
|
||||
iframe.$.contentWindow.focus();
|
||||
});
|
||||
container.append( focusGrabber );
|
||||
|
||||
// Override focus handler on field.
|
||||
this.focus = function()
|
||||
{
|
||||
focusGrabber.focus();
|
||||
this.fire( 'focus' );
|
||||
};
|
||||
}
|
||||
|
||||
this.getInputElement = function(){ return iframe; };
|
||||
|
||||
// Force container to scale in IE.
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
container.setStyle( 'display', 'block' );
|
||||
container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
|
||||
}
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var container = this.getElement(),
|
||||
editor = this.getDialog().getParentEditor(),
|
||||
body = this.getInputElement().getFrameDocument().getBody(),
|
||||
bogus = body.getBogus(),
|
||||
html;
|
||||
bogus && bogus.remove();
|
||||
|
||||
// Saving the contents so changes until paste is complete will not take place (#7500)
|
||||
html = body.getHtml();
|
||||
|
||||
setTimeout( function(){
|
||||
editor.fire( 'paste', { 'html' : html } );
|
||||
}, 0 );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,300 +1,300 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The "colorbutton" plugin that makes it possible to assign
|
||||
* text and background colors to editor contents.
|
||||
*
|
||||
*/
|
||||
CKEDITOR.plugins.add( 'colorbutton',
|
||||
{
|
||||
requires : [ 'panelbutton', 'floatpanel', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.colorButton;
|
||||
|
||||
var clickFn;
|
||||
|
||||
if ( !CKEDITOR.env.hc )
|
||||
{
|
||||
addButton( 'TextColor', 'fore', lang.textColorTitle );
|
||||
addButton( 'BGColor', 'back', lang.bgColorTitle );
|
||||
}
|
||||
|
||||
function addButton( name, type, title )
|
||||
{
|
||||
var colorBoxId = CKEDITOR.tools.getNextId() + '_colorBox';
|
||||
editor.ui.add( name, CKEDITOR.UI_PANELBUTTON,
|
||||
{
|
||||
label : title,
|
||||
title : title,
|
||||
className : 'cke_button_' + name.toLowerCase(),
|
||||
modes : { wysiwyg : 1 },
|
||||
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css,
|
||||
attributes : { role : 'listbox', 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
onBlock : function( panel, block )
|
||||
{
|
||||
block.autoSize = true;
|
||||
block.element.addClass( 'cke_colorblock' );
|
||||
block.element.setHtml( renderColors( panel, type, colorBoxId ) );
|
||||
// The block should not have scrollbars (#5933, #6056)
|
||||
block.element.getDocument().getBody().setStyle( 'overflow', 'hidden' );
|
||||
|
||||
CKEDITOR.ui.fire( 'ready', this );
|
||||
|
||||
var keys = block.keys;
|
||||
var rtl = editor.lang.dir == 'rtl';
|
||||
keys[ rtl ? 37 : 39 ] = 'next'; // ARROW-RIGHT
|
||||
keys[ 40 ] = 'next'; // ARROW-DOWN
|
||||
keys[ 9 ] = 'next'; // TAB
|
||||
keys[ rtl ? 39 : 37 ] = 'prev'; // ARROW-LEFT
|
||||
keys[ 38 ] = 'prev'; // ARROW-UP
|
||||
keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB
|
||||
keys[ 32 ] = 'click'; // SPACE
|
||||
},
|
||||
|
||||
// The automatic colorbox should represent the real color (#6010)
|
||||
onOpen : function()
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
block = selection && selection.getStartElement(),
|
||||
path = new CKEDITOR.dom.elementPath( block ),
|
||||
color;
|
||||
|
||||
// Find the closest block element.
|
||||
block = path.block || path.blockLimit || editor.document.getBody();
|
||||
|
||||
// The background color might be transparent. In that case, look up the color in the DOM tree.
|
||||
do
|
||||
{
|
||||
color = block && block.getComputedStyle( type == 'back' ? 'background-color' : 'color' ) || 'transparent';
|
||||
}
|
||||
while ( type == 'back' && color == 'transparent' && block && ( block = block.getParent() ) );
|
||||
|
||||
// The box should never be transparent.
|
||||
if ( !color || color == 'transparent' )
|
||||
color = '#ffffff';
|
||||
|
||||
this._.panel._.iframe.getFrameDocument().getById( colorBoxId ).setStyle( 'background-color', color );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function renderColors( panel, type, colorBoxId )
|
||||
{
|
||||
var output = [],
|
||||
colors = config.colorButton_colors.split( ',' );
|
||||
|
||||
var clickFn = CKEDITOR.tools.addFunction( function( color, type )
|
||||
{
|
||||
if ( color == '?' )
|
||||
{
|
||||
var applyColorStyle = arguments.callee;
|
||||
function onColorDialogClose( evt )
|
||||
{
|
||||
this.removeListener( 'ok', onColorDialogClose );
|
||||
this.removeListener( 'cancel', onColorDialogClose );
|
||||
|
||||
evt.name == 'ok' && applyColorStyle( this.getContentElement( 'picker', 'selectedColor' ).getValue(), type );
|
||||
}
|
||||
|
||||
editor.openDialog( 'colordialog', function()
|
||||
{
|
||||
this.on( 'ok', onColorDialogClose );
|
||||
this.on( 'cancel', onColorDialogClose );
|
||||
} );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
editor.focus();
|
||||
|
||||
panel.hide( false );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
// Clean up any conflicting style within the range.
|
||||
new CKEDITOR.style( config['colorButton_' + type + 'Style'], { color : 'inherit' } ).remove( editor.document );
|
||||
|
||||
if ( color )
|
||||
{
|
||||
var colorStyle = config['colorButton_' + type + 'Style'];
|
||||
|
||||
colorStyle.childRule = type == 'back' ?
|
||||
function( element )
|
||||
{
|
||||
// It's better to apply background color as the innermost style. (#3599)
|
||||
// Except for "unstylable elements". (#6103)
|
||||
return isUnstylable( element );
|
||||
}
|
||||
:
|
||||
function( element )
|
||||
{
|
||||
// Fore color style must be applied inside links instead of around it. (#4772,#6908)
|
||||
return !( element.is( 'a' ) || element.getElementsByTag( 'a' ).count() ) || isUnstylable( element );
|
||||
};
|
||||
|
||||
new CKEDITOR.style( colorStyle, { color : color } ).apply( editor.document );
|
||||
}
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
});
|
||||
|
||||
// Render the "Automatic" button.
|
||||
output.push(
|
||||
'<a class="cke_colorauto" _cke_focus=1 hidefocus=true' +
|
||||
' title="', lang.auto, '"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',null,\'', type, '\');return false;"' +
|
||||
' href="javascript:void(\'', lang.auto, '\')"' +
|
||||
' role="option">' +
|
||||
'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">' +
|
||||
'<tr>' +
|
||||
'<td>' +
|
||||
'<span class="cke_colorbox" id="', colorBoxId, '"></span>' +
|
||||
'</td>' +
|
||||
'<td colspan=7 align=center>',
|
||||
lang.auto,
|
||||
'</td>' +
|
||||
'</tr>' +
|
||||
'</table>' +
|
||||
'</a>' +
|
||||
'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">' );
|
||||
|
||||
// Render the color boxes.
|
||||
for ( var i = 0 ; i < colors.length ; i++ )
|
||||
{
|
||||
if ( ( i % 8 ) === 0 )
|
||||
output.push( '</tr><tr>' );
|
||||
|
||||
var parts = colors[ i ].split( '/' ),
|
||||
colorName = parts[ 0 ],
|
||||
colorCode = parts[ 1 ] || colorName;
|
||||
|
||||
// The data can be only a color code (without #) or colorName + color code
|
||||
// If only a color code is provided, then the colorName is the color with the hash
|
||||
// Convert the color from RGB to RRGGBB for better compatibility with IE and <font>. See #5676
|
||||
if (!parts[1])
|
||||
colorName = '#' + colorName.replace( /^(.)(.)(.)$/, '$1$1$2$2$3$3' );
|
||||
|
||||
var colorLabel = editor.lang.colors[ colorCode ] || colorCode;
|
||||
output.push(
|
||||
'<td>' +
|
||||
'<a class="cke_colorbox" _cke_focus=1 hidefocus=true' +
|
||||
' title="', colorLabel, '"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'', colorName, '\',\'', type, '\'); return false;"' +
|
||||
' href="javascript:void(\'', colorLabel, '\')"' +
|
||||
' role="option">' +
|
||||
'<span class="cke_colorbox" style="background-color:#', colorCode, '"></span>' +
|
||||
'</a>' +
|
||||
'</td>' );
|
||||
}
|
||||
|
||||
// Render the "More Colors" button.
|
||||
if ( config.colorButton_enableMore === undefined || config.colorButton_enableMore )
|
||||
{
|
||||
output.push(
|
||||
'</tr>' +
|
||||
'<tr>' +
|
||||
'<td colspan=8 align=center>' +
|
||||
'<a class="cke_colormore" _cke_focus=1 hidefocus=true' +
|
||||
' title="', lang.more, '"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'?\',\'', type, '\');return false;"' +
|
||||
' href="javascript:void(\'', lang.more, '\')"',
|
||||
' role="option">',
|
||||
lang.more,
|
||||
'</a>' +
|
||||
'</td>' ); // tr is later in the code.
|
||||
}
|
||||
|
||||
output.push( '</tr></table>' );
|
||||
|
||||
return output.join( '' );
|
||||
}
|
||||
|
||||
function isUnstylable( ele )
|
||||
{
|
||||
return ( ele.getAttribute( 'contentEditable' ) == 'false' ) || ele.getAttribute( 'data-nostyle' );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Whether to enable the <strong>More Colors</strong> button in the color selectors.
|
||||
* @name CKEDITOR.config.colorButton_enableMore
|
||||
* @default <code>true</code>
|
||||
* @type Boolean
|
||||
* @example
|
||||
* config.colorButton_enableMore = false;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Defines the colors to be displayed in the color selectors. This is a string
|
||||
* containing hexadecimal notation for HTML colors, without the "#" prefix.
|
||||
* <br /><br />
|
||||
* Since 3.3: A color name may optionally be defined by prefixing the entries with
|
||||
* a name and the slash character. For example, "FontColor1/FF9900" will be
|
||||
* displayed as the color #FF9900 in the selector, but will be output as "FontColor1".
|
||||
* @name CKEDITOR.config.colorButton_colors
|
||||
* @type String
|
||||
* @default <code>'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF'</code>
|
||||
* @example
|
||||
* // Brazil colors only.
|
||||
* config.colorButton_colors = '00923E,F8C100,28166F';
|
||||
* @example
|
||||
* config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00'
|
||||
*/
|
||||
CKEDITOR.config.colorButton_colors =
|
||||
'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +
|
||||
'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' +
|
||||
'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' +
|
||||
'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' +
|
||||
'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
|
||||
|
||||
/**
|
||||
* Stores the style definition that applies the text foreground color.
|
||||
* @name CKEDITOR.config.colorButton_foreStyle
|
||||
* @type Object
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* config.colorButton_foreStyle =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'color' : '#(color)' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.colorButton_foreStyle =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'color' : '#(color)' },
|
||||
overrides : [ { element : 'font', attributes : { 'color' : null } } ]
|
||||
};
|
||||
|
||||
/**
|
||||
* Stores the style definition that applies the text background color.
|
||||
* @name CKEDITOR.config.colorButton_backStyle
|
||||
* @type Object
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* config.colorButton_backStyle =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'background-color' : '#(color)' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.colorButton_backStyle =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'background-color' : '#(color)' }
|
||||
};
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The "colorbutton" plugin that makes it possible to assign
|
||||
* text and background colors to editor contents.
|
||||
*
|
||||
*/
|
||||
CKEDITOR.plugins.add( 'colorbutton',
|
||||
{
|
||||
requires : [ 'panelbutton', 'floatpanel', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.colorButton;
|
||||
|
||||
var clickFn;
|
||||
|
||||
if ( !CKEDITOR.env.hc )
|
||||
{
|
||||
addButton( 'TextColor', 'fore', lang.textColorTitle );
|
||||
addButton( 'BGColor', 'back', lang.bgColorTitle );
|
||||
}
|
||||
|
||||
function addButton( name, type, title )
|
||||
{
|
||||
var colorBoxId = CKEDITOR.tools.getNextId() + '_colorBox';
|
||||
editor.ui.add( name, CKEDITOR.UI_PANELBUTTON,
|
||||
{
|
||||
label : title,
|
||||
title : title,
|
||||
className : 'cke_button_' + name.toLowerCase(),
|
||||
modes : { wysiwyg : 1 },
|
||||
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css,
|
||||
attributes : { role : 'listbox', 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
onBlock : function( panel, block )
|
||||
{
|
||||
block.autoSize = true;
|
||||
block.element.addClass( 'cke_colorblock' );
|
||||
block.element.setHtml( renderColors( panel, type, colorBoxId ) );
|
||||
// The block should not have scrollbars (#5933, #6056)
|
||||
block.element.getDocument().getBody().setStyle( 'overflow', 'hidden' );
|
||||
|
||||
CKEDITOR.ui.fire( 'ready', this );
|
||||
|
||||
var keys = block.keys;
|
||||
var rtl = editor.lang.dir == 'rtl';
|
||||
keys[ rtl ? 37 : 39 ] = 'next'; // ARROW-RIGHT
|
||||
keys[ 40 ] = 'next'; // ARROW-DOWN
|
||||
keys[ 9 ] = 'next'; // TAB
|
||||
keys[ rtl ? 39 : 37 ] = 'prev'; // ARROW-LEFT
|
||||
keys[ 38 ] = 'prev'; // ARROW-UP
|
||||
keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB
|
||||
keys[ 32 ] = 'click'; // SPACE
|
||||
},
|
||||
|
||||
// The automatic colorbox should represent the real color (#6010)
|
||||
onOpen : function()
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
block = selection && selection.getStartElement(),
|
||||
path = new CKEDITOR.dom.elementPath( block ),
|
||||
color;
|
||||
|
||||
// Find the closest block element.
|
||||
block = path.block || path.blockLimit || editor.document.getBody();
|
||||
|
||||
// The background color might be transparent. In that case, look up the color in the DOM tree.
|
||||
do
|
||||
{
|
||||
color = block && block.getComputedStyle( type == 'back' ? 'background-color' : 'color' ) || 'transparent';
|
||||
}
|
||||
while ( type == 'back' && color == 'transparent' && block && ( block = block.getParent() ) );
|
||||
|
||||
// The box should never be transparent.
|
||||
if ( !color || color == 'transparent' )
|
||||
color = '#ffffff';
|
||||
|
||||
this._.panel._.iframe.getFrameDocument().getById( colorBoxId ).setStyle( 'background-color', color );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function renderColors( panel, type, colorBoxId )
|
||||
{
|
||||
var output = [],
|
||||
colors = config.colorButton_colors.split( ',' );
|
||||
|
||||
var clickFn = CKEDITOR.tools.addFunction( function( color, type )
|
||||
{
|
||||
if ( color == '?' )
|
||||
{
|
||||
var applyColorStyle = arguments.callee;
|
||||
function onColorDialogClose( evt )
|
||||
{
|
||||
this.removeListener( 'ok', onColorDialogClose );
|
||||
this.removeListener( 'cancel', onColorDialogClose );
|
||||
|
||||
evt.name == 'ok' && applyColorStyle( this.getContentElement( 'picker', 'selectedColor' ).getValue(), type );
|
||||
}
|
||||
|
||||
editor.openDialog( 'colordialog', function()
|
||||
{
|
||||
this.on( 'ok', onColorDialogClose );
|
||||
this.on( 'cancel', onColorDialogClose );
|
||||
} );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
editor.focus();
|
||||
|
||||
panel.hide( false );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
// Clean up any conflicting style within the range.
|
||||
new CKEDITOR.style( config['colorButton_' + type + 'Style'], { color : 'inherit' } ).remove( editor.document );
|
||||
|
||||
if ( color )
|
||||
{
|
||||
var colorStyle = config['colorButton_' + type + 'Style'];
|
||||
|
||||
colorStyle.childRule = type == 'back' ?
|
||||
function( element )
|
||||
{
|
||||
// It's better to apply background color as the innermost style. (#3599)
|
||||
// Except for "unstylable elements". (#6103)
|
||||
return isUnstylable( element );
|
||||
}
|
||||
:
|
||||
function( element )
|
||||
{
|
||||
// Fore color style must be applied inside links instead of around it. (#4772,#6908)
|
||||
return !( element.is( 'a' ) || element.getElementsByTag( 'a' ).count() ) || isUnstylable( element );
|
||||
};
|
||||
|
||||
new CKEDITOR.style( colorStyle, { color : color } ).apply( editor.document );
|
||||
}
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
});
|
||||
|
||||
// Render the "Automatic" button.
|
||||
output.push(
|
||||
'<a class="cke_colorauto" _cke_focus=1 hidefocus=true' +
|
||||
' title="', lang.auto, '"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',null,\'', type, '\');return false;"' +
|
||||
' href="javascript:void(\'', lang.auto, '\')"' +
|
||||
' role="option">' +
|
||||
'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">' +
|
||||
'<tr>' +
|
||||
'<td>' +
|
||||
'<span class="cke_colorbox" id="', colorBoxId, '"></span>' +
|
||||
'</td>' +
|
||||
'<td colspan=7 align=center>',
|
||||
lang.auto,
|
||||
'</td>' +
|
||||
'</tr>' +
|
||||
'</table>' +
|
||||
'</a>' +
|
||||
'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">' );
|
||||
|
||||
// Render the color boxes.
|
||||
for ( var i = 0 ; i < colors.length ; i++ )
|
||||
{
|
||||
if ( ( i % 8 ) === 0 )
|
||||
output.push( '</tr><tr>' );
|
||||
|
||||
var parts = colors[ i ].split( '/' ),
|
||||
colorName = parts[ 0 ],
|
||||
colorCode = parts[ 1 ] || colorName;
|
||||
|
||||
// The data can be only a color code (without #) or colorName + color code
|
||||
// If only a color code is provided, then the colorName is the color with the hash
|
||||
// Convert the color from RGB to RRGGBB for better compatibility with IE and <font>. See #5676
|
||||
if (!parts[1])
|
||||
colorName = '#' + colorName.replace( /^(.)(.)(.)$/, '$1$1$2$2$3$3' );
|
||||
|
||||
var colorLabel = editor.lang.colors[ colorCode ] || colorCode;
|
||||
output.push(
|
||||
'<td>' +
|
||||
'<a class="cke_colorbox" _cke_focus=1 hidefocus=true' +
|
||||
' title="', colorLabel, '"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'', colorName, '\',\'', type, '\'); return false;"' +
|
||||
' href="javascript:void(\'', colorLabel, '\')"' +
|
||||
' role="option">' +
|
||||
'<span class="cke_colorbox" style="background-color:#', colorCode, '"></span>' +
|
||||
'</a>' +
|
||||
'</td>' );
|
||||
}
|
||||
|
||||
// Render the "More Colors" button.
|
||||
if ( config.colorButton_enableMore === undefined || config.colorButton_enableMore )
|
||||
{
|
||||
output.push(
|
||||
'</tr>' +
|
||||
'<tr>' +
|
||||
'<td colspan=8 align=center>' +
|
||||
'<a class="cke_colormore" _cke_focus=1 hidefocus=true' +
|
||||
' title="', lang.more, '"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'?\',\'', type, '\');return false;"' +
|
||||
' href="javascript:void(\'', lang.more, '\')"',
|
||||
' role="option">',
|
||||
lang.more,
|
||||
'</a>' +
|
||||
'</td>' ); // tr is later in the code.
|
||||
}
|
||||
|
||||
output.push( '</tr></table>' );
|
||||
|
||||
return output.join( '' );
|
||||
}
|
||||
|
||||
function isUnstylable( ele )
|
||||
{
|
||||
return ( ele.getAttribute( 'contentEditable' ) == 'false' ) || ele.getAttribute( 'data-nostyle' );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Whether to enable the <strong>More Colors</strong> button in the color selectors.
|
||||
* @name CKEDITOR.config.colorButton_enableMore
|
||||
* @default <code>true</code>
|
||||
* @type Boolean
|
||||
* @example
|
||||
* config.colorButton_enableMore = false;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Defines the colors to be displayed in the color selectors. This is a string
|
||||
* containing hexadecimal notation for HTML colors, without the "#" prefix.
|
||||
* <br /><br />
|
||||
* Since 3.3: A color name may optionally be defined by prefixing the entries with
|
||||
* a name and the slash character. For example, "FontColor1/FF9900" will be
|
||||
* displayed as the color #FF9900 in the selector, but will be output as "FontColor1".
|
||||
* @name CKEDITOR.config.colorButton_colors
|
||||
* @type String
|
||||
* @default <code>'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF'</code>
|
||||
* @example
|
||||
* // Brazil colors only.
|
||||
* config.colorButton_colors = '00923E,F8C100,28166F';
|
||||
* @example
|
||||
* config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00'
|
||||
*/
|
||||
CKEDITOR.config.colorButton_colors =
|
||||
'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +
|
||||
'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' +
|
||||
'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' +
|
||||
'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' +
|
||||
'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
|
||||
|
||||
/**
|
||||
* Stores the style definition that applies the text foreground color.
|
||||
* @name CKEDITOR.config.colorButton_foreStyle
|
||||
* @type Object
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* config.colorButton_foreStyle =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'color' : '#(color)' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.colorButton_foreStyle =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'color' : '#(color)' },
|
||||
overrides : [ { element : 'font', attributes : { 'color' : null } } ]
|
||||
};
|
||||
|
||||
/**
|
||||
* Stores the style definition that applies the text background color.
|
||||
* @name CKEDITOR.config.colorButton_backStyle
|
||||
* @type Object
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* config.colorButton_backStyle =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'background-color' : '#(color)' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.colorButton_backStyle =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'background-color' : '#(color)' }
|
||||
};
|
||||
|
||||
@@ -1,387 +1,387 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'colordialog', function( editor )
|
||||
{
|
||||
// Define some shorthands.
|
||||
var $el = CKEDITOR.dom.element,
|
||||
$doc = CKEDITOR.document,
|
||||
lang = editor.lang.colordialog;
|
||||
|
||||
// Reference the dialog.
|
||||
var dialog;
|
||||
|
||||
var spacer =
|
||||
{
|
||||
type : 'html',
|
||||
html : ' '
|
||||
};
|
||||
|
||||
var selected;
|
||||
|
||||
function clearSelected()
|
||||
{
|
||||
$doc.getById( selHiColorId ).removeStyle( 'background-color' );
|
||||
dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' );
|
||||
selected && selected.removeAttribute( 'aria-selected' );
|
||||
selected = null;
|
||||
}
|
||||
|
||||
function updateSelected( evt )
|
||||
{
|
||||
var target = evt.data.getTarget(),
|
||||
color;
|
||||
|
||||
if ( target.getName() == 'td' &&
|
||||
( color = target.getChild( 0 ).getHtml() ) )
|
||||
{
|
||||
selected = target;
|
||||
selected.setAttribute( 'aria-selected', true );
|
||||
dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color );
|
||||
}
|
||||
}
|
||||
|
||||
// Basing black-white decision off of luma scheme using the Rec. 709 version
|
||||
function whiteOrBlack( color )
|
||||
{
|
||||
color = color.replace( /^#/, '' );
|
||||
for ( var i = 0, rgb = []; i <= 2; i++ )
|
||||
rgb[i] = parseInt( color.substr( i * 2, 2 ), 16 );
|
||||
var luma = (0.2126 * rgb[0]) + (0.7152 * rgb[1]) + (0.0722 * rgb[2]);
|
||||
return '#' + ( luma >= 165 ? '000' : 'fff' );
|
||||
}
|
||||
|
||||
// Distinguish focused and hover states.
|
||||
var focused, hovered;
|
||||
|
||||
// Apply highlight style.
|
||||
function updateHighlight( event )
|
||||
{
|
||||
// Convert to event.
|
||||
!event.name && ( event = new CKEDITOR.event( event ) );
|
||||
|
||||
var isFocus = !(/mouse/).test( event.name ),
|
||||
target = event.data.getTarget(),
|
||||
color;
|
||||
|
||||
if ( target.getName() == 'td' && ( color = target.getChild( 0 ).getHtml() ) )
|
||||
{
|
||||
removeHighlight( event );
|
||||
|
||||
isFocus ? focused = target : hovered = target;
|
||||
|
||||
// Apply outline style to show focus.
|
||||
if ( isFocus )
|
||||
{
|
||||
target.setStyle( 'border-color', whiteOrBlack( color ) );
|
||||
target.setStyle( 'border-style', 'dotted' );
|
||||
}
|
||||
|
||||
$doc.getById( hicolorId ).setStyle( 'background-color', color );
|
||||
$doc.getById( hicolorTextId ).setHtml( color );
|
||||
}
|
||||
}
|
||||
|
||||
function clearHighlight()
|
||||
{
|
||||
var color = focused.getChild( 0 ).getHtml();
|
||||
focused.setStyle( 'border-color', color );
|
||||
focused.setStyle( 'border-style', 'solid' );
|
||||
$doc.getById( hicolorId ).removeStyle( 'background-color' );
|
||||
$doc.getById( hicolorTextId ).setHtml( ' ' );
|
||||
focused = null;
|
||||
}
|
||||
|
||||
// Remove previously focused style.
|
||||
function removeHighlight( event )
|
||||
{
|
||||
var isFocus = !(/mouse/).test( event.name ),
|
||||
target = isFocus && focused;
|
||||
|
||||
if ( target )
|
||||
{
|
||||
var color = target.getChild( 0 ).getHtml();
|
||||
target.setStyle( 'border-color', color );
|
||||
target.setStyle( 'border-style', 'solid' );
|
||||
}
|
||||
|
||||
if ( ! ( focused || hovered ) )
|
||||
{
|
||||
$doc.getById( hicolorId ).removeStyle( 'background-color' );
|
||||
$doc.getById( hicolorTextId ).setHtml( ' ' );
|
||||
}
|
||||
}
|
||||
|
||||
function onKeyStrokes( evt )
|
||||
{
|
||||
var domEvt = evt.data;
|
||||
|
||||
var element = domEvt.getTarget();
|
||||
var relative, nodeToMove;
|
||||
var keystroke = domEvt.getKeystroke(),
|
||||
rtl = editor.lang.dir == 'rtl';
|
||||
|
||||
switch ( keystroke )
|
||||
{
|
||||
// UP-ARROW
|
||||
case 38 :
|
||||
// relative is TR
|
||||
if ( ( relative = element.getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ element.getIndex() ] );
|
||||
nodeToMove.focus();
|
||||
}
|
||||
domEvt.preventDefault();
|
||||
break;
|
||||
// DOWN-ARROW
|
||||
case 40 :
|
||||
// relative is TR
|
||||
if ( ( relative = element.getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ element.getIndex() ] );
|
||||
if ( nodeToMove && nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
}
|
||||
}
|
||||
domEvt.preventDefault();
|
||||
break;
|
||||
|
||||
// SPACE
|
||||
// ENTER
|
||||
case 32 :
|
||||
case 13 :
|
||||
updateSelected( evt );
|
||||
domEvt.preventDefault();
|
||||
break;
|
||||
|
||||
// RIGHT-ARROW
|
||||
case rtl ? 37 : 39 :
|
||||
// relative is TD
|
||||
if ( ( nodeToMove = element.getNext() ) )
|
||||
{
|
||||
if ( nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
}
|
||||
// relative is TR
|
||||
else if ( ( relative = element.getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ 0 ] );
|
||||
if ( nodeToMove && nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// LEFT-ARROW
|
||||
case rtl ? 39 : 37 :
|
||||
// relative is TD
|
||||
if ( ( nodeToMove = element.getPrevious() ) )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
// relative is TR
|
||||
else if ( ( relative = element.getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getLast();
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
break;
|
||||
default :
|
||||
// Do not stop not handled events.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function createColorTable()
|
||||
{
|
||||
table = CKEDITOR.dom.element.createFromHtml
|
||||
(
|
||||
'<table tabIndex="-1" aria-label="' + lang.options + '"' +
|
||||
' role="grid" style="border-collapse:separate;" cellspacing="0">' +
|
||||
'<caption class="cke_voice_label">' + lang.options + '</caption>' +
|
||||
'<tbody role="presentation"></tbody></table>'
|
||||
);
|
||||
|
||||
table.on( 'mouseover', updateHighlight );
|
||||
table.on( 'mouseout', removeHighlight );
|
||||
|
||||
// Create the base colors array.
|
||||
var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ];
|
||||
|
||||
// This function combines two ranges of three values from the color array into a row.
|
||||
function appendColorRow( rangeA, rangeB )
|
||||
{
|
||||
for ( var i = rangeA ; i < rangeA + 3 ; i++ )
|
||||
{
|
||||
var row = new $el( table.$.insertRow( -1 ) );
|
||||
row.setAttribute( 'role', 'row' );
|
||||
|
||||
for ( var j = rangeB ; j < rangeB + 3 ; j++ )
|
||||
{
|
||||
for ( var n = 0 ; n < 6 ; n++ )
|
||||
{
|
||||
appendColorCell( row.$, '#' + aColors[j] + aColors[n] + aColors[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This function create a single color cell in the color table.
|
||||
function appendColorCell( targetRow, color )
|
||||
{
|
||||
var cell = new $el( targetRow.insertCell( -1 ) );
|
||||
cell.setAttribute( 'class', 'ColorCell' );
|
||||
cell.setAttribute( 'tabIndex', -1 );
|
||||
cell.setAttribute( 'role', 'gridcell' );
|
||||
|
||||
cell.on( 'keydown', onKeyStrokes );
|
||||
cell.on( 'click', updateSelected );
|
||||
cell.on( 'focus', updateHighlight );
|
||||
cell.on( 'blur', removeHighlight );
|
||||
|
||||
cell.setStyle( 'background-color', color );
|
||||
cell.setStyle( 'border', '1px solid ' + color );
|
||||
|
||||
cell.setStyle( 'width', '14px' );
|
||||
cell.setStyle( 'height', '14px' );
|
||||
|
||||
var colorLabel = numbering( 'color_table_cell' );
|
||||
cell.setAttribute( 'aria-labelledby',colorLabel );
|
||||
cell.append( CKEDITOR.dom.element.createFromHtml( '<span id="' + colorLabel + '" class="cke_voice_label">' + color + '</span>', CKEDITOR.document ) );
|
||||
}
|
||||
|
||||
appendColorRow( 0, 0 );
|
||||
appendColorRow( 3, 0 );
|
||||
appendColorRow( 0, 3 );
|
||||
appendColorRow( 3, 3 );
|
||||
|
||||
// Create the last row.
|
||||
var oRow = new $el( table.$.insertRow( -1 ) ) ;
|
||||
oRow.setAttribute( 'role', 'row' );
|
||||
|
||||
// Create the gray scale colors cells.
|
||||
for ( var n = 0 ; n < 6 ; n++ )
|
||||
{
|
||||
appendColorCell( oRow.$, '#' + aColors[n] + aColors[n] + aColors[n] ) ;
|
||||
}
|
||||
|
||||
// Fill the row with black cells.
|
||||
for ( var i = 0 ; i < 12 ; i++ )
|
||||
{
|
||||
appendColorCell( oRow.$, '#000000' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
var numbering = function( id )
|
||||
{
|
||||
return CKEDITOR.tools.getNextId() + '_' + id;
|
||||
},
|
||||
hicolorId = numbering( 'hicolor' ),
|
||||
hicolorTextId = numbering( 'hicolortext' ),
|
||||
selHiColorId = numbering( 'selhicolor' ),
|
||||
table;
|
||||
|
||||
createColorTable();
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minWidth : 360,
|
||||
minHeight : 220,
|
||||
onLoad : function()
|
||||
{
|
||||
// Update reference.
|
||||
dialog = this;
|
||||
},
|
||||
onHide : function()
|
||||
{
|
||||
clearSelected();
|
||||
clearHighlight();
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'picker',
|
||||
label : lang.title,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
padding : 0,
|
||||
widths : [ '70%', '10%', '30%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html : '<div></div>',
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.document.getById( this.domId ).append( table );
|
||||
},
|
||||
focus : function()
|
||||
{
|
||||
// Restore the previously focused cell,
|
||||
// otherwise put the initial focus on the first table cell.
|
||||
( focused || this.getElement().getElementsByTag( 'td' ).getItem( 0 ) ).focus();
|
||||
}
|
||||
},
|
||||
spacer,
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
widths : [ '70%', '5%', '25%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html : '<span>' + lang.highlight +'</span>\
|
||||
<div id="' + hicolorId + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\
|
||||
<div id="' + hicolorTextId + '"> </div><span>' + lang.selected + '</span>\
|
||||
<div id="' + selHiColorId + '" style="border: 1px solid; height: 20px; width: 74px;"></div>'
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
label : lang.selected,
|
||||
labelStyle: 'display:none',
|
||||
id : 'selectedColor',
|
||||
style : 'width: 74px',
|
||||
onChange : function()
|
||||
{
|
||||
// Try to update color preview with new value. If fails, then set it no none.
|
||||
try
|
||||
{
|
||||
$doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() );
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
clearSelected();
|
||||
}
|
||||
}
|
||||
},
|
||||
spacer,
|
||||
{
|
||||
type : 'button',
|
||||
id : 'clear',
|
||||
style : 'margin-top: 5px',
|
||||
label : lang.clear,
|
||||
onClick : clearSelected
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
);
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'colordialog', function( editor )
|
||||
{
|
||||
// Define some shorthands.
|
||||
var $el = CKEDITOR.dom.element,
|
||||
$doc = CKEDITOR.document,
|
||||
lang = editor.lang.colordialog;
|
||||
|
||||
// Reference the dialog.
|
||||
var dialog;
|
||||
|
||||
var spacer =
|
||||
{
|
||||
type : 'html',
|
||||
html : ' '
|
||||
};
|
||||
|
||||
var selected;
|
||||
|
||||
function clearSelected()
|
||||
{
|
||||
$doc.getById( selHiColorId ).removeStyle( 'background-color' );
|
||||
dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' );
|
||||
selected && selected.removeAttribute( 'aria-selected' );
|
||||
selected = null;
|
||||
}
|
||||
|
||||
function updateSelected( evt )
|
||||
{
|
||||
var target = evt.data.getTarget(),
|
||||
color;
|
||||
|
||||
if ( target.getName() == 'td' &&
|
||||
( color = target.getChild( 0 ).getHtml() ) )
|
||||
{
|
||||
selected = target;
|
||||
selected.setAttribute( 'aria-selected', true );
|
||||
dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color );
|
||||
}
|
||||
}
|
||||
|
||||
// Basing black-white decision off of luma scheme using the Rec. 709 version
|
||||
function whiteOrBlack( color )
|
||||
{
|
||||
color = color.replace( /^#/, '' );
|
||||
for ( var i = 0, rgb = []; i <= 2; i++ )
|
||||
rgb[i] = parseInt( color.substr( i * 2, 2 ), 16 );
|
||||
var luma = (0.2126 * rgb[0]) + (0.7152 * rgb[1]) + (0.0722 * rgb[2]);
|
||||
return '#' + ( luma >= 165 ? '000' : 'fff' );
|
||||
}
|
||||
|
||||
// Distinguish focused and hover states.
|
||||
var focused, hovered;
|
||||
|
||||
// Apply highlight style.
|
||||
function updateHighlight( event )
|
||||
{
|
||||
// Convert to event.
|
||||
!event.name && ( event = new CKEDITOR.event( event ) );
|
||||
|
||||
var isFocus = !(/mouse/).test( event.name ),
|
||||
target = event.data.getTarget(),
|
||||
color;
|
||||
|
||||
if ( target.getName() == 'td' && ( color = target.getChild( 0 ).getHtml() ) )
|
||||
{
|
||||
removeHighlight( event );
|
||||
|
||||
isFocus ? focused = target : hovered = target;
|
||||
|
||||
// Apply outline style to show focus.
|
||||
if ( isFocus )
|
||||
{
|
||||
target.setStyle( 'border-color', whiteOrBlack( color ) );
|
||||
target.setStyle( 'border-style', 'dotted' );
|
||||
}
|
||||
|
||||
$doc.getById( hicolorId ).setStyle( 'background-color', color );
|
||||
$doc.getById( hicolorTextId ).setHtml( color );
|
||||
}
|
||||
}
|
||||
|
||||
function clearHighlight()
|
||||
{
|
||||
var color = focused.getChild( 0 ).getHtml();
|
||||
focused.setStyle( 'border-color', color );
|
||||
focused.setStyle( 'border-style', 'solid' );
|
||||
$doc.getById( hicolorId ).removeStyle( 'background-color' );
|
||||
$doc.getById( hicolorTextId ).setHtml( ' ' );
|
||||
focused = null;
|
||||
}
|
||||
|
||||
// Remove previously focused style.
|
||||
function removeHighlight( event )
|
||||
{
|
||||
var isFocus = !(/mouse/).test( event.name ),
|
||||
target = isFocus && focused;
|
||||
|
||||
if ( target )
|
||||
{
|
||||
var color = target.getChild( 0 ).getHtml();
|
||||
target.setStyle( 'border-color', color );
|
||||
target.setStyle( 'border-style', 'solid' );
|
||||
}
|
||||
|
||||
if ( ! ( focused || hovered ) )
|
||||
{
|
||||
$doc.getById( hicolorId ).removeStyle( 'background-color' );
|
||||
$doc.getById( hicolorTextId ).setHtml( ' ' );
|
||||
}
|
||||
}
|
||||
|
||||
function onKeyStrokes( evt )
|
||||
{
|
||||
var domEvt = evt.data;
|
||||
|
||||
var element = domEvt.getTarget();
|
||||
var relative, nodeToMove;
|
||||
var keystroke = domEvt.getKeystroke(),
|
||||
rtl = editor.lang.dir == 'rtl';
|
||||
|
||||
switch ( keystroke )
|
||||
{
|
||||
// UP-ARROW
|
||||
case 38 :
|
||||
// relative is TR
|
||||
if ( ( relative = element.getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ element.getIndex() ] );
|
||||
nodeToMove.focus();
|
||||
}
|
||||
domEvt.preventDefault();
|
||||
break;
|
||||
// DOWN-ARROW
|
||||
case 40 :
|
||||
// relative is TR
|
||||
if ( ( relative = element.getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ element.getIndex() ] );
|
||||
if ( nodeToMove && nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
}
|
||||
}
|
||||
domEvt.preventDefault();
|
||||
break;
|
||||
|
||||
// SPACE
|
||||
// ENTER
|
||||
case 32 :
|
||||
case 13 :
|
||||
updateSelected( evt );
|
||||
domEvt.preventDefault();
|
||||
break;
|
||||
|
||||
// RIGHT-ARROW
|
||||
case rtl ? 37 : 39 :
|
||||
// relative is TD
|
||||
if ( ( nodeToMove = element.getNext() ) )
|
||||
{
|
||||
if ( nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
}
|
||||
// relative is TR
|
||||
else if ( ( relative = element.getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ 0 ] );
|
||||
if ( nodeToMove && nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// LEFT-ARROW
|
||||
case rtl ? 39 : 37 :
|
||||
// relative is TD
|
||||
if ( ( nodeToMove = element.getPrevious() ) )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
// relative is TR
|
||||
else if ( ( relative = element.getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getLast();
|
||||
nodeToMove.focus();
|
||||
domEvt.preventDefault( true );
|
||||
}
|
||||
break;
|
||||
default :
|
||||
// Do not stop not handled events.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function createColorTable()
|
||||
{
|
||||
table = CKEDITOR.dom.element.createFromHtml
|
||||
(
|
||||
'<table tabIndex="-1" aria-label="' + lang.options + '"' +
|
||||
' role="grid" style="border-collapse:separate;" cellspacing="0">' +
|
||||
'<caption class="cke_voice_label">' + lang.options + '</caption>' +
|
||||
'<tbody role="presentation"></tbody></table>'
|
||||
);
|
||||
|
||||
table.on( 'mouseover', updateHighlight );
|
||||
table.on( 'mouseout', removeHighlight );
|
||||
|
||||
// Create the base colors array.
|
||||
var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ];
|
||||
|
||||
// This function combines two ranges of three values from the color array into a row.
|
||||
function appendColorRow( rangeA, rangeB )
|
||||
{
|
||||
for ( var i = rangeA ; i < rangeA + 3 ; i++ )
|
||||
{
|
||||
var row = new $el( table.$.insertRow( -1 ) );
|
||||
row.setAttribute( 'role', 'row' );
|
||||
|
||||
for ( var j = rangeB ; j < rangeB + 3 ; j++ )
|
||||
{
|
||||
for ( var n = 0 ; n < 6 ; n++ )
|
||||
{
|
||||
appendColorCell( row.$, '#' + aColors[j] + aColors[n] + aColors[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This function create a single color cell in the color table.
|
||||
function appendColorCell( targetRow, color )
|
||||
{
|
||||
var cell = new $el( targetRow.insertCell( -1 ) );
|
||||
cell.setAttribute( 'class', 'ColorCell' );
|
||||
cell.setAttribute( 'tabIndex', -1 );
|
||||
cell.setAttribute( 'role', 'gridcell' );
|
||||
|
||||
cell.on( 'keydown', onKeyStrokes );
|
||||
cell.on( 'click', updateSelected );
|
||||
cell.on( 'focus', updateHighlight );
|
||||
cell.on( 'blur', removeHighlight );
|
||||
|
||||
cell.setStyle( 'background-color', color );
|
||||
cell.setStyle( 'border', '1px solid ' + color );
|
||||
|
||||
cell.setStyle( 'width', '14px' );
|
||||
cell.setStyle( 'height', '14px' );
|
||||
|
||||
var colorLabel = numbering( 'color_table_cell' );
|
||||
cell.setAttribute( 'aria-labelledby',colorLabel );
|
||||
cell.append( CKEDITOR.dom.element.createFromHtml( '<span id="' + colorLabel + '" class="cke_voice_label">' + color + '</span>', CKEDITOR.document ) );
|
||||
}
|
||||
|
||||
appendColorRow( 0, 0 );
|
||||
appendColorRow( 3, 0 );
|
||||
appendColorRow( 0, 3 );
|
||||
appendColorRow( 3, 3 );
|
||||
|
||||
// Create the last row.
|
||||
var oRow = new $el( table.$.insertRow( -1 ) ) ;
|
||||
oRow.setAttribute( 'role', 'row' );
|
||||
|
||||
// Create the gray scale colors cells.
|
||||
for ( var n = 0 ; n < 6 ; n++ )
|
||||
{
|
||||
appendColorCell( oRow.$, '#' + aColors[n] + aColors[n] + aColors[n] ) ;
|
||||
}
|
||||
|
||||
// Fill the row with black cells.
|
||||
for ( var i = 0 ; i < 12 ; i++ )
|
||||
{
|
||||
appendColorCell( oRow.$, '#000000' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
var numbering = function( id )
|
||||
{
|
||||
return CKEDITOR.tools.getNextId() + '_' + id;
|
||||
},
|
||||
hicolorId = numbering( 'hicolor' ),
|
||||
hicolorTextId = numbering( 'hicolortext' ),
|
||||
selHiColorId = numbering( 'selhicolor' ),
|
||||
table;
|
||||
|
||||
createColorTable();
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minWidth : 360,
|
||||
minHeight : 220,
|
||||
onLoad : function()
|
||||
{
|
||||
// Update reference.
|
||||
dialog = this;
|
||||
},
|
||||
onHide : function()
|
||||
{
|
||||
clearSelected();
|
||||
clearHighlight();
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'picker',
|
||||
label : lang.title,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
padding : 0,
|
||||
widths : [ '70%', '10%', '30%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html : '<div></div>',
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.document.getById( this.domId ).append( table );
|
||||
},
|
||||
focus : function()
|
||||
{
|
||||
// Restore the previously focused cell,
|
||||
// otherwise put the initial focus on the first table cell.
|
||||
( focused || this.getElement().getElementsByTag( 'td' ).getItem( 0 ) ).focus();
|
||||
}
|
||||
},
|
||||
spacer,
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
widths : [ '70%', '5%', '25%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html : '<span>' + lang.highlight +'</span>\
|
||||
<div id="' + hicolorId + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\
|
||||
<div id="' + hicolorTextId + '"> </div><span>' + lang.selected + '</span>\
|
||||
<div id="' + selHiColorId + '" style="border: 1px solid; height: 20px; width: 74px;"></div>'
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
label : lang.selected,
|
||||
labelStyle: 'display:none',
|
||||
id : 'selectedColor',
|
||||
style : 'width: 74px',
|
||||
onChange : function()
|
||||
{
|
||||
// Try to update color preview with new value. If fails, then set it no none.
|
||||
try
|
||||
{
|
||||
$doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() );
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
clearSelected();
|
||||
}
|
||||
}
|
||||
},
|
||||
spacer,
|
||||
{
|
||||
type : 'button',
|
||||
id : 'clear',
|
||||
style : 'margin-top: 5px',
|
||||
label : lang.clear,
|
||||
onClick : clearSelected
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.colordialog =
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'colordialog', new CKEDITOR.dialogCommand( 'colordialog' ) );
|
||||
CKEDITOR.dialog.add( 'colordialog', this.path + 'dialogs/colordialog.js' );
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'colordialog', CKEDITOR.plugins.colordialog );
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.colordialog =
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'colordialog', new CKEDITOR.dialogCommand( 'colordialog' ) );
|
||||
CKEDITOR.dialog.add( 'colordialog', this.path + 'dialogs/colordialog.js' );
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'colordialog', CKEDITOR.plugins.colordialog );
|
||||
|
||||
@@ -1,179 +1,179 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'contextmenu',
|
||||
{
|
||||
requires : [ 'menu' ],
|
||||
|
||||
// Make sure the base class (CKEDITOR.menu) is loaded before it (#3318).
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass(
|
||||
{
|
||||
base : CKEDITOR.menu,
|
||||
|
||||
$ : function( editor )
|
||||
{
|
||||
this.base.call( this, editor,
|
||||
{
|
||||
panel:
|
||||
{
|
||||
className : editor.skinClass + ' cke_contextmenu',
|
||||
attributes :
|
||||
{
|
||||
'aria-label' : editor.lang.contextmenu.options
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
proto :
|
||||
{
|
||||
addTarget : function( element, nativeContextMenuOnCtrl )
|
||||
{
|
||||
// Opera doesn't support 'contextmenu' event, we have duo approaches employed here:
|
||||
// 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser
|
||||
// option 'Allow script to detect context menu/right click events' to be always turned on.
|
||||
// 2. Considering the fact that ctrl/meta key is not been occupied
|
||||
// for multiple range selecting (like Gecko), we use this key
|
||||
// combination as a fallback for triggering context-menu. (#4530)
|
||||
if ( CKEDITOR.env.opera && !( 'oncontextmenu' in document.body ))
|
||||
{
|
||||
var contextMenuOverrideButton;
|
||||
element.on( 'mousedown', function( evt )
|
||||
{
|
||||
evt = evt.data;
|
||||
if ( evt.$.button != 2 )
|
||||
{
|
||||
if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 )
|
||||
element.fire( 'contextmenu', evt );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( nativeContextMenuOnCtrl
|
||||
&& ( CKEDITOR.env.mac ? evt.$.metaKey : evt.$.ctrlKey ) )
|
||||
return;
|
||||
|
||||
var target = evt.getTarget();
|
||||
|
||||
if ( !contextMenuOverrideButton )
|
||||
{
|
||||
var ownerDoc = target.getDocument();
|
||||
contextMenuOverrideButton = ownerDoc.createElement( 'input' ) ;
|
||||
contextMenuOverrideButton.$.type = 'button' ;
|
||||
ownerDoc.getBody().append( contextMenuOverrideButton ) ;
|
||||
}
|
||||
|
||||
contextMenuOverrideButton.setAttribute( 'style', 'position:absolute;top:' + ( evt.$.clientY - 2 ) +
|
||||
'px;left:' + ( evt.$.clientX - 2 ) +
|
||||
'px;width:5px;height:5px;opacity:0.01' );
|
||||
|
||||
} );
|
||||
|
||||
element.on( 'mouseup', function ( evt )
|
||||
{
|
||||
if ( contextMenuOverrideButton )
|
||||
{
|
||||
contextMenuOverrideButton.remove();
|
||||
contextMenuOverrideButton = undefined;
|
||||
// Simulate 'contextmenu' event.
|
||||
element.fire( 'contextmenu', evt.data );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
element.on( 'contextmenu', function( event )
|
||||
{
|
||||
var domEvent = event.data;
|
||||
|
||||
if ( nativeContextMenuOnCtrl &&
|
||||
// Safari on Windows always show 'ctrlKey' as true in 'contextmenu' event,
|
||||
// which make this property unreliable. (#4826)
|
||||
( CKEDITOR.env.webkit ? holdCtrlKey : ( CKEDITOR.env.mac ? domEvent.$.metaKey : domEvent.$.ctrlKey ) ) )
|
||||
return;
|
||||
|
||||
|
||||
// Cancel the browser context menu.
|
||||
domEvent.preventDefault();
|
||||
|
||||
var offsetParent = domEvent.getTarget().getDocument().getDocumentElement(),
|
||||
offsetX = domEvent.$.clientX,
|
||||
offsetY = domEvent.$.clientY;
|
||||
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
this.open( offsetParent, null, offsetX, offsetY );
|
||||
|
||||
// IE needs a short while to allow selection change before opening menu. (#7908)
|
||||
}, CKEDITOR.env.ie? 200 : 0, this );
|
||||
},
|
||||
this );
|
||||
|
||||
if ( CKEDITOR.env.opera )
|
||||
{
|
||||
// 'contextmenu' event triggered by Windows menu key is unpreventable,
|
||||
// cancel the key event itself. (#6534)
|
||||
element.on( 'keypress' , function ( evt )
|
||||
{
|
||||
var domEvent = evt.data;
|
||||
|
||||
if ( domEvent.$.keyCode === 0 )
|
||||
domEvent.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
if ( CKEDITOR.env.webkit )
|
||||
{
|
||||
var holdCtrlKey,
|
||||
onKeyDown = function( event )
|
||||
{
|
||||
holdCtrlKey = CKEDITOR.env.mac ? event.data.$.metaKey : event.data.$.ctrlKey ;
|
||||
},
|
||||
resetOnKeyUp = function()
|
||||
{
|
||||
holdCtrlKey = 0;
|
||||
};
|
||||
|
||||
element.on( 'keydown', onKeyDown );
|
||||
element.on( 'keyup', resetOnKeyUp );
|
||||
element.on( 'contextmenu', resetOnKeyUp );
|
||||
}
|
||||
},
|
||||
|
||||
open : function( offsetParent, corner, offsetX, offsetY )
|
||||
{
|
||||
this.editor.focus();
|
||||
offsetParent = offsetParent || CKEDITOR.document.getDocumentElement();
|
||||
this.show( offsetParent, corner, offsetX, offsetY );
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
beforeInit : function( editor )
|
||||
{
|
||||
editor.contextMenu = new CKEDITOR.plugins.contextMenu( editor );
|
||||
|
||||
editor.addCommand( 'contextMenu',
|
||||
{
|
||||
exec : function()
|
||||
{
|
||||
editor.contextMenu.open( editor.document.getBody() );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Whether to show the browser native context menu when the <em>Ctrl</em> or
|
||||
* <em>Meta</em> (Mac) key is pressed on opening the context menu with the
|
||||
* right mouse button click or the <em>Menu</em> key.
|
||||
* @name CKEDITOR.config.browserContextMenuOnCtrl
|
||||
* @since 3.0.2
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.browserContextMenuOnCtrl = false;
|
||||
*/
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'contextmenu',
|
||||
{
|
||||
requires : [ 'menu' ],
|
||||
|
||||
// Make sure the base class (CKEDITOR.menu) is loaded before it (#3318).
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass(
|
||||
{
|
||||
base : CKEDITOR.menu,
|
||||
|
||||
$ : function( editor )
|
||||
{
|
||||
this.base.call( this, editor,
|
||||
{
|
||||
panel:
|
||||
{
|
||||
className : editor.skinClass + ' cke_contextmenu',
|
||||
attributes :
|
||||
{
|
||||
'aria-label' : editor.lang.contextmenu.options
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
proto :
|
||||
{
|
||||
addTarget : function( element, nativeContextMenuOnCtrl )
|
||||
{
|
||||
// Opera doesn't support 'contextmenu' event, we have duo approaches employed here:
|
||||
// 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser
|
||||
// option 'Allow script to detect context menu/right click events' to be always turned on.
|
||||
// 2. Considering the fact that ctrl/meta key is not been occupied
|
||||
// for multiple range selecting (like Gecko), we use this key
|
||||
// combination as a fallback for triggering context-menu. (#4530)
|
||||
if ( CKEDITOR.env.opera && !( 'oncontextmenu' in document.body ))
|
||||
{
|
||||
var contextMenuOverrideButton;
|
||||
element.on( 'mousedown', function( evt )
|
||||
{
|
||||
evt = evt.data;
|
||||
if ( evt.$.button != 2 )
|
||||
{
|
||||
if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 )
|
||||
element.fire( 'contextmenu', evt );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( nativeContextMenuOnCtrl
|
||||
&& ( CKEDITOR.env.mac ? evt.$.metaKey : evt.$.ctrlKey ) )
|
||||
return;
|
||||
|
||||
var target = evt.getTarget();
|
||||
|
||||
if ( !contextMenuOverrideButton )
|
||||
{
|
||||
var ownerDoc = target.getDocument();
|
||||
contextMenuOverrideButton = ownerDoc.createElement( 'input' ) ;
|
||||
contextMenuOverrideButton.$.type = 'button' ;
|
||||
ownerDoc.getBody().append( contextMenuOverrideButton ) ;
|
||||
}
|
||||
|
||||
contextMenuOverrideButton.setAttribute( 'style', 'position:absolute;top:' + ( evt.$.clientY - 2 ) +
|
||||
'px;left:' + ( evt.$.clientX - 2 ) +
|
||||
'px;width:5px;height:5px;opacity:0.01' );
|
||||
|
||||
} );
|
||||
|
||||
element.on( 'mouseup', function ( evt )
|
||||
{
|
||||
if ( contextMenuOverrideButton )
|
||||
{
|
||||
contextMenuOverrideButton.remove();
|
||||
contextMenuOverrideButton = undefined;
|
||||
// Simulate 'contextmenu' event.
|
||||
element.fire( 'contextmenu', evt.data );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
element.on( 'contextmenu', function( event )
|
||||
{
|
||||
var domEvent = event.data;
|
||||
|
||||
if ( nativeContextMenuOnCtrl &&
|
||||
// Safari on Windows always show 'ctrlKey' as true in 'contextmenu' event,
|
||||
// which make this property unreliable. (#4826)
|
||||
( CKEDITOR.env.webkit ? holdCtrlKey : ( CKEDITOR.env.mac ? domEvent.$.metaKey : domEvent.$.ctrlKey ) ) )
|
||||
return;
|
||||
|
||||
|
||||
// Cancel the browser context menu.
|
||||
domEvent.preventDefault();
|
||||
|
||||
var offsetParent = domEvent.getTarget().getDocument().getDocumentElement(),
|
||||
offsetX = domEvent.$.clientX,
|
||||
offsetY = domEvent.$.clientY;
|
||||
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
this.open( offsetParent, null, offsetX, offsetY );
|
||||
|
||||
// IE needs a short while to allow selection change before opening menu. (#7908)
|
||||
}, CKEDITOR.env.ie? 200 : 0, this );
|
||||
},
|
||||
this );
|
||||
|
||||
if ( CKEDITOR.env.opera )
|
||||
{
|
||||
// 'contextmenu' event triggered by Windows menu key is unpreventable,
|
||||
// cancel the key event itself. (#6534)
|
||||
element.on( 'keypress' , function ( evt )
|
||||
{
|
||||
var domEvent = evt.data;
|
||||
|
||||
if ( domEvent.$.keyCode === 0 )
|
||||
domEvent.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
if ( CKEDITOR.env.webkit )
|
||||
{
|
||||
var holdCtrlKey,
|
||||
onKeyDown = function( event )
|
||||
{
|
||||
holdCtrlKey = CKEDITOR.env.mac ? event.data.$.metaKey : event.data.$.ctrlKey ;
|
||||
},
|
||||
resetOnKeyUp = function()
|
||||
{
|
||||
holdCtrlKey = 0;
|
||||
};
|
||||
|
||||
element.on( 'keydown', onKeyDown );
|
||||
element.on( 'keyup', resetOnKeyUp );
|
||||
element.on( 'contextmenu', resetOnKeyUp );
|
||||
}
|
||||
},
|
||||
|
||||
open : function( offsetParent, corner, offsetX, offsetY )
|
||||
{
|
||||
this.editor.focus();
|
||||
offsetParent = offsetParent || CKEDITOR.document.getDocumentElement();
|
||||
this.show( offsetParent, corner, offsetX, offsetY );
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
beforeInit : function( editor )
|
||||
{
|
||||
editor.contextMenu = new CKEDITOR.plugins.contextMenu( editor );
|
||||
|
||||
editor.addCommand( 'contextMenu',
|
||||
{
|
||||
exec : function()
|
||||
{
|
||||
editor.contextMenu.open( editor.document.getBody() );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Whether to show the browser native context menu when the <em>Ctrl</em> or
|
||||
* <em>Meta</em> (Mac) key is pressed on opening the context menu with the
|
||||
* right mouse button click or the <em>Menu</em> key.
|
||||
* @name CKEDITOR.config.browserContextMenuOnCtrl
|
||||
* @since 3.0.2
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.browserContextMenuOnCtrl = false;
|
||||
*/
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
bg.js Found: 5 Missing: 0
|
||||
cs.js Found: 5 Missing: 0
|
||||
cy.js Found: 5 Missing: 0
|
||||
da.js Found: 5 Missing: 0
|
||||
de.js Found: 5 Missing: 0
|
||||
el.js Found: 5 Missing: 0
|
||||
eo.js Found: 5 Missing: 0
|
||||
et.js Found: 5 Missing: 0
|
||||
fa.js Found: 5 Missing: 0
|
||||
fi.js Found: 5 Missing: 0
|
||||
fr.js Found: 5 Missing: 0
|
||||
gu.js Found: 5 Missing: 0
|
||||
he.js Found: 5 Missing: 0
|
||||
hr.js Found: 5 Missing: 0
|
||||
it.js Found: 5 Missing: 0
|
||||
nb.js Found: 5 Missing: 0
|
||||
nl.js Found: 5 Missing: 0
|
||||
no.js Found: 5 Missing: 0
|
||||
pl.js Found: 5 Missing: 0
|
||||
pt-br.js Found: 5 Missing: 0
|
||||
tr.js Found: 5 Missing: 0
|
||||
ug.js Found: 5 Missing: 0
|
||||
uk.js Found: 5 Missing: 0
|
||||
vi.js Found: 5 Missing: 0
|
||||
zh-cn.js Found: 5 Missing: 0
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
bg.js Found: 5 Missing: 0
|
||||
cs.js Found: 5 Missing: 0
|
||||
cy.js Found: 5 Missing: 0
|
||||
da.js Found: 5 Missing: 0
|
||||
de.js Found: 5 Missing: 0
|
||||
el.js Found: 5 Missing: 0
|
||||
eo.js Found: 5 Missing: 0
|
||||
et.js Found: 5 Missing: 0
|
||||
fa.js Found: 5 Missing: 0
|
||||
fi.js Found: 5 Missing: 0
|
||||
fr.js Found: 5 Missing: 0
|
||||
gu.js Found: 5 Missing: 0
|
||||
he.js Found: 5 Missing: 0
|
||||
hr.js Found: 5 Missing: 0
|
||||
it.js Found: 5 Missing: 0
|
||||
nb.js Found: 5 Missing: 0
|
||||
nl.js Found: 5 Missing: 0
|
||||
no.js Found: 5 Missing: 0
|
||||
pl.js Found: 5 Missing: 0
|
||||
pt-br.js Found: 5 Missing: 0
|
||||
tr.js Found: 5 Missing: 0
|
||||
ug.js Found: 5 Missing: 0
|
||||
uk.js Found: 5 Missing: 0
|
||||
vi.js Found: 5 Missing: 0
|
||||
zh-cn.js Found: 5 Missing: 0
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'bg',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Информация за елемента',
|
||||
dialogName : 'Име на диалоговия прозорец',
|
||||
tabName : 'Име на таб',
|
||||
elementId : 'ID на елемента',
|
||||
elementType : 'Тип на елемента'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'bg',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Информация за елемента',
|
||||
dialogName : 'Име на диалоговия прозорец',
|
||||
tabName : 'Име на таб',
|
||||
elementId : 'ID на елемента',
|
||||
elementType : 'Тип на елемента'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'cs',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informace o prvku',
|
||||
dialogName : 'Název dialogového okna',
|
||||
tabName : 'Název karty',
|
||||
elementId : 'ID prvku',
|
||||
elementType : 'Typ prvku'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'cs',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informace o prvku',
|
||||
dialogName : 'Název dialogového okna',
|
||||
tabName : 'Název karty',
|
||||
elementId : 'ID prvku',
|
||||
elementType : 'Typ prvku'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'cy',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Gwybodaeth am yr Elfen',
|
||||
dialogName : 'Enw ffenestr y deialog',
|
||||
tabName : 'Enw\'r tab',
|
||||
elementId : 'ID yr Elfen',
|
||||
elementType : 'Math yr elfen'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'cy',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Gwybodaeth am yr Elfen',
|
||||
dialogName : 'Enw ffenestr y deialog',
|
||||
tabName : 'Enw\'r tab',
|
||||
elementId : 'ID yr Elfen',
|
||||
elementType : 'Math yr elfen'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'da',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Information på elementet',
|
||||
dialogName : 'Dialogboks',
|
||||
tabName : 'Tab beskrivelse',
|
||||
elementId : 'ID på element',
|
||||
elementType : 'Type af element'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'da',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Information på elementet',
|
||||
dialogName : 'Dialogboks',
|
||||
tabName : 'Tab beskrivelse',
|
||||
elementId : 'ID på element',
|
||||
elementType : 'Type af element'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'de',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformation',
|
||||
dialogName : 'Dialogfenstername',
|
||||
tabName : 'Reitername',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Elementtyp'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'de',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformation',
|
||||
dialogName : 'Dialogfenstername',
|
||||
tabName : 'Reitername',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Elementtyp'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'el',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Πληροφορίες Στοιχείου',
|
||||
dialogName : 'Όνομα παραθύρου διαλόγου',
|
||||
tabName : 'Όνομα καρτέλας',
|
||||
elementId : 'ID Στοιχείου',
|
||||
elementType : 'Τύπος στοιχείου'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'el',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Πληροφορίες Στοιχείου',
|
||||
dialogName : 'Όνομα παραθύρου διαλόγου',
|
||||
tabName : 'Όνομα καρτέλας',
|
||||
elementId : 'ID Στοιχείου',
|
||||
elementType : 'Τύπος στοιχείου'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'en',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Element Information',
|
||||
dialogName : 'Dialog window name',
|
||||
tabName : 'Tab name',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Element type'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'en',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Element Information',
|
||||
dialogName : 'Dialog window name',
|
||||
tabName : 'Tab name',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Element type'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'eo',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informo pri la elemento',
|
||||
dialogName : 'Nomo de la dialogfenestro',
|
||||
tabName : 'Langetnomo',
|
||||
elementId : 'ID de la elemento',
|
||||
elementType : 'Tipo de la elemento'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'eo',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informo pri la elemento',
|
||||
dialogName : 'Nomo de la dialogfenestro',
|
||||
tabName : 'Langetnomo',
|
||||
elementId : 'ID de la elemento',
|
||||
elementType : 'Tipo de la elemento'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'et',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elemendi andmed',
|
||||
dialogName : 'Dialoogiakna nimi',
|
||||
tabName : 'Saki nimi',
|
||||
elementId : 'Elemendi ID',
|
||||
elementType : 'Elemendi liik'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'et',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elemendi andmed',
|
||||
dialogName : 'Dialoogiakna nimi',
|
||||
tabName : 'Saki nimi',
|
||||
elementId : 'Elemendi ID',
|
||||
elementType : 'Elemendi liik'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'fa',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'اطلاعات عنصر',
|
||||
dialogName : 'نام پنجره محاورهای',
|
||||
tabName : 'نام برگه',
|
||||
elementId : 'ID عنصر',
|
||||
elementType : 'نوع عنصر'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'fa',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'اطلاعات عنصر',
|
||||
dialogName : 'نام پنجره محاورهای',
|
||||
tabName : 'نام برگه',
|
||||
elementId : 'ID عنصر',
|
||||
elementType : 'نوع عنصر'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'fi',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementin tiedot',
|
||||
dialogName : 'Dialogi-ikkunan nimi',
|
||||
tabName : 'Välilehden nimi',
|
||||
elementId : 'Elementin ID',
|
||||
elementType : 'Elementin tyyppi'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'fi',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementin tiedot',
|
||||
dialogName : 'Dialogi-ikkunan nimi',
|
||||
tabName : 'Välilehden nimi',
|
||||
elementId : 'Elementin ID',
|
||||
elementType : 'Elementin tyyppi'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'fr',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Information sur l\'élément',
|
||||
dialogName : 'Nom de la fenêtre de dialogue',
|
||||
tabName : 'Nom de l\'onglet',
|
||||
elementId : 'ID de l\'élément',
|
||||
elementType : 'Type de l\'élément'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'fr',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Information sur l\'élément',
|
||||
dialogName : 'Nom de la fenêtre de dialogue',
|
||||
tabName : 'Nom de l\'onglet',
|
||||
elementId : 'ID de l\'élément',
|
||||
elementType : 'Type de l\'élément'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'gu',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'પ્રાથમિક માહિતી',
|
||||
dialogName : 'વિન્ડોનું નામ',
|
||||
tabName : 'ટેબનું નામ',
|
||||
elementId : 'પ્રાથમિક આઈડી',
|
||||
elementType : 'પ્રાથમિક પ્રકાર'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'gu',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'પ્રાથમિક માહિતી',
|
||||
dialogName : 'વિન્ડોનું નામ',
|
||||
tabName : 'ટેબનું નામ',
|
||||
elementId : 'પ્રાથમિક આઈડી',
|
||||
elementType : 'પ્રાથમિક પ્રકાર'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'he',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'מידע על האלמנט',
|
||||
dialogName : 'שם הדיאלוג',
|
||||
tabName : 'שם הטאב',
|
||||
elementId : 'ID של האלמנט',
|
||||
elementType : 'סוג האלמנט'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'he',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'מידע על האלמנט',
|
||||
dialogName : 'שם הדיאלוג',
|
||||
tabName : 'שם הטאב',
|
||||
elementId : 'ID של האלמנט',
|
||||
elementType : 'סוג האלמנט'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'hr',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informacije elementa',
|
||||
dialogName : 'Naziv prozora za dijalog',
|
||||
tabName : 'Naziva jahača',
|
||||
elementId : 'ID elementa',
|
||||
elementType : 'Vrsta elementa'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'hr',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informacije elementa',
|
||||
dialogName : 'Naziv prozora za dijalog',
|
||||
tabName : 'Naziva jahača',
|
||||
elementId : 'ID elementa',
|
||||
elementType : 'Vrsta elementa'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'it',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informazioni elemento',
|
||||
dialogName : 'Nome finestra di dialogo',
|
||||
tabName : 'Nome Tab',
|
||||
elementId : 'ID Elemento',
|
||||
elementType : 'Tipo elemento'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'it',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informazioni elemento',
|
||||
dialogName : 'Nome finestra di dialogo',
|
||||
tabName : 'Nome Tab',
|
||||
elementId : 'ID Elemento',
|
||||
elementType : 'Tipo elemento'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'nb',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformasjon',
|
||||
dialogName : 'Navn på dialogvindu',
|
||||
tabName : 'Navn på fane',
|
||||
elementId : 'Element-ID',
|
||||
elementType : 'Elementtype'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'nb',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformasjon',
|
||||
dialogName : 'Navn på dialogvindu',
|
||||
tabName : 'Navn på fane',
|
||||
elementId : 'Element-ID',
|
||||
elementType : 'Elementtype'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'nl',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformatie',
|
||||
dialogName : 'Naam dialoogvenster',
|
||||
tabName : 'Tabnaam',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Elementtype'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'nl',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformatie',
|
||||
dialogName : 'Naam dialoogvenster',
|
||||
tabName : 'Tabnaam',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Elementtype'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'no',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformasjon',
|
||||
dialogName : 'Navn på dialogvindu',
|
||||
tabName : 'Navn på fane',
|
||||
elementId : 'Element-ID',
|
||||
elementType : 'Elementtype'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'no',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Elementinformasjon',
|
||||
dialogName : 'Navn på dialogvindu',
|
||||
tabName : 'Navn på fane',
|
||||
elementId : 'Element-ID',
|
||||
elementType : 'Elementtype'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'pl',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informacja o elemencie',
|
||||
dialogName : 'Nazwa okna dialogowego',
|
||||
tabName : 'Nazwa zakładki',
|
||||
elementId : 'ID elementu',
|
||||
elementType : 'Typ elementu'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'pl',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informacja o elemencie',
|
||||
dialogName : 'Nazwa okna dialogowego',
|
||||
tabName : 'Nazwa zakładki',
|
||||
elementId : 'ID elementu',
|
||||
elementType : 'Typ elementu'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'pt-br',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informação do Elemento',
|
||||
dialogName : 'Nome da janela de diálogo',
|
||||
tabName : 'Nome da aba',
|
||||
elementId : 'ID do elemento',
|
||||
elementType : 'Tipo do elemento'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'pt-br',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Informação do Elemento',
|
||||
dialogName : 'Nome da janela de diálogo',
|
||||
tabName : 'Nome da aba',
|
||||
elementId : 'ID do elemento',
|
||||
elementType : 'Tipo do elemento'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'tr',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Eleman Bilgisi',
|
||||
dialogName : 'İletişim pencere ismi',
|
||||
tabName : 'Sekme adı',
|
||||
elementId : 'Eleman ID',
|
||||
elementType : 'Eleman türü'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'tr',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Eleman Bilgisi',
|
||||
dialogName : 'İletişim pencere ismi',
|
||||
tabName : 'Sekme adı',
|
||||
elementId : 'Eleman ID',
|
||||
elementType : 'Eleman türü'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'ug',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'ئېلېمېنت ئۇچۇرى',
|
||||
dialogName : 'سۆزلەشكۈ كۆزنەك ئاتى',
|
||||
tabName : 'Tab ئاتى',
|
||||
elementId : 'ئېلېمېنت كىملىكى',
|
||||
elementType : 'ئېلېمېنت تىپى'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'ug',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'ئېلېمېنت ئۇچۇرى',
|
||||
dialogName : 'سۆزلەشكۈ كۆزنەك ئاتى',
|
||||
tabName : 'Tab ئاتى',
|
||||
elementId : 'ئېلېمېنت كىملىكى',
|
||||
elementType : 'ئېلېمېنت تىپى'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'uk',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Відомості про Елемент',
|
||||
dialogName : 'Заголовок діалогового вікна',
|
||||
tabName : 'Назва вкладки',
|
||||
elementId : 'Ідентифікатор Елемента',
|
||||
elementType : 'Тип Елемента'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'uk',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Відомості про Елемент',
|
||||
dialogName : 'Заголовок діалогового вікна',
|
||||
tabName : 'Назва вкладки',
|
||||
elementId : 'Ідентифікатор Елемента',
|
||||
elementType : 'Тип Елемента'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'vi',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Thông tin thành ph',
|
||||
dialogName : 'Tên hộp tho',
|
||||
tabName : 'Tên th',
|
||||
elementId : 'Mã thành ph',
|
||||
elementType : 'Loại thành ph'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'vi',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Thông tin thành ph',
|
||||
dialogName : 'Tên hộp tho',
|
||||
tabName : 'Tên th',
|
||||
elementId : 'Mã thành ph',
|
||||
elementType : 'Loại thành ph'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'zh-cn',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : '元素信息',
|
||||
dialogName : '对话框窗口名称',
|
||||
tabName : 'Tab 名称',
|
||||
elementId : '元素 ID',
|
||||
elementType : '元素类型'
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'zh-cn',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : '元素信息',
|
||||
dialogName : '对话框窗口名称',
|
||||
tabName : 'Tab 名称',
|
||||
elementId : '元素 ID',
|
||||
elementType : '元素类型'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,173 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'devtools',
|
||||
{
|
||||
lang : [ 'en', 'bg', 'cs', 'cy', 'da', 'de', 'el', 'eo', 'et', 'fa', 'fi', 'fr', 'gu', 'he', 'hr', 'it', 'nb', 'nl', 'no', 'pl', 'pt-br', 'tr', 'ug', 'uk', 'vi', 'zh-cn' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
editor._.showDialogDefinitionTooltips = 1;
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.document.appendStyleText( CKEDITOR.config.devtools_styles ||
|
||||
'#cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }' +
|
||||
'#cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }' +
|
||||
'#cke_tooltip ul { padding: 0pt; list-style-type: none; }' );
|
||||
}
|
||||
});
|
||||
|
||||
(function()
|
||||
{
|
||||
function defaultCallback( editor, dialog, element, tabName )
|
||||
{
|
||||
var lang = editor.lang.devTools,
|
||||
link = '<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.' +
|
||||
( element ? ( element.type == 'text' ? 'textInput' : element.type ) : 'content' ) +
|
||||
'.html" target="_blank">' + ( element ? element.type : 'content' ) + '</a>',
|
||||
str =
|
||||
'<h2>' + lang.title + '</h2>' +
|
||||
'<ul>' +
|
||||
'<li><strong>' + lang.dialogName + '</strong> : ' + dialog.getName() + '</li>' +
|
||||
'<li><strong>' + lang.tabName + '</strong> : ' + tabName + '</li>';
|
||||
|
||||
if ( element )
|
||||
str += '<li><strong>' + lang.elementId + '</strong> : ' + element.id + '</li>';
|
||||
|
||||
str += '<li><strong>' + lang.elementType + '</strong> : ' + link + '</li>';
|
||||
|
||||
return str + '</ul>';
|
||||
}
|
||||
|
||||
function showTooltip( callback, el, editor, dialog, obj, tabName )
|
||||
{
|
||||
var pos = el.getDocumentPosition(),
|
||||
styles = { 'z-index' : CKEDITOR.dialog._.currentZIndex + 10, top : ( pos.y + el.getSize( 'height' ) ) + 'px' };
|
||||
|
||||
tooltip.setHtml( callback( editor, dialog, obj, tabName ) );
|
||||
tooltip.show();
|
||||
|
||||
// Translate coordinate for RTL.
|
||||
if ( editor.lang.dir == 'rtl' )
|
||||
{
|
||||
var viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize();
|
||||
styles.right = ( viewPaneSize.width - pos.x - el.getSize( 'width' ) ) + 'px';
|
||||
}
|
||||
else
|
||||
styles.left = pos.x + 'px';
|
||||
|
||||
tooltip.setStyles( styles );
|
||||
}
|
||||
|
||||
var tooltip;
|
||||
CKEDITOR.on( 'reset', function()
|
||||
{
|
||||
tooltip && tooltip.remove();
|
||||
tooltip = null;
|
||||
});
|
||||
|
||||
CKEDITOR.on( 'dialogDefinition', function( evt )
|
||||
{
|
||||
var editor = evt.editor;
|
||||
if ( editor._.showDialogDefinitionTooltips )
|
||||
{
|
||||
if ( !tooltip )
|
||||
{
|
||||
tooltip = CKEDITOR.dom.element.createFromHtml( '<div id="cke_tooltip" tabindex="-1" style="position: absolute"></div>', CKEDITOR.document );
|
||||
tooltip.hide();
|
||||
tooltip.on( 'mouseover', function(){ this.show(); } );
|
||||
tooltip.on( 'mouseout', function(){ this.hide(); } );
|
||||
tooltip.appendTo( CKEDITOR.document.getBody() );
|
||||
}
|
||||
|
||||
var dialog = evt.data.definition.dialog,
|
||||
callback = editor.config.devtools_textCallback || defaultCallback;
|
||||
|
||||
dialog.on( 'load', function()
|
||||
{
|
||||
var tabs = dialog.parts.tabs.getChildren(), tab;
|
||||
for ( var i = 0, len = tabs.count(); i < len; i++ )
|
||||
{
|
||||
tab = tabs.getItem( i );
|
||||
tab.on( 'mouseover', function()
|
||||
{
|
||||
var id = this.$.id;
|
||||
showTooltip( callback, this, editor, dialog, null, id.substring( 4, id.lastIndexOf( '_' ) ) );
|
||||
});
|
||||
tab.on( 'mouseout', function()
|
||||
{
|
||||
tooltip.hide();
|
||||
});
|
||||
}
|
||||
|
||||
dialog.foreach( function( obj )
|
||||
{
|
||||
if ( obj.type in { hbox : 1, vbox : 1 } )
|
||||
return;
|
||||
|
||||
var el = obj.getElement();
|
||||
if ( el )
|
||||
{
|
||||
el.on( 'mouseover', function()
|
||||
{
|
||||
showTooltip( callback, this, editor, dialog, obj, dialog._.currentTabId );
|
||||
});
|
||||
el.on( 'mouseout', function()
|
||||
{
|
||||
tooltip.hide();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* A function that returns the text to be displayed inside the Developer Tools tooltip when hovering over a dialog UI element.
|
||||
* There are 4 parameters that are being passed into the function: editor, dialog window, element, tab name.
|
||||
* @name editor.config.devtools_textCallback
|
||||
* @since 3.6
|
||||
* @type Function
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* // Show dialog window name, tab ID, and element ID.
|
||||
* config.devtools_textCallback = function( editor, dialog, element, tabName )
|
||||
* {
|
||||
* var lang = editor.lang.devTools,
|
||||
* link = '<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.' +
|
||||
* ( element ? ( element.type == 'text' ? 'textInput' : element.type ) : 'content' ) +
|
||||
* '.html" target="_blank">' + ( element ? element.type : 'content' ) + '</a>',
|
||||
* str =
|
||||
* '<h2>' + lang.title + '</h2>' +
|
||||
* '<ul>' +
|
||||
* '<li><strong>' + lang.dialogName + '</strong> : ' + dialog.getName() + '</li>' +
|
||||
* '<li><strong>' + lang.tabName + '</strong> : ' + tabName + '</li>';
|
||||
*
|
||||
* if ( element )
|
||||
* str += '<li><strong>' + lang.elementId + '</strong> : ' + element.id + '</li>';
|
||||
*
|
||||
* str += '<li><strong>' + lang.elementType + '</strong> : ' + link + '</li>';
|
||||
*
|
||||
* return str + '</ul>';
|
||||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* A setting that stores CSS rules to be injected into the page with styles to be applied to the tooltip element.
|
||||
* @name CKEDITOR.config.devtools_styles
|
||||
* @since 3.6
|
||||
* @type String
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* CKEDITOR.config.devtools_styles = "
|
||||
* #cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }
|
||||
* #cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }
|
||||
* #cke_tooltip ul { padding: 0pt; list-style-type: none; }
|
||||
* ";
|
||||
*/
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'devtools',
|
||||
{
|
||||
lang : [ 'en', 'bg', 'cs', 'cy', 'da', 'de', 'el', 'eo', 'et', 'fa', 'fi', 'fr', 'gu', 'he', 'hr', 'it', 'nb', 'nl', 'no', 'pl', 'pt-br', 'tr', 'ug', 'uk', 'vi', 'zh-cn' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
editor._.showDialogDefinitionTooltips = 1;
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.document.appendStyleText( CKEDITOR.config.devtools_styles ||
|
||||
'#cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }' +
|
||||
'#cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }' +
|
||||
'#cke_tooltip ul { padding: 0pt; list-style-type: none; }' );
|
||||
}
|
||||
});
|
||||
|
||||
(function()
|
||||
{
|
||||
function defaultCallback( editor, dialog, element, tabName )
|
||||
{
|
||||
var lang = editor.lang.devTools,
|
||||
link = '<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.' +
|
||||
( element ? ( element.type == 'text' ? 'textInput' : element.type ) : 'content' ) +
|
||||
'.html" target="_blank">' + ( element ? element.type : 'content' ) + '</a>',
|
||||
str =
|
||||
'<h2>' + lang.title + '</h2>' +
|
||||
'<ul>' +
|
||||
'<li><strong>' + lang.dialogName + '</strong> : ' + dialog.getName() + '</li>' +
|
||||
'<li><strong>' + lang.tabName + '</strong> : ' + tabName + '</li>';
|
||||
|
||||
if ( element )
|
||||
str += '<li><strong>' + lang.elementId + '</strong> : ' + element.id + '</li>';
|
||||
|
||||
str += '<li><strong>' + lang.elementType + '</strong> : ' + link + '</li>';
|
||||
|
||||
return str + '</ul>';
|
||||
}
|
||||
|
||||
function showTooltip( callback, el, editor, dialog, obj, tabName )
|
||||
{
|
||||
var pos = el.getDocumentPosition(),
|
||||
styles = { 'z-index' : CKEDITOR.dialog._.currentZIndex + 10, top : ( pos.y + el.getSize( 'height' ) ) + 'px' };
|
||||
|
||||
tooltip.setHtml( callback( editor, dialog, obj, tabName ) );
|
||||
tooltip.show();
|
||||
|
||||
// Translate coordinate for RTL.
|
||||
if ( editor.lang.dir == 'rtl' )
|
||||
{
|
||||
var viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize();
|
||||
styles.right = ( viewPaneSize.width - pos.x - el.getSize( 'width' ) ) + 'px';
|
||||
}
|
||||
else
|
||||
styles.left = pos.x + 'px';
|
||||
|
||||
tooltip.setStyles( styles );
|
||||
}
|
||||
|
||||
var tooltip;
|
||||
CKEDITOR.on( 'reset', function()
|
||||
{
|
||||
tooltip && tooltip.remove();
|
||||
tooltip = null;
|
||||
});
|
||||
|
||||
CKEDITOR.on( 'dialogDefinition', function( evt )
|
||||
{
|
||||
var editor = evt.editor;
|
||||
if ( editor._.showDialogDefinitionTooltips )
|
||||
{
|
||||
if ( !tooltip )
|
||||
{
|
||||
tooltip = CKEDITOR.dom.element.createFromHtml( '<div id="cke_tooltip" tabindex="-1" style="position: absolute"></div>', CKEDITOR.document );
|
||||
tooltip.hide();
|
||||
tooltip.on( 'mouseover', function(){ this.show(); } );
|
||||
tooltip.on( 'mouseout', function(){ this.hide(); } );
|
||||
tooltip.appendTo( CKEDITOR.document.getBody() );
|
||||
}
|
||||
|
||||
var dialog = evt.data.definition.dialog,
|
||||
callback = editor.config.devtools_textCallback || defaultCallback;
|
||||
|
||||
dialog.on( 'load', function()
|
||||
{
|
||||
var tabs = dialog.parts.tabs.getChildren(), tab;
|
||||
for ( var i = 0, len = tabs.count(); i < len; i++ )
|
||||
{
|
||||
tab = tabs.getItem( i );
|
||||
tab.on( 'mouseover', function()
|
||||
{
|
||||
var id = this.$.id;
|
||||
showTooltip( callback, this, editor, dialog, null, id.substring( 4, id.lastIndexOf( '_' ) ) );
|
||||
});
|
||||
tab.on( 'mouseout', function()
|
||||
{
|
||||
tooltip.hide();
|
||||
});
|
||||
}
|
||||
|
||||
dialog.foreach( function( obj )
|
||||
{
|
||||
if ( obj.type in { hbox : 1, vbox : 1 } )
|
||||
return;
|
||||
|
||||
var el = obj.getElement();
|
||||
if ( el )
|
||||
{
|
||||
el.on( 'mouseover', function()
|
||||
{
|
||||
showTooltip( callback, this, editor, dialog, obj, dialog._.currentTabId );
|
||||
});
|
||||
el.on( 'mouseout', function()
|
||||
{
|
||||
tooltip.hide();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* A function that returns the text to be displayed inside the Developer Tools tooltip when hovering over a dialog UI element.
|
||||
* There are 4 parameters that are being passed into the function: editor, dialog window, element, tab name.
|
||||
* @name editor.config.devtools_textCallback
|
||||
* @since 3.6
|
||||
* @type Function
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* // Show dialog window name, tab ID, and element ID.
|
||||
* config.devtools_textCallback = function( editor, dialog, element, tabName )
|
||||
* {
|
||||
* var lang = editor.lang.devTools,
|
||||
* link = '<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.' +
|
||||
* ( element ? ( element.type == 'text' ? 'textInput' : element.type ) : 'content' ) +
|
||||
* '.html" target="_blank">' + ( element ? element.type : 'content' ) + '</a>',
|
||||
* str =
|
||||
* '<h2>' + lang.title + '</h2>' +
|
||||
* '<ul>' +
|
||||
* '<li><strong>' + lang.dialogName + '</strong> : ' + dialog.getName() + '</li>' +
|
||||
* '<li><strong>' + lang.tabName + '</strong> : ' + tabName + '</li>';
|
||||
*
|
||||
* if ( element )
|
||||
* str += '<li><strong>' + lang.elementId + '</strong> : ' + element.id + '</li>';
|
||||
*
|
||||
* str += '<li><strong>' + lang.elementType + '</strong> : ' + link + '</li>';
|
||||
*
|
||||
* return str + '</ul>';
|
||||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* A setting that stores CSS rules to be injected into the page with styles to be applied to the tooltip element.
|
||||
* @name CKEDITOR.config.devtools_styles
|
||||
* @since 3.6
|
||||
* @type String
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* CKEDITOR.config.devtools_styles = "
|
||||
* #cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }
|
||||
* #cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }
|
||||
* #cke_tooltip ul { padding: 0pt; list-style-type: none; }
|
||||
* ";
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,208 +1,208 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
|
||||
function setupAdvParams( element )
|
||||
{
|
||||
var attrName = this.att;
|
||||
|
||||
var value = element && element.hasAttribute( attrName ) && element.getAttribute( attrName ) || '';
|
||||
|
||||
if ( value !== undefined )
|
||||
this.setValue( value );
|
||||
}
|
||||
|
||||
function commitAdvParams()
|
||||
{
|
||||
// Dialogs may use different parameters in the commit list, so, by
|
||||
// definition, we take the first CKEDITOR.dom.element available.
|
||||
var element;
|
||||
|
||||
for ( var i = 0 ; i < arguments.length ; i++ )
|
||||
{
|
||||
if ( arguments[ i ] instanceof CKEDITOR.dom.element )
|
||||
{
|
||||
element = arguments[ i ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( element )
|
||||
{
|
||||
var attrName = this.att,
|
||||
value = this.getValue();
|
||||
|
||||
if ( value )
|
||||
element.setAttribute( attrName, value );
|
||||
else
|
||||
element.removeAttribute( attrName, value );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'dialogadvtab',
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param tabConfig
|
||||
* id, dir, classes, styles
|
||||
*/
|
||||
createAdvancedTab : function( editor, tabConfig )
|
||||
{
|
||||
if ( !tabConfig )
|
||||
tabConfig = { id:1, dir:1, classes:1, styles:1 };
|
||||
|
||||
var lang = editor.lang.common;
|
||||
|
||||
var result =
|
||||
{
|
||||
id : 'advanced',
|
||||
label : lang.advancedTab,
|
||||
title : lang.advancedTab,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 1,
|
||||
children : []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var contents = [];
|
||||
|
||||
if ( tabConfig.id || tabConfig.dir )
|
||||
{
|
||||
if ( tabConfig.id )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
id : 'advId',
|
||||
att : 'id',
|
||||
type : 'text',
|
||||
label : lang.id,
|
||||
setup : setupAdvParams,
|
||||
commit : commitAdvParams
|
||||
});
|
||||
}
|
||||
|
||||
if ( tabConfig.dir )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
id : 'advLangDir',
|
||||
att : 'dir',
|
||||
type : 'select',
|
||||
label : lang.langDir,
|
||||
'default' : '',
|
||||
style : 'width:100%',
|
||||
items :
|
||||
[
|
||||
[ lang.notSet, '' ],
|
||||
[ lang.langDirLTR, 'ltr' ],
|
||||
[ lang.langDirRTL, 'rtl' ]
|
||||
],
|
||||
setup : setupAdvParams,
|
||||
commit : commitAdvParams
|
||||
});
|
||||
}
|
||||
|
||||
result.elements[ 0 ].children.push(
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children : [].concat( contents )
|
||||
});
|
||||
}
|
||||
|
||||
if ( tabConfig.styles || tabConfig.classes )
|
||||
{
|
||||
contents = [];
|
||||
|
||||
if ( tabConfig.styles )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
id : 'advStyles',
|
||||
att : 'style',
|
||||
type : 'text',
|
||||
label : lang.styles,
|
||||
'default' : '',
|
||||
|
||||
validate : CKEDITOR.dialog.validate.inlineStyle( lang.invalidInlineStyle ),
|
||||
onChange : function(){},
|
||||
|
||||
getStyle : function( name, defaultValue )
|
||||
{
|
||||
var match = this.getValue().match( new RegExp( name + '\\s*:\\s*([^;]*)', 'i') );
|
||||
return match ? match[ 1 ] : defaultValue;
|
||||
},
|
||||
|
||||
updateStyle : function( name, value )
|
||||
{
|
||||
var styles = this.getValue();
|
||||
|
||||
// Remove the current value.
|
||||
if ( styles )
|
||||
{
|
||||
styles = styles
|
||||
.replace( new RegExp( '\\s*' + name + '\s*:[^;]*(?:$|;\s*)', 'i' ), '' )
|
||||
.replace( /^[;\s]+/, '' )
|
||||
.replace( /\s+$/, '' );
|
||||
}
|
||||
|
||||
if ( value )
|
||||
{
|
||||
styles && !(/;\s*$/).test( styles ) && ( styles += '; ' );
|
||||
styles += name + ': ' + value;
|
||||
}
|
||||
|
||||
this.setValue( styles, 1 );
|
||||
|
||||
},
|
||||
|
||||
setup : setupAdvParams,
|
||||
|
||||
commit : commitAdvParams
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if ( tabConfig.classes )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'advCSSClasses',
|
||||
att : 'class',
|
||||
type : 'text',
|
||||
label : lang.cssClasses,
|
||||
'default' : '',
|
||||
setup : setupAdvParams,
|
||||
commit : commitAdvParams
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
result.elements[ 0 ].children.push(
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children : [].concat( contents )
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
|
||||
function setupAdvParams( element )
|
||||
{
|
||||
var attrName = this.att;
|
||||
|
||||
var value = element && element.hasAttribute( attrName ) && element.getAttribute( attrName ) || '';
|
||||
|
||||
if ( value !== undefined )
|
||||
this.setValue( value );
|
||||
}
|
||||
|
||||
function commitAdvParams()
|
||||
{
|
||||
// Dialogs may use different parameters in the commit list, so, by
|
||||
// definition, we take the first CKEDITOR.dom.element available.
|
||||
var element;
|
||||
|
||||
for ( var i = 0 ; i < arguments.length ; i++ )
|
||||
{
|
||||
if ( arguments[ i ] instanceof CKEDITOR.dom.element )
|
||||
{
|
||||
element = arguments[ i ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( element )
|
||||
{
|
||||
var attrName = this.att,
|
||||
value = this.getValue();
|
||||
|
||||
if ( value )
|
||||
element.setAttribute( attrName, value );
|
||||
else
|
||||
element.removeAttribute( attrName, value );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'dialogadvtab',
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param tabConfig
|
||||
* id, dir, classes, styles
|
||||
*/
|
||||
createAdvancedTab : function( editor, tabConfig )
|
||||
{
|
||||
if ( !tabConfig )
|
||||
tabConfig = { id:1, dir:1, classes:1, styles:1 };
|
||||
|
||||
var lang = editor.lang.common;
|
||||
|
||||
var result =
|
||||
{
|
||||
id : 'advanced',
|
||||
label : lang.advancedTab,
|
||||
title : lang.advancedTab,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 1,
|
||||
children : []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var contents = [];
|
||||
|
||||
if ( tabConfig.id || tabConfig.dir )
|
||||
{
|
||||
if ( tabConfig.id )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
id : 'advId',
|
||||
att : 'id',
|
||||
type : 'text',
|
||||
label : lang.id,
|
||||
setup : setupAdvParams,
|
||||
commit : commitAdvParams
|
||||
});
|
||||
}
|
||||
|
||||
if ( tabConfig.dir )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
id : 'advLangDir',
|
||||
att : 'dir',
|
||||
type : 'select',
|
||||
label : lang.langDir,
|
||||
'default' : '',
|
||||
style : 'width:100%',
|
||||
items :
|
||||
[
|
||||
[ lang.notSet, '' ],
|
||||
[ lang.langDirLTR, 'ltr' ],
|
||||
[ lang.langDirRTL, 'rtl' ]
|
||||
],
|
||||
setup : setupAdvParams,
|
||||
commit : commitAdvParams
|
||||
});
|
||||
}
|
||||
|
||||
result.elements[ 0 ].children.push(
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children : [].concat( contents )
|
||||
});
|
||||
}
|
||||
|
||||
if ( tabConfig.styles || tabConfig.classes )
|
||||
{
|
||||
contents = [];
|
||||
|
||||
if ( tabConfig.styles )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
id : 'advStyles',
|
||||
att : 'style',
|
||||
type : 'text',
|
||||
label : lang.styles,
|
||||
'default' : '',
|
||||
|
||||
validate : CKEDITOR.dialog.validate.inlineStyle( lang.invalidInlineStyle ),
|
||||
onChange : function(){},
|
||||
|
||||
getStyle : function( name, defaultValue )
|
||||
{
|
||||
var match = this.getValue().match( new RegExp( name + '\\s*:\\s*([^;]*)', 'i') );
|
||||
return match ? match[ 1 ] : defaultValue;
|
||||
},
|
||||
|
||||
updateStyle : function( name, value )
|
||||
{
|
||||
var styles = this.getValue();
|
||||
|
||||
// Remove the current value.
|
||||
if ( styles )
|
||||
{
|
||||
styles = styles
|
||||
.replace( new RegExp( '\\s*' + name + '\s*:[^;]*(?:$|;\s*)', 'i' ), '' )
|
||||
.replace( /^[;\s]+/, '' )
|
||||
.replace( /\s+$/, '' );
|
||||
}
|
||||
|
||||
if ( value )
|
||||
{
|
||||
styles && !(/;\s*$/).test( styles ) && ( styles += '; ' );
|
||||
styles += name + ': ' + value;
|
||||
}
|
||||
|
||||
this.setValue( styles, 1 );
|
||||
|
||||
},
|
||||
|
||||
setup : setupAdvParams,
|
||||
|
||||
commit : commitAdvParams
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if ( tabConfig.classes )
|
||||
{
|
||||
contents.push(
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'advCSSClasses',
|
||||
att : 'class',
|
||||
type : 'text',
|
||||
label : lang.cssClasses,
|
||||
'default' : '',
|
||||
setup : setupAdvParams,
|
||||
commit : commitAdvParams
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
result.elements[ 0 ].children.push(
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children : [].concat( contents )
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,121 +1,121 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The "div" plugin. It wraps the selected block level elements with a 'div' element with specified styles and attributes.
|
||||
*
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'div',
|
||||
{
|
||||
requires : [ 'editingblock', 'dialog', 'domiterator', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var lang = editor.lang.div;
|
||||
|
||||
editor.addCommand( 'creatediv', new CKEDITOR.dialogCommand( 'creatediv' ) );
|
||||
editor.addCommand( 'editdiv', new CKEDITOR.dialogCommand( 'editdiv' ) );
|
||||
editor.addCommand( 'removediv',
|
||||
{
|
||||
exec : function( editor )
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
ranges = selection && selection.getRanges(),
|
||||
range,
|
||||
bookmarks = selection.createBookmarks(),
|
||||
walker,
|
||||
toRemove = [];
|
||||
|
||||
function findDiv( node )
|
||||
{
|
||||
var path = new CKEDITOR.dom.elementPath( node ),
|
||||
blockLimit = path.blockLimit,
|
||||
div = blockLimit.is( 'div' ) && blockLimit;
|
||||
|
||||
if ( div && !div.data( 'cke-div-added' ) )
|
||||
{
|
||||
toRemove.push( div );
|
||||
div.data( 'cke-div-added' );
|
||||
}
|
||||
}
|
||||
|
||||
for ( var i = 0 ; i < ranges.length ; i++ )
|
||||
{
|
||||
range = ranges[ i ];
|
||||
if ( range.collapsed )
|
||||
findDiv( selection.getStartElement() );
|
||||
else
|
||||
{
|
||||
walker = new CKEDITOR.dom.walker( range );
|
||||
walker.evaluator = findDiv;
|
||||
walker.lastForward();
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < toRemove.length ; i++ )
|
||||
toRemove[ i ].remove( true );
|
||||
|
||||
selection.selectBookmarks( bookmarks );
|
||||
}
|
||||
} );
|
||||
|
||||
editor.ui.addButton( 'CreateDiv',
|
||||
{
|
||||
label : lang.toolbar,
|
||||
command :'creatediv'
|
||||
} );
|
||||
|
||||
if ( editor.addMenuItems )
|
||||
{
|
||||
editor.addMenuItems(
|
||||
{
|
||||
editdiv :
|
||||
{
|
||||
label : lang.edit,
|
||||
command : 'editdiv',
|
||||
group : 'div',
|
||||
order : 1
|
||||
},
|
||||
|
||||
removediv:
|
||||
{
|
||||
label : lang.remove,
|
||||
command : 'removediv',
|
||||
group : 'div',
|
||||
order : 5
|
||||
}
|
||||
} );
|
||||
|
||||
if ( editor.contextMenu )
|
||||
{
|
||||
editor.contextMenu.addListener( function( element, selection )
|
||||
{
|
||||
if ( !element || element.isReadOnly() )
|
||||
return null;
|
||||
|
||||
var elementPath = new CKEDITOR.dom.elementPath( element ),
|
||||
blockLimit = elementPath.blockLimit;
|
||||
|
||||
if ( blockLimit && blockLimit.getAscendant( 'div', true ) )
|
||||
{
|
||||
return {
|
||||
editdiv : CKEDITOR.TRISTATE_OFF,
|
||||
removediv : CKEDITOR.TRISTATE_OFF
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add( 'creatediv', this.path + 'dialogs/div.js' );
|
||||
CKEDITOR.dialog.add( 'editdiv', this.path + 'dialogs/div.js' );
|
||||
}
|
||||
} );
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The "div" plugin. It wraps the selected block level elements with a 'div' element with specified styles and attributes.
|
||||
*
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'div',
|
||||
{
|
||||
requires : [ 'editingblock', 'dialog', 'domiterator', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var lang = editor.lang.div;
|
||||
|
||||
editor.addCommand( 'creatediv', new CKEDITOR.dialogCommand( 'creatediv' ) );
|
||||
editor.addCommand( 'editdiv', new CKEDITOR.dialogCommand( 'editdiv' ) );
|
||||
editor.addCommand( 'removediv',
|
||||
{
|
||||
exec : function( editor )
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
ranges = selection && selection.getRanges(),
|
||||
range,
|
||||
bookmarks = selection.createBookmarks(),
|
||||
walker,
|
||||
toRemove = [];
|
||||
|
||||
function findDiv( node )
|
||||
{
|
||||
var path = new CKEDITOR.dom.elementPath( node ),
|
||||
blockLimit = path.blockLimit,
|
||||
div = blockLimit.is( 'div' ) && blockLimit;
|
||||
|
||||
if ( div && !div.data( 'cke-div-added' ) )
|
||||
{
|
||||
toRemove.push( div );
|
||||
div.data( 'cke-div-added' );
|
||||
}
|
||||
}
|
||||
|
||||
for ( var i = 0 ; i < ranges.length ; i++ )
|
||||
{
|
||||
range = ranges[ i ];
|
||||
if ( range.collapsed )
|
||||
findDiv( selection.getStartElement() );
|
||||
else
|
||||
{
|
||||
walker = new CKEDITOR.dom.walker( range );
|
||||
walker.evaluator = findDiv;
|
||||
walker.lastForward();
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < toRemove.length ; i++ )
|
||||
toRemove[ i ].remove( true );
|
||||
|
||||
selection.selectBookmarks( bookmarks );
|
||||
}
|
||||
} );
|
||||
|
||||
editor.ui.addButton( 'CreateDiv',
|
||||
{
|
||||
label : lang.toolbar,
|
||||
command :'creatediv'
|
||||
} );
|
||||
|
||||
if ( editor.addMenuItems )
|
||||
{
|
||||
editor.addMenuItems(
|
||||
{
|
||||
editdiv :
|
||||
{
|
||||
label : lang.edit,
|
||||
command : 'editdiv',
|
||||
group : 'div',
|
||||
order : 1
|
||||
},
|
||||
|
||||
removediv:
|
||||
{
|
||||
label : lang.remove,
|
||||
command : 'removediv',
|
||||
group : 'div',
|
||||
order : 5
|
||||
}
|
||||
} );
|
||||
|
||||
if ( editor.contextMenu )
|
||||
{
|
||||
editor.contextMenu.addListener( function( element, selection )
|
||||
{
|
||||
if ( !element || element.isReadOnly() )
|
||||
return null;
|
||||
|
||||
var elementPath = new CKEDITOR.dom.elementPath( element ),
|
||||
blockLimit = elementPath.blockLimit;
|
||||
|
||||
if ( blockLimit && blockLimit.getAscendant( 'div', true ) )
|
||||
{
|
||||
return {
|
||||
editdiv : CKEDITOR.TRISTATE_OFF,
|
||||
removediv : CKEDITOR.TRISTATE_OFF
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add( 'creatediv', this.path + 'dialogs/div.js' );
|
||||
CKEDITOR.dialog.add( 'editdiv', this.path + 'dialogs/div.js' );
|
||||
}
|
||||
} );
|
||||
})();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'docprops',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
var cmd = new CKEDITOR.dialogCommand( 'docProps' );
|
||||
// Only applicable on full page mode.
|
||||
cmd.modes = { wysiwyg : editor.config.fullPage };
|
||||
editor.addCommand( 'docProps', cmd );
|
||||
CKEDITOR.dialog.add( 'docProps', this.path + 'dialogs/docprops.js' );
|
||||
|
||||
editor.ui.addButton( 'DocProps',
|
||||
{
|
||||
label : editor.lang.docprops.label,
|
||||
command : 'docProps'
|
||||
});
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'docprops',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
var cmd = new CKEDITOR.dialogCommand( 'docProps' );
|
||||
// Only applicable on full page mode.
|
||||
cmd.modes = { wysiwyg : editor.config.fullPage };
|
||||
editor.addCommand( 'docProps', cmd );
|
||||
CKEDITOR.dialog.add( 'docProps', this.path + 'dialogs/docprops.js' );
|
||||
|
||||
editor.ui.addButton( 'DocProps',
|
||||
{
|
||||
label : editor.lang.docprops.label,
|
||||
command : 'docProps'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,366 +1,366 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file DOM iterator, which iterates over list items, lines and paragraphs.
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'domiterator' );
|
||||
|
||||
(function()
|
||||
{
|
||||
/**
|
||||
* @name CKEDITOR.dom.iterator
|
||||
*/
|
||||
function iterator( range )
|
||||
{
|
||||
if ( arguments.length < 1 )
|
||||
return;
|
||||
|
||||
this.range = range;
|
||||
this.forceBrBreak = 0;
|
||||
|
||||
// Whether include <br>s into the enlarged range.(#3730).
|
||||
this.enlargeBr = 1;
|
||||
this.enforceRealBlocks = 0;
|
||||
|
||||
this._ || ( this._ = {} );
|
||||
}
|
||||
|
||||
var beginWhitespaceRegex = /^[\r\n\t ]+$/,
|
||||
// Ignore bookmark nodes.(#3783)
|
||||
bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ),
|
||||
whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ),
|
||||
skipGuard = function( node ) { return bookmarkGuard( node ) && whitespacesGuard( node ); };
|
||||
|
||||
// Get a reference for the next element, bookmark nodes are skipped.
|
||||
function getNextSourceNode( node, startFromSibling, lastNode )
|
||||
{
|
||||
var next = node.getNextSourceNode( startFromSibling, null, lastNode );
|
||||
while ( !bookmarkGuard( next ) )
|
||||
next = next.getNextSourceNode( startFromSibling, null, lastNode );
|
||||
return next;
|
||||
}
|
||||
|
||||
iterator.prototype = {
|
||||
getNextParagraph : function( blockTag )
|
||||
{
|
||||
// The block element to be returned.
|
||||
var block;
|
||||
|
||||
// The range object used to identify the paragraph contents.
|
||||
var range;
|
||||
|
||||
// Indicats that the current element in the loop is the last one.
|
||||
var isLast;
|
||||
|
||||
// Indicate at least one of the range boundaries is inside a preformat block.
|
||||
var touchPre;
|
||||
|
||||
// Instructs to cleanup remaining BRs.
|
||||
var removePreviousBr, removeLastBr;
|
||||
|
||||
// This is the first iteration. Let's initialize it.
|
||||
if ( !this._.started )
|
||||
{
|
||||
range = this.range.clone();
|
||||
|
||||
// Shrink the range to exclude harmful "noises" (#4087, #4450, #5435).
|
||||
range.shrink( CKEDITOR.NODE_ELEMENT, true );
|
||||
|
||||
touchPre = range.endContainer.hasAscendant( 'pre', true )
|
||||
|| range.startContainer.hasAscendant( 'pre', true );
|
||||
|
||||
range.enlarge( this.forceBrBreak && !touchPre || !this.enlargeBr ?
|
||||
CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS );
|
||||
|
||||
if ( !range.collapsed )
|
||||
{
|
||||
var walker = new CKEDITOR.dom.walker( range.clone() ),
|
||||
ignoreBookmarkTextEvaluator = CKEDITOR.dom.walker.bookmark( true, true );
|
||||
// Avoid anchor inside bookmark inner text.
|
||||
walker.evaluator = ignoreBookmarkTextEvaluator;
|
||||
this._.nextNode = walker.next();
|
||||
// TODO: It's better to have walker.reset() used here.
|
||||
walker = new CKEDITOR.dom.walker( range.clone() );
|
||||
walker.evaluator = ignoreBookmarkTextEvaluator;
|
||||
var lastNode = walker.previous();
|
||||
this._.lastNode = lastNode.getNextSourceNode( true );
|
||||
|
||||
// We may have an empty text node at the end of block due to [3770].
|
||||
// If that node is the lastNode, it would cause our logic to leak to the
|
||||
// next block.(#3887)
|
||||
if ( this._.lastNode &&
|
||||
this._.lastNode.type == CKEDITOR.NODE_TEXT &&
|
||||
!CKEDITOR.tools.trim( this._.lastNode.getText() ) &&
|
||||
this._.lastNode.getParent().isBlockBoundary() )
|
||||
{
|
||||
var testRange = new CKEDITOR.dom.range( range.document );
|
||||
testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END );
|
||||
if ( testRange.checkEndOfBlock() )
|
||||
{
|
||||
var path = new CKEDITOR.dom.elementPath( testRange.endContainer );
|
||||
var lastBlock = path.block || path.blockLimit;
|
||||
this._.lastNode = lastBlock.getNextSourceNode( true );
|
||||
}
|
||||
}
|
||||
|
||||
// Probably the document end is reached, we need a marker node.
|
||||
if ( !this._.lastNode )
|
||||
{
|
||||
this._.lastNode = this._.docEndMarker = range.document.createText( '' );
|
||||
this._.lastNode.insertAfter( lastNode );
|
||||
}
|
||||
|
||||
// Let's reuse this variable.
|
||||
range = null;
|
||||
}
|
||||
|
||||
this._.started = 1;
|
||||
}
|
||||
|
||||
var currentNode = this._.nextNode;
|
||||
lastNode = this._.lastNode;
|
||||
|
||||
this._.nextNode = null;
|
||||
while ( currentNode )
|
||||
{
|
||||
// closeRange indicates that a paragraph boundary has been found,
|
||||
// so the range can be closed.
|
||||
var closeRange = 0,
|
||||
parentPre = currentNode.hasAscendant( 'pre' );
|
||||
|
||||
// includeNode indicates that the current node is good to be part
|
||||
// of the range. By default, any non-element node is ok for it.
|
||||
var includeNode = ( currentNode.type != CKEDITOR.NODE_ELEMENT ),
|
||||
continueFromSibling = 0;
|
||||
|
||||
// If it is an element node, let's check if it can be part of the
|
||||
// range.
|
||||
if ( !includeNode )
|
||||
{
|
||||
var nodeName = currentNode.getName();
|
||||
|
||||
if ( currentNode.isBlockBoundary( this.forceBrBreak &&
|
||||
!parentPre && { br : 1 } ) )
|
||||
{
|
||||
// <br> boundaries must be part of the range. It will
|
||||
// happen only if ForceBrBreak.
|
||||
if ( nodeName == 'br' )
|
||||
includeNode = 1;
|
||||
else if ( !range && !currentNode.getChildCount() && nodeName != 'hr' )
|
||||
{
|
||||
// If we have found an empty block, and haven't started
|
||||
// the range yet, it means we must return this block.
|
||||
block = currentNode;
|
||||
isLast = currentNode.equals( lastNode );
|
||||
break;
|
||||
}
|
||||
|
||||
// The range must finish right before the boundary,
|
||||
// including possibly skipped empty spaces. (#1603)
|
||||
if ( range )
|
||||
{
|
||||
range.setEndAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
|
||||
|
||||
// The found boundary must be set as the next one at this
|
||||
// point. (#1717)
|
||||
if ( nodeName != 'br' )
|
||||
this._.nextNode = currentNode;
|
||||
}
|
||||
|
||||
closeRange = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If we have child nodes, let's check them.
|
||||
if ( currentNode.getFirst() )
|
||||
{
|
||||
// If we don't have a range yet, let's start it.
|
||||
if ( !range )
|
||||
{
|
||||
range = new CKEDITOR.dom.range( this.range.document );
|
||||
range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
|
||||
}
|
||||
|
||||
currentNode = currentNode.getFirst();
|
||||
continue;
|
||||
}
|
||||
includeNode = 1;
|
||||
}
|
||||
}
|
||||
else if ( currentNode.type == CKEDITOR.NODE_TEXT )
|
||||
{
|
||||
// Ignore normal whitespaces (i.e. not including or
|
||||
// other unicode whitespaces) before/after a block node.
|
||||
if ( beginWhitespaceRegex.test( currentNode.getText() ) )
|
||||
includeNode = 0;
|
||||
}
|
||||
|
||||
// The current node is good to be part of the range and we are
|
||||
// starting a new range, initialize it first.
|
||||
if ( includeNode && !range )
|
||||
{
|
||||
range = new CKEDITOR.dom.range( this.range.document );
|
||||
range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
|
||||
}
|
||||
|
||||
// The last node has been found.
|
||||
isLast = ( ( !closeRange || includeNode ) && currentNode.equals( lastNode ) );
|
||||
|
||||
// If we are in an element boundary, let's check if it is time
|
||||
// to close the range, otherwise we include the parent within it.
|
||||
if ( range && !closeRange )
|
||||
{
|
||||
while ( !currentNode.getNext( skipGuard ) && !isLast )
|
||||
{
|
||||
var parentNode = currentNode.getParent();
|
||||
|
||||
if ( parentNode.isBlockBoundary( this.forceBrBreak
|
||||
&& !parentPre && { br : 1 } ) )
|
||||
{
|
||||
closeRange = 1;
|
||||
includeNode = 0;
|
||||
isLast = isLast || ( parentNode.equals( lastNode) );
|
||||
// Make sure range includes bookmarks at the end of the block. (#7359)
|
||||
range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END );
|
||||
break;
|
||||
}
|
||||
|
||||
currentNode = parentNode;
|
||||
includeNode = 1;
|
||||
isLast = ( currentNode.equals( lastNode ) );
|
||||
continueFromSibling = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Now finally include the node.
|
||||
if ( includeNode )
|
||||
range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END );
|
||||
|
||||
currentNode = getNextSourceNode ( currentNode, continueFromSibling, lastNode );
|
||||
isLast = !currentNode;
|
||||
|
||||
// We have found a block boundary. Let's close the range and move out of the
|
||||
// loop.
|
||||
if ( isLast || ( closeRange && range ) )
|
||||
break;
|
||||
}
|
||||
|
||||
// Now, based on the processed range, look for (or create) the block to be returned.
|
||||
if ( !block )
|
||||
{
|
||||
// If no range has been found, this is the end.
|
||||
if ( !range )
|
||||
{
|
||||
this._.docEndMarker && this._.docEndMarker.remove();
|
||||
this._.nextNode = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
var startPath = new CKEDITOR.dom.elementPath( range.startContainer );
|
||||
var startBlockLimit = startPath.blockLimit,
|
||||
checkLimits = { div : 1, th : 1, td : 1 };
|
||||
block = startPath.block;
|
||||
|
||||
if ( !block
|
||||
&& !this.enforceRealBlocks
|
||||
&& checkLimits[ startBlockLimit.getName() ]
|
||||
&& range.checkStartOfBlock()
|
||||
&& range.checkEndOfBlock() )
|
||||
block = startBlockLimit;
|
||||
else if ( !block || ( this.enforceRealBlocks && block.getName() == 'li' ) )
|
||||
{
|
||||
// Create the fixed block.
|
||||
block = this.range.document.createElement( blockTag || 'p' );
|
||||
|
||||
// Move the contents of the temporary range to the fixed block.
|
||||
range.extractContents().appendTo( block );
|
||||
block.trim();
|
||||
|
||||
// Insert the fixed block into the DOM.
|
||||
range.insertNode( block );
|
||||
|
||||
removePreviousBr = removeLastBr = true;
|
||||
}
|
||||
else if ( block.getName() != 'li' )
|
||||
{
|
||||
// If the range doesn't includes the entire contents of the
|
||||
// block, we must split it, isolating the range in a dedicated
|
||||
// block.
|
||||
if ( !range.checkStartOfBlock() || !range.checkEndOfBlock() )
|
||||
{
|
||||
// The resulting block will be a clone of the current one.
|
||||
block = block.clone( false );
|
||||
|
||||
// Extract the range contents, moving it to the new block.
|
||||
range.extractContents().appendTo( block );
|
||||
block.trim();
|
||||
|
||||
// Split the block. At this point, the range will be in the
|
||||
// right position for our intents.
|
||||
var splitInfo = range.splitBlock();
|
||||
|
||||
removePreviousBr = !splitInfo.wasStartOfBlock;
|
||||
removeLastBr = !splitInfo.wasEndOfBlock;
|
||||
|
||||
// Insert the new block into the DOM.
|
||||
range.insertNode( block );
|
||||
}
|
||||
}
|
||||
else if ( !isLast )
|
||||
{
|
||||
// LIs are returned as is, with all their children (due to the
|
||||
// nested lists). But, the next node is the node right after
|
||||
// the current range, which could be an <li> child (nested
|
||||
// lists) or the next sibling <li>.
|
||||
|
||||
this._.nextNode = ( block.equals( lastNode ) ? null : getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( removePreviousBr )
|
||||
{
|
||||
var previousSibling = block.getPrevious();
|
||||
if ( previousSibling && previousSibling.type == CKEDITOR.NODE_ELEMENT )
|
||||
{
|
||||
if ( previousSibling.getName() == 'br' )
|
||||
previousSibling.remove();
|
||||
else if ( previousSibling.getLast() && previousSibling.getLast().$.nodeName.toLowerCase() == 'br' )
|
||||
previousSibling.getLast().remove();
|
||||
}
|
||||
}
|
||||
|
||||
if ( removeLastBr )
|
||||
{
|
||||
var lastChild = block.getLast();
|
||||
if ( lastChild && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.getName() == 'br' )
|
||||
{
|
||||
// Take care not to remove the block expanding <br> in non-IE browsers.
|
||||
if ( CKEDITOR.env.ie
|
||||
|| lastChild.getPrevious( bookmarkGuard )
|
||||
|| lastChild.getNext( bookmarkGuard ) )
|
||||
lastChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// Get a reference for the next element. This is important because the
|
||||
// above block can be removed or changed, so we can rely on it for the
|
||||
// next interation.
|
||||
if ( !this._.nextNode )
|
||||
{
|
||||
this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null :
|
||||
getNextSourceNode( block, 1, lastNode );
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.dom.range.prototype.createIterator = function()
|
||||
{
|
||||
return new iterator( this );
|
||||
};
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file DOM iterator, which iterates over list items, lines and paragraphs.
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'domiterator' );
|
||||
|
||||
(function()
|
||||
{
|
||||
/**
|
||||
* @name CKEDITOR.dom.iterator
|
||||
*/
|
||||
function iterator( range )
|
||||
{
|
||||
if ( arguments.length < 1 )
|
||||
return;
|
||||
|
||||
this.range = range;
|
||||
this.forceBrBreak = 0;
|
||||
|
||||
// Whether include <br>s into the enlarged range.(#3730).
|
||||
this.enlargeBr = 1;
|
||||
this.enforceRealBlocks = 0;
|
||||
|
||||
this._ || ( this._ = {} );
|
||||
}
|
||||
|
||||
var beginWhitespaceRegex = /^[\r\n\t ]+$/,
|
||||
// Ignore bookmark nodes.(#3783)
|
||||
bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ),
|
||||
whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ),
|
||||
skipGuard = function( node ) { return bookmarkGuard( node ) && whitespacesGuard( node ); };
|
||||
|
||||
// Get a reference for the next element, bookmark nodes are skipped.
|
||||
function getNextSourceNode( node, startFromSibling, lastNode )
|
||||
{
|
||||
var next = node.getNextSourceNode( startFromSibling, null, lastNode );
|
||||
while ( !bookmarkGuard( next ) )
|
||||
next = next.getNextSourceNode( startFromSibling, null, lastNode );
|
||||
return next;
|
||||
}
|
||||
|
||||
iterator.prototype = {
|
||||
getNextParagraph : function( blockTag )
|
||||
{
|
||||
// The block element to be returned.
|
||||
var block;
|
||||
|
||||
// The range object used to identify the paragraph contents.
|
||||
var range;
|
||||
|
||||
// Indicats that the current element in the loop is the last one.
|
||||
var isLast;
|
||||
|
||||
// Indicate at least one of the range boundaries is inside a preformat block.
|
||||
var touchPre;
|
||||
|
||||
// Instructs to cleanup remaining BRs.
|
||||
var removePreviousBr, removeLastBr;
|
||||
|
||||
// This is the first iteration. Let's initialize it.
|
||||
if ( !this._.started )
|
||||
{
|
||||
range = this.range.clone();
|
||||
|
||||
// Shrink the range to exclude harmful "noises" (#4087, #4450, #5435).
|
||||
range.shrink( CKEDITOR.NODE_ELEMENT, true );
|
||||
|
||||
touchPre = range.endContainer.hasAscendant( 'pre', true )
|
||||
|| range.startContainer.hasAscendant( 'pre', true );
|
||||
|
||||
range.enlarge( this.forceBrBreak && !touchPre || !this.enlargeBr ?
|
||||
CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS );
|
||||
|
||||
if ( !range.collapsed )
|
||||
{
|
||||
var walker = new CKEDITOR.dom.walker( range.clone() ),
|
||||
ignoreBookmarkTextEvaluator = CKEDITOR.dom.walker.bookmark( true, true );
|
||||
// Avoid anchor inside bookmark inner text.
|
||||
walker.evaluator = ignoreBookmarkTextEvaluator;
|
||||
this._.nextNode = walker.next();
|
||||
// TODO: It's better to have walker.reset() used here.
|
||||
walker = new CKEDITOR.dom.walker( range.clone() );
|
||||
walker.evaluator = ignoreBookmarkTextEvaluator;
|
||||
var lastNode = walker.previous();
|
||||
this._.lastNode = lastNode.getNextSourceNode( true );
|
||||
|
||||
// We may have an empty text node at the end of block due to [3770].
|
||||
// If that node is the lastNode, it would cause our logic to leak to the
|
||||
// next block.(#3887)
|
||||
if ( this._.lastNode &&
|
||||
this._.lastNode.type == CKEDITOR.NODE_TEXT &&
|
||||
!CKEDITOR.tools.trim( this._.lastNode.getText() ) &&
|
||||
this._.lastNode.getParent().isBlockBoundary() )
|
||||
{
|
||||
var testRange = new CKEDITOR.dom.range( range.document );
|
||||
testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END );
|
||||
if ( testRange.checkEndOfBlock() )
|
||||
{
|
||||
var path = new CKEDITOR.dom.elementPath( testRange.endContainer );
|
||||
var lastBlock = path.block || path.blockLimit;
|
||||
this._.lastNode = lastBlock.getNextSourceNode( true );
|
||||
}
|
||||
}
|
||||
|
||||
// Probably the document end is reached, we need a marker node.
|
||||
if ( !this._.lastNode )
|
||||
{
|
||||
this._.lastNode = this._.docEndMarker = range.document.createText( '' );
|
||||
this._.lastNode.insertAfter( lastNode );
|
||||
}
|
||||
|
||||
// Let's reuse this variable.
|
||||
range = null;
|
||||
}
|
||||
|
||||
this._.started = 1;
|
||||
}
|
||||
|
||||
var currentNode = this._.nextNode;
|
||||
lastNode = this._.lastNode;
|
||||
|
||||
this._.nextNode = null;
|
||||
while ( currentNode )
|
||||
{
|
||||
// closeRange indicates that a paragraph boundary has been found,
|
||||
// so the range can be closed.
|
||||
var closeRange = 0,
|
||||
parentPre = currentNode.hasAscendant( 'pre' );
|
||||
|
||||
// includeNode indicates that the current node is good to be part
|
||||
// of the range. By default, any non-element node is ok for it.
|
||||
var includeNode = ( currentNode.type != CKEDITOR.NODE_ELEMENT ),
|
||||
continueFromSibling = 0;
|
||||
|
||||
// If it is an element node, let's check if it can be part of the
|
||||
// range.
|
||||
if ( !includeNode )
|
||||
{
|
||||
var nodeName = currentNode.getName();
|
||||
|
||||
if ( currentNode.isBlockBoundary( this.forceBrBreak &&
|
||||
!parentPre && { br : 1 } ) )
|
||||
{
|
||||
// <br> boundaries must be part of the range. It will
|
||||
// happen only if ForceBrBreak.
|
||||
if ( nodeName == 'br' )
|
||||
includeNode = 1;
|
||||
else if ( !range && !currentNode.getChildCount() && nodeName != 'hr' )
|
||||
{
|
||||
// If we have found an empty block, and haven't started
|
||||
// the range yet, it means we must return this block.
|
||||
block = currentNode;
|
||||
isLast = currentNode.equals( lastNode );
|
||||
break;
|
||||
}
|
||||
|
||||
// The range must finish right before the boundary,
|
||||
// including possibly skipped empty spaces. (#1603)
|
||||
if ( range )
|
||||
{
|
||||
range.setEndAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
|
||||
|
||||
// The found boundary must be set as the next one at this
|
||||
// point. (#1717)
|
||||
if ( nodeName != 'br' )
|
||||
this._.nextNode = currentNode;
|
||||
}
|
||||
|
||||
closeRange = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If we have child nodes, let's check them.
|
||||
if ( currentNode.getFirst() )
|
||||
{
|
||||
// If we don't have a range yet, let's start it.
|
||||
if ( !range )
|
||||
{
|
||||
range = new CKEDITOR.dom.range( this.range.document );
|
||||
range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
|
||||
}
|
||||
|
||||
currentNode = currentNode.getFirst();
|
||||
continue;
|
||||
}
|
||||
includeNode = 1;
|
||||
}
|
||||
}
|
||||
else if ( currentNode.type == CKEDITOR.NODE_TEXT )
|
||||
{
|
||||
// Ignore normal whitespaces (i.e. not including or
|
||||
// other unicode whitespaces) before/after a block node.
|
||||
if ( beginWhitespaceRegex.test( currentNode.getText() ) )
|
||||
includeNode = 0;
|
||||
}
|
||||
|
||||
// The current node is good to be part of the range and we are
|
||||
// starting a new range, initialize it first.
|
||||
if ( includeNode && !range )
|
||||
{
|
||||
range = new CKEDITOR.dom.range( this.range.document );
|
||||
range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
|
||||
}
|
||||
|
||||
// The last node has been found.
|
||||
isLast = ( ( !closeRange || includeNode ) && currentNode.equals( lastNode ) );
|
||||
|
||||
// If we are in an element boundary, let's check if it is time
|
||||
// to close the range, otherwise we include the parent within it.
|
||||
if ( range && !closeRange )
|
||||
{
|
||||
while ( !currentNode.getNext( skipGuard ) && !isLast )
|
||||
{
|
||||
var parentNode = currentNode.getParent();
|
||||
|
||||
if ( parentNode.isBlockBoundary( this.forceBrBreak
|
||||
&& !parentPre && { br : 1 } ) )
|
||||
{
|
||||
closeRange = 1;
|
||||
includeNode = 0;
|
||||
isLast = isLast || ( parentNode.equals( lastNode) );
|
||||
// Make sure range includes bookmarks at the end of the block. (#7359)
|
||||
range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END );
|
||||
break;
|
||||
}
|
||||
|
||||
currentNode = parentNode;
|
||||
includeNode = 1;
|
||||
isLast = ( currentNode.equals( lastNode ) );
|
||||
continueFromSibling = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Now finally include the node.
|
||||
if ( includeNode )
|
||||
range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END );
|
||||
|
||||
currentNode = getNextSourceNode ( currentNode, continueFromSibling, lastNode );
|
||||
isLast = !currentNode;
|
||||
|
||||
// We have found a block boundary. Let's close the range and move out of the
|
||||
// loop.
|
||||
if ( isLast || ( closeRange && range ) )
|
||||
break;
|
||||
}
|
||||
|
||||
// Now, based on the processed range, look for (or create) the block to be returned.
|
||||
if ( !block )
|
||||
{
|
||||
// If no range has been found, this is the end.
|
||||
if ( !range )
|
||||
{
|
||||
this._.docEndMarker && this._.docEndMarker.remove();
|
||||
this._.nextNode = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
var startPath = new CKEDITOR.dom.elementPath( range.startContainer );
|
||||
var startBlockLimit = startPath.blockLimit,
|
||||
checkLimits = { div : 1, th : 1, td : 1 };
|
||||
block = startPath.block;
|
||||
|
||||
if ( !block
|
||||
&& !this.enforceRealBlocks
|
||||
&& checkLimits[ startBlockLimit.getName() ]
|
||||
&& range.checkStartOfBlock()
|
||||
&& range.checkEndOfBlock() )
|
||||
block = startBlockLimit;
|
||||
else if ( !block || ( this.enforceRealBlocks && block.getName() == 'li' ) )
|
||||
{
|
||||
// Create the fixed block.
|
||||
block = this.range.document.createElement( blockTag || 'p' );
|
||||
|
||||
// Move the contents of the temporary range to the fixed block.
|
||||
range.extractContents().appendTo( block );
|
||||
block.trim();
|
||||
|
||||
// Insert the fixed block into the DOM.
|
||||
range.insertNode( block );
|
||||
|
||||
removePreviousBr = removeLastBr = true;
|
||||
}
|
||||
else if ( block.getName() != 'li' )
|
||||
{
|
||||
// If the range doesn't includes the entire contents of the
|
||||
// block, we must split it, isolating the range in a dedicated
|
||||
// block.
|
||||
if ( !range.checkStartOfBlock() || !range.checkEndOfBlock() )
|
||||
{
|
||||
// The resulting block will be a clone of the current one.
|
||||
block = block.clone( false );
|
||||
|
||||
// Extract the range contents, moving it to the new block.
|
||||
range.extractContents().appendTo( block );
|
||||
block.trim();
|
||||
|
||||
// Split the block. At this point, the range will be in the
|
||||
// right position for our intents.
|
||||
var splitInfo = range.splitBlock();
|
||||
|
||||
removePreviousBr = !splitInfo.wasStartOfBlock;
|
||||
removeLastBr = !splitInfo.wasEndOfBlock;
|
||||
|
||||
// Insert the new block into the DOM.
|
||||
range.insertNode( block );
|
||||
}
|
||||
}
|
||||
else if ( !isLast )
|
||||
{
|
||||
// LIs are returned as is, with all their children (due to the
|
||||
// nested lists). But, the next node is the node right after
|
||||
// the current range, which could be an <li> child (nested
|
||||
// lists) or the next sibling <li>.
|
||||
|
||||
this._.nextNode = ( block.equals( lastNode ) ? null : getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( removePreviousBr )
|
||||
{
|
||||
var previousSibling = block.getPrevious();
|
||||
if ( previousSibling && previousSibling.type == CKEDITOR.NODE_ELEMENT )
|
||||
{
|
||||
if ( previousSibling.getName() == 'br' )
|
||||
previousSibling.remove();
|
||||
else if ( previousSibling.getLast() && previousSibling.getLast().$.nodeName.toLowerCase() == 'br' )
|
||||
previousSibling.getLast().remove();
|
||||
}
|
||||
}
|
||||
|
||||
if ( removeLastBr )
|
||||
{
|
||||
var lastChild = block.getLast();
|
||||
if ( lastChild && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.getName() == 'br' )
|
||||
{
|
||||
// Take care not to remove the block expanding <br> in non-IE browsers.
|
||||
if ( CKEDITOR.env.ie
|
||||
|| lastChild.getPrevious( bookmarkGuard )
|
||||
|| lastChild.getNext( bookmarkGuard ) )
|
||||
lastChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// Get a reference for the next element. This is important because the
|
||||
// above block can be removed or changed, so we can rely on it for the
|
||||
// next interation.
|
||||
if ( !this._.nextNode )
|
||||
{
|
||||
this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null :
|
||||
getNextSourceNode( block, 1, lastNode );
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.dom.range.prototype.createIterator = function()
|
||||
{
|
||||
return new iterator( this );
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,278 +1,278 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The default editing block plugin, which holds the editing area
|
||||
* and source view.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
// This is a semaphore used to avoid recursive calls between
|
||||
// the following data handling functions.
|
||||
var isHandlingData;
|
||||
|
||||
CKEDITOR.plugins.add( 'editingblock',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
if ( !editor.config.editingBlock )
|
||||
return;
|
||||
|
||||
editor.on( 'themeSpace', function( event )
|
||||
{
|
||||
if ( event.data.space == 'contents' )
|
||||
event.data.html += '<br>';
|
||||
});
|
||||
|
||||
editor.on( 'themeLoaded', function()
|
||||
{
|
||||
editor.fireOnce( 'editingBlockReady' );
|
||||
});
|
||||
|
||||
editor.on( 'uiReady', function()
|
||||
{
|
||||
editor.setMode( editor.config.startupMode );
|
||||
});
|
||||
|
||||
editor.on( 'afterSetData', function()
|
||||
{
|
||||
if ( !isHandlingData )
|
||||
{
|
||||
function setData()
|
||||
{
|
||||
isHandlingData = true;
|
||||
editor.getMode().loadData( editor.getData() );
|
||||
isHandlingData = false;
|
||||
}
|
||||
|
||||
if ( editor.mode )
|
||||
setData();
|
||||
else
|
||||
{
|
||||
editor.on( 'mode', function()
|
||||
{
|
||||
if ( editor.mode )
|
||||
{
|
||||
setData();
|
||||
editor.removeListener( 'mode', arguments.callee );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
editor.on( 'beforeGetData', function()
|
||||
{
|
||||
if ( !isHandlingData && editor.mode )
|
||||
{
|
||||
isHandlingData = true;
|
||||
editor.setData( editor.getMode().getData(), null, 1 );
|
||||
isHandlingData = false;
|
||||
}
|
||||
});
|
||||
|
||||
editor.on( 'getSnapshot', function( event )
|
||||
{
|
||||
if ( editor.mode )
|
||||
event.data = editor.getMode().getSnapshotData();
|
||||
});
|
||||
|
||||
editor.on( 'loadSnapshot', function( event )
|
||||
{
|
||||
if ( editor.mode )
|
||||
editor.getMode().loadSnapshotData( event.data );
|
||||
});
|
||||
|
||||
// For the first "mode" call, we'll also fire the "instanceReady"
|
||||
// event.
|
||||
editor.on( 'mode', function( event )
|
||||
{
|
||||
// Do that once only.
|
||||
event.removeListener();
|
||||
|
||||
// Redirect the focus into editor for webkit. (#5713)
|
||||
CKEDITOR.env.webkit && editor.container.on( 'focus', function()
|
||||
{
|
||||
editor.focus();
|
||||
});
|
||||
|
||||
if ( editor.config.startupFocus )
|
||||
editor.focus();
|
||||
|
||||
// Fire instanceReady for both the editor and CKEDITOR, but
|
||||
// defer this until the whole execution has completed
|
||||
// to guarantee the editor is fully responsible.
|
||||
setTimeout( function(){
|
||||
editor.fireOnce( 'instanceReady' );
|
||||
CKEDITOR.fire( 'instanceReady', null, editor );
|
||||
}, 0 );
|
||||
});
|
||||
|
||||
editor.on( 'destroy', function ()
|
||||
{
|
||||
// -> currentMode.unload( holderElement );
|
||||
if ( this.mode )
|
||||
this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) );
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The current editing mode. An editing mode is basically a viewport for
|
||||
* editing or content viewing. By default the possible values for this
|
||||
* property are "wysiwyg" and "source".
|
||||
* @type String
|
||||
* @example
|
||||
* alert( CKEDITOR.instances.editor1.mode ); // "wysiwyg" (e.g.)
|
||||
*/
|
||||
CKEDITOR.editor.prototype.mode = '';
|
||||
|
||||
/**
|
||||
* Registers an editing mode. This function is to be used mainly by plugins.
|
||||
* @param {String} mode The mode name.
|
||||
* @param {Object} modeEditor The mode editor definition.
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.editor.prototype.addMode = function( mode, modeEditor )
|
||||
{
|
||||
modeEditor.name = mode;
|
||||
( this._.modes || ( this._.modes = {} ) )[ mode ] = modeEditor;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the current editing mode in this editor instance.
|
||||
* @param {String} mode A registered mode name.
|
||||
* @example
|
||||
* // Switch to "source" view.
|
||||
* CKEDITOR.instances.editor1.setMode( 'source' );
|
||||
*/
|
||||
CKEDITOR.editor.prototype.setMode = function( mode )
|
||||
{
|
||||
this.fire( 'beforeSetMode', { newMode : mode } );
|
||||
|
||||
var data,
|
||||
holderElement = this.getThemeSpace( 'contents' ),
|
||||
isDirty = this.checkDirty();
|
||||
|
||||
// Unload the previous mode.
|
||||
if ( this.mode )
|
||||
{
|
||||
if ( mode == this.mode )
|
||||
return;
|
||||
|
||||
this._.previousMode = this.mode;
|
||||
|
||||
this.fire( 'beforeModeUnload' );
|
||||
|
||||
var currentMode = this.getMode();
|
||||
data = currentMode.getData();
|
||||
currentMode.unload( holderElement );
|
||||
this.mode = '';
|
||||
}
|
||||
|
||||
holderElement.setHtml( '' );
|
||||
|
||||
// Load required mode.
|
||||
var modeEditor = this.getMode( mode );
|
||||
if ( !modeEditor )
|
||||
throw '[CKEDITOR.editor.setMode] Unknown mode "' + mode + '".';
|
||||
|
||||
if ( !isDirty )
|
||||
{
|
||||
this.on( 'mode', function()
|
||||
{
|
||||
this.resetDirty();
|
||||
this.removeListener( 'mode', arguments.callee );
|
||||
});
|
||||
}
|
||||
|
||||
modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data );
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the current or any of the objects that represent the editing
|
||||
* area modes. The two most common editing modes are "wysiwyg" and "source".
|
||||
* @param {String} [mode] The mode to be retrieved. If not specified, the
|
||||
* current one is returned.
|
||||
*/
|
||||
CKEDITOR.editor.prototype.getMode = function( mode )
|
||||
{
|
||||
return this._.modes && this._.modes[ mode || this.mode ];
|
||||
};
|
||||
|
||||
/**
|
||||
* Moves the selection focus to the editing are space in the editor.
|
||||
*/
|
||||
CKEDITOR.editor.prototype.focus = function()
|
||||
{
|
||||
this.forceNextSelectionCheck();
|
||||
var mode = this.getMode();
|
||||
if ( mode )
|
||||
mode.focus();
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* The mode to load at the editor startup. It depends on the plugins
|
||||
* loaded. By default, the "wysiwyg" and "source" modes are available.
|
||||
* @type String
|
||||
* @default 'wysiwyg'
|
||||
* @example
|
||||
* config.startupMode = 'source';
|
||||
*/
|
||||
CKEDITOR.config.startupMode = 'wysiwyg';
|
||||
|
||||
/**
|
||||
* Sets whether the editor should have the focus when the page loads.
|
||||
* @name CKEDITOR.config.startupFocus
|
||||
* @type Boolean
|
||||
* @default false
|
||||
* @example
|
||||
* config.startupFocus = true;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether to render or not the editing block area in the editor interface.
|
||||
* @type Boolean
|
||||
* @default true
|
||||
* @example
|
||||
* config.editingBlock = false;
|
||||
*/
|
||||
CKEDITOR.config.editingBlock = true;
|
||||
|
||||
/**
|
||||
* Fired when a CKEDITOR instance is created, fully initialized and ready for interaction.
|
||||
* @name CKEDITOR#instanceReady
|
||||
* @event
|
||||
* @param {CKEDITOR.editor} editor The editor instance that has been created.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the CKEDITOR instance is created, fully initialized and ready for interaction.
|
||||
* @name CKEDITOR.editor#instanceReady
|
||||
* @event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired before changing the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#mode
|
||||
* @name CKEDITOR.editor#beforeModeUnload
|
||||
* @event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired before the editor mode is set. See also CKEDITOR.editor#mode and CKEDITOR.editor#beforeModeUnload
|
||||
* @name CKEDITOR.editor#beforeSetMode
|
||||
* @event
|
||||
* @since 3.5.3
|
||||
* @param {String} newMode The name of the mode which is about to be set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired after setting the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#beforeModeUnload
|
||||
* @name CKEDITOR.editor#mode
|
||||
* @event
|
||||
* @param {String} previousMode The previous mode of the editor.
|
||||
*/
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The default editing block plugin, which holds the editing area
|
||||
* and source view.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
// This is a semaphore used to avoid recursive calls between
|
||||
// the following data handling functions.
|
||||
var isHandlingData;
|
||||
|
||||
CKEDITOR.plugins.add( 'editingblock',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
if ( !editor.config.editingBlock )
|
||||
return;
|
||||
|
||||
editor.on( 'themeSpace', function( event )
|
||||
{
|
||||
if ( event.data.space == 'contents' )
|
||||
event.data.html += '<br>';
|
||||
});
|
||||
|
||||
editor.on( 'themeLoaded', function()
|
||||
{
|
||||
editor.fireOnce( 'editingBlockReady' );
|
||||
});
|
||||
|
||||
editor.on( 'uiReady', function()
|
||||
{
|
||||
editor.setMode( editor.config.startupMode );
|
||||
});
|
||||
|
||||
editor.on( 'afterSetData', function()
|
||||
{
|
||||
if ( !isHandlingData )
|
||||
{
|
||||
function setData()
|
||||
{
|
||||
isHandlingData = true;
|
||||
editor.getMode().loadData( editor.getData() );
|
||||
isHandlingData = false;
|
||||
}
|
||||
|
||||
if ( editor.mode )
|
||||
setData();
|
||||
else
|
||||
{
|
||||
editor.on( 'mode', function()
|
||||
{
|
||||
if ( editor.mode )
|
||||
{
|
||||
setData();
|
||||
editor.removeListener( 'mode', arguments.callee );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
editor.on( 'beforeGetData', function()
|
||||
{
|
||||
if ( !isHandlingData && editor.mode )
|
||||
{
|
||||
isHandlingData = true;
|
||||
editor.setData( editor.getMode().getData(), null, 1 );
|
||||
isHandlingData = false;
|
||||
}
|
||||
});
|
||||
|
||||
editor.on( 'getSnapshot', function( event )
|
||||
{
|
||||
if ( editor.mode )
|
||||
event.data = editor.getMode().getSnapshotData();
|
||||
});
|
||||
|
||||
editor.on( 'loadSnapshot', function( event )
|
||||
{
|
||||
if ( editor.mode )
|
||||
editor.getMode().loadSnapshotData( event.data );
|
||||
});
|
||||
|
||||
// For the first "mode" call, we'll also fire the "instanceReady"
|
||||
// event.
|
||||
editor.on( 'mode', function( event )
|
||||
{
|
||||
// Do that once only.
|
||||
event.removeListener();
|
||||
|
||||
// Redirect the focus into editor for webkit. (#5713)
|
||||
CKEDITOR.env.webkit && editor.container.on( 'focus', function()
|
||||
{
|
||||
editor.focus();
|
||||
});
|
||||
|
||||
if ( editor.config.startupFocus )
|
||||
editor.focus();
|
||||
|
||||
// Fire instanceReady for both the editor and CKEDITOR, but
|
||||
// defer this until the whole execution has completed
|
||||
// to guarantee the editor is fully responsible.
|
||||
setTimeout( function(){
|
||||
editor.fireOnce( 'instanceReady' );
|
||||
CKEDITOR.fire( 'instanceReady', null, editor );
|
||||
}, 0 );
|
||||
});
|
||||
|
||||
editor.on( 'destroy', function ()
|
||||
{
|
||||
// -> currentMode.unload( holderElement );
|
||||
if ( this.mode )
|
||||
this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) );
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The current editing mode. An editing mode is basically a viewport for
|
||||
* editing or content viewing. By default the possible values for this
|
||||
* property are "wysiwyg" and "source".
|
||||
* @type String
|
||||
* @example
|
||||
* alert( CKEDITOR.instances.editor1.mode ); // "wysiwyg" (e.g.)
|
||||
*/
|
||||
CKEDITOR.editor.prototype.mode = '';
|
||||
|
||||
/**
|
||||
* Registers an editing mode. This function is to be used mainly by plugins.
|
||||
* @param {String} mode The mode name.
|
||||
* @param {Object} modeEditor The mode editor definition.
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.editor.prototype.addMode = function( mode, modeEditor )
|
||||
{
|
||||
modeEditor.name = mode;
|
||||
( this._.modes || ( this._.modes = {} ) )[ mode ] = modeEditor;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the current editing mode in this editor instance.
|
||||
* @param {String} mode A registered mode name.
|
||||
* @example
|
||||
* // Switch to "source" view.
|
||||
* CKEDITOR.instances.editor1.setMode( 'source' );
|
||||
*/
|
||||
CKEDITOR.editor.prototype.setMode = function( mode )
|
||||
{
|
||||
this.fire( 'beforeSetMode', { newMode : mode } );
|
||||
|
||||
var data,
|
||||
holderElement = this.getThemeSpace( 'contents' ),
|
||||
isDirty = this.checkDirty();
|
||||
|
||||
// Unload the previous mode.
|
||||
if ( this.mode )
|
||||
{
|
||||
if ( mode == this.mode )
|
||||
return;
|
||||
|
||||
this._.previousMode = this.mode;
|
||||
|
||||
this.fire( 'beforeModeUnload' );
|
||||
|
||||
var currentMode = this.getMode();
|
||||
data = currentMode.getData();
|
||||
currentMode.unload( holderElement );
|
||||
this.mode = '';
|
||||
}
|
||||
|
||||
holderElement.setHtml( '' );
|
||||
|
||||
// Load required mode.
|
||||
var modeEditor = this.getMode( mode );
|
||||
if ( !modeEditor )
|
||||
throw '[CKEDITOR.editor.setMode] Unknown mode "' + mode + '".';
|
||||
|
||||
if ( !isDirty )
|
||||
{
|
||||
this.on( 'mode', function()
|
||||
{
|
||||
this.resetDirty();
|
||||
this.removeListener( 'mode', arguments.callee );
|
||||
});
|
||||
}
|
||||
|
||||
modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data );
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the current or any of the objects that represent the editing
|
||||
* area modes. The two most common editing modes are "wysiwyg" and "source".
|
||||
* @param {String} [mode] The mode to be retrieved. If not specified, the
|
||||
* current one is returned.
|
||||
*/
|
||||
CKEDITOR.editor.prototype.getMode = function( mode )
|
||||
{
|
||||
return this._.modes && this._.modes[ mode || this.mode ];
|
||||
};
|
||||
|
||||
/**
|
||||
* Moves the selection focus to the editing are space in the editor.
|
||||
*/
|
||||
CKEDITOR.editor.prototype.focus = function()
|
||||
{
|
||||
this.forceNextSelectionCheck();
|
||||
var mode = this.getMode();
|
||||
if ( mode )
|
||||
mode.focus();
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* The mode to load at the editor startup. It depends on the plugins
|
||||
* loaded. By default, the "wysiwyg" and "source" modes are available.
|
||||
* @type String
|
||||
* @default 'wysiwyg'
|
||||
* @example
|
||||
* config.startupMode = 'source';
|
||||
*/
|
||||
CKEDITOR.config.startupMode = 'wysiwyg';
|
||||
|
||||
/**
|
||||
* Sets whether the editor should have the focus when the page loads.
|
||||
* @name CKEDITOR.config.startupFocus
|
||||
* @type Boolean
|
||||
* @default false
|
||||
* @example
|
||||
* config.startupFocus = true;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether to render or not the editing block area in the editor interface.
|
||||
* @type Boolean
|
||||
* @default true
|
||||
* @example
|
||||
* config.editingBlock = false;
|
||||
*/
|
||||
CKEDITOR.config.editingBlock = true;
|
||||
|
||||
/**
|
||||
* Fired when a CKEDITOR instance is created, fully initialized and ready for interaction.
|
||||
* @name CKEDITOR#instanceReady
|
||||
* @event
|
||||
* @param {CKEDITOR.editor} editor The editor instance that has been created.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the CKEDITOR instance is created, fully initialized and ready for interaction.
|
||||
* @name CKEDITOR.editor#instanceReady
|
||||
* @event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired before changing the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#mode
|
||||
* @name CKEDITOR.editor#beforeModeUnload
|
||||
* @event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired before the editor mode is set. See also CKEDITOR.editor#mode and CKEDITOR.editor#beforeModeUnload
|
||||
* @name CKEDITOR.editor#beforeSetMode
|
||||
* @event
|
||||
* @since 3.5.3
|
||||
* @param {String} newMode The name of the mode which is about to be set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired after setting the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#beforeModeUnload
|
||||
* @name CKEDITOR.editor#mode
|
||||
* @event
|
||||
* @param {String} previousMode The previous mode of the editor.
|
||||
*/
|
||||
|
||||
@@ -1,218 +1,218 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The "elementspath" plugin. It shows all elements in the DOM
|
||||
* parent tree relative to the current selection in the editing area.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var commands =
|
||||
{
|
||||
toolbarFocus :
|
||||
{
|
||||
editorFocus : false,
|
||||
readOnly : 1,
|
||||
exec : function( editor )
|
||||
{
|
||||
var idBase = editor._.elementsPath.idBase;
|
||||
var element = CKEDITOR.document.getById( idBase + '0' );
|
||||
|
||||
// Make the first button focus accessible for IE. (#3417)
|
||||
// Adobe AIR instead need while of delay.
|
||||
element && element.focus( CKEDITOR.env.ie || CKEDITOR.env.air );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var emptyHtml = '<span class="cke_empty"> </span>';
|
||||
|
||||
CKEDITOR.plugins.add( 'elementspath',
|
||||
{
|
||||
requires : [ 'selection' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var spaceId = 'cke_path_' + editor.name;
|
||||
var spaceElement;
|
||||
var getSpaceElement = function()
|
||||
{
|
||||
if ( !spaceElement )
|
||||
spaceElement = CKEDITOR.document.getById( spaceId );
|
||||
return spaceElement;
|
||||
};
|
||||
|
||||
var idBase = 'cke_elementspath_' + CKEDITOR.tools.getNextNumber() + '_';
|
||||
|
||||
editor._.elementsPath = { idBase : idBase, filters : [] };
|
||||
|
||||
editor.on( 'themeSpace', function( event )
|
||||
{
|
||||
if ( event.data.space == 'bottom' )
|
||||
{
|
||||
event.data.html +=
|
||||
'<span id="' + spaceId + '_label" class="cke_voice_label">' + editor.lang.elementsPath.eleLabel + '</span>' +
|
||||
'<div id="' + spaceId + '" class="cke_path" role="group" aria-labelledby="' + spaceId + '_label">' + emptyHtml + '</div>';
|
||||
}
|
||||
});
|
||||
|
||||
function onClick( elementIndex )
|
||||
{
|
||||
editor.focus();
|
||||
var element = editor._.elementsPath.list[ elementIndex ];
|
||||
if ( element.is( 'body' ) )
|
||||
{
|
||||
var range = new CKEDITOR.dom.range( editor.document );
|
||||
range.selectNodeContents( element );
|
||||
range.select();
|
||||
}
|
||||
else
|
||||
editor.getSelection().selectElement( element );
|
||||
}
|
||||
|
||||
var onClickHanlder = CKEDITOR.tools.addFunction( onClick );
|
||||
|
||||
var onKeyDownHandler = CKEDITOR.tools.addFunction( function( elementIndex, ev )
|
||||
{
|
||||
var idBase = editor._.elementsPath.idBase,
|
||||
element;
|
||||
|
||||
ev = new CKEDITOR.dom.event( ev );
|
||||
|
||||
var rtl = editor.lang.dir == 'rtl';
|
||||
switch ( ev.getKeystroke() )
|
||||
{
|
||||
case rtl ? 39 : 37 : // LEFT-ARROW
|
||||
case 9 : // TAB
|
||||
element = CKEDITOR.document.getById( idBase + ( elementIndex + 1 ) );
|
||||
if ( !element )
|
||||
element = CKEDITOR.document.getById( idBase + '0' );
|
||||
element.focus();
|
||||
return false;
|
||||
|
||||
case rtl ? 37 : 39 : // RIGHT-ARROW
|
||||
case CKEDITOR.SHIFT + 9 : // SHIFT + TAB
|
||||
element = CKEDITOR.document.getById( idBase + ( elementIndex - 1 ) );
|
||||
if ( !element )
|
||||
element = CKEDITOR.document.getById( idBase + ( editor._.elementsPath.list.length - 1 ) );
|
||||
element.focus();
|
||||
return false;
|
||||
|
||||
case 27 : // ESC
|
||||
editor.focus();
|
||||
return false;
|
||||
|
||||
case 13 : // ENTER // Opera
|
||||
case 32 : // SPACE
|
||||
onClick( elementIndex );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var env = CKEDITOR.env,
|
||||
selection = ev.data.selection,
|
||||
element = selection.getStartElement(),
|
||||
html = [],
|
||||
editor = ev.editor,
|
||||
elementsList = editor._.elementsPath.list = [],
|
||||
filters = editor._.elementsPath.filters;
|
||||
|
||||
while ( element )
|
||||
{
|
||||
var ignore = 0,
|
||||
name;
|
||||
|
||||
if ( element.data( 'cke-display-name' ) )
|
||||
name = element.data( 'cke-display-name' );
|
||||
else if ( element.data( 'cke-real-element-type' ) )
|
||||
name = element.data( 'cke-real-element-type' );
|
||||
else
|
||||
name = element.getName();
|
||||
|
||||
for ( var i = 0; i < filters.length; i++ )
|
||||
{
|
||||
var ret = filters[ i ]( element, name );
|
||||
if ( ret === false )
|
||||
{
|
||||
ignore = 1;
|
||||
break;
|
||||
}
|
||||
name = ret || name;
|
||||
}
|
||||
|
||||
if ( !ignore )
|
||||
{
|
||||
var index = elementsList.push( element ) - 1;
|
||||
|
||||
// Use this variable to add conditional stuff to the
|
||||
// HTML (because we are doing it in reverse order... unshift).
|
||||
var extra = '';
|
||||
|
||||
// Some browsers don't cancel key events in the keydown but in the
|
||||
// keypress.
|
||||
// TODO: Check if really needed for Gecko+Mac.
|
||||
if ( env.opera || ( env.gecko && env.mac ) )
|
||||
extra += ' onkeypress="return false;"';
|
||||
|
||||
// With Firefox, we need to force the button to redraw, otherwise it
|
||||
// will remain in the focus state.
|
||||
if ( env.gecko )
|
||||
extra += ' onblur="this.style.cssText = this.style.cssText;"';
|
||||
|
||||
var label = editor.lang.elementsPath.eleTitle.replace( /%1/, name );
|
||||
html.unshift(
|
||||
'<a' +
|
||||
' id="', idBase, index, '"' +
|
||||
' href="javascript:void(\'', name, '\')"' +
|
||||
' tabindex="-1"' +
|
||||
' title="', label, '"' +
|
||||
( ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) ?
|
||||
' onfocus="event.preventBubble();"' : '' ) +
|
||||
' hidefocus="true" ' +
|
||||
' onkeydown="return CKEDITOR.tools.callFunction(', onKeyDownHandler, ',', index, ', event );"' +
|
||||
extra ,
|
||||
' onclick="CKEDITOR.tools.callFunction('+ onClickHanlder, ',', index, '); return false;"',
|
||||
' role="button" aria-labelledby="' + idBase + index + '_label">',
|
||||
name,
|
||||
'<span id="', idBase, index, '_label" class="cke_label">' + label + '</span>',
|
||||
'</a>' );
|
||||
|
||||
}
|
||||
|
||||
if ( name == 'body' )
|
||||
break;
|
||||
|
||||
element = element.getParent();
|
||||
}
|
||||
|
||||
var space = getSpaceElement();
|
||||
space.setHtml( html.join('') + emptyHtml );
|
||||
editor.fire( 'elementsPathUpdate', { space : space } );
|
||||
});
|
||||
|
||||
function empty()
|
||||
{
|
||||
spaceElement && spaceElement.setHtml( emptyHtml );
|
||||
delete editor._.elementsPath.list;
|
||||
}
|
||||
|
||||
editor.on( 'readOnly', empty );
|
||||
editor.on( 'contentDomUnload', empty );
|
||||
|
||||
editor.addCommand( 'elementsPathFocus', commands.toolbarFocus );
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Fired when the contents of the elementsPath are changed
|
||||
* @name CKEDITOR.editor#elementsPathUpdate
|
||||
* @event
|
||||
* @param {Object} eventData.space The elementsPath container
|
||||
*/
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview The "elementspath" plugin. It shows all elements in the DOM
|
||||
* parent tree relative to the current selection in the editing area.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var commands =
|
||||
{
|
||||
toolbarFocus :
|
||||
{
|
||||
editorFocus : false,
|
||||
readOnly : 1,
|
||||
exec : function( editor )
|
||||
{
|
||||
var idBase = editor._.elementsPath.idBase;
|
||||
var element = CKEDITOR.document.getById( idBase + '0' );
|
||||
|
||||
// Make the first button focus accessible for IE. (#3417)
|
||||
// Adobe AIR instead need while of delay.
|
||||
element && element.focus( CKEDITOR.env.ie || CKEDITOR.env.air );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var emptyHtml = '<span class="cke_empty"> </span>';
|
||||
|
||||
CKEDITOR.plugins.add( 'elementspath',
|
||||
{
|
||||
requires : [ 'selection' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var spaceId = 'cke_path_' + editor.name;
|
||||
var spaceElement;
|
||||
var getSpaceElement = function()
|
||||
{
|
||||
if ( !spaceElement )
|
||||
spaceElement = CKEDITOR.document.getById( spaceId );
|
||||
return spaceElement;
|
||||
};
|
||||
|
||||
var idBase = 'cke_elementspath_' + CKEDITOR.tools.getNextNumber() + '_';
|
||||
|
||||
editor._.elementsPath = { idBase : idBase, filters : [] };
|
||||
|
||||
editor.on( 'themeSpace', function( event )
|
||||
{
|
||||
if ( event.data.space == 'bottom' )
|
||||
{
|
||||
event.data.html +=
|
||||
'<span id="' + spaceId + '_label" class="cke_voice_label">' + editor.lang.elementsPath.eleLabel + '</span>' +
|
||||
'<div id="' + spaceId + '" class="cke_path" role="group" aria-labelledby="' + spaceId + '_label">' + emptyHtml + '</div>';
|
||||
}
|
||||
});
|
||||
|
||||
function onClick( elementIndex )
|
||||
{
|
||||
editor.focus();
|
||||
var element = editor._.elementsPath.list[ elementIndex ];
|
||||
if ( element.is( 'body' ) )
|
||||
{
|
||||
var range = new CKEDITOR.dom.range( editor.document );
|
||||
range.selectNodeContents( element );
|
||||
range.select();
|
||||
}
|
||||
else
|
||||
editor.getSelection().selectElement( element );
|
||||
}
|
||||
|
||||
var onClickHanlder = CKEDITOR.tools.addFunction( onClick );
|
||||
|
||||
var onKeyDownHandler = CKEDITOR.tools.addFunction( function( elementIndex, ev )
|
||||
{
|
||||
var idBase = editor._.elementsPath.idBase,
|
||||
element;
|
||||
|
||||
ev = new CKEDITOR.dom.event( ev );
|
||||
|
||||
var rtl = editor.lang.dir == 'rtl';
|
||||
switch ( ev.getKeystroke() )
|
||||
{
|
||||
case rtl ? 39 : 37 : // LEFT-ARROW
|
||||
case 9 : // TAB
|
||||
element = CKEDITOR.document.getById( idBase + ( elementIndex + 1 ) );
|
||||
if ( !element )
|
||||
element = CKEDITOR.document.getById( idBase + '0' );
|
||||
element.focus();
|
||||
return false;
|
||||
|
||||
case rtl ? 37 : 39 : // RIGHT-ARROW
|
||||
case CKEDITOR.SHIFT + 9 : // SHIFT + TAB
|
||||
element = CKEDITOR.document.getById( idBase + ( elementIndex - 1 ) );
|
||||
if ( !element )
|
||||
element = CKEDITOR.document.getById( idBase + ( editor._.elementsPath.list.length - 1 ) );
|
||||
element.focus();
|
||||
return false;
|
||||
|
||||
case 27 : // ESC
|
||||
editor.focus();
|
||||
return false;
|
||||
|
||||
case 13 : // ENTER // Opera
|
||||
case 32 : // SPACE
|
||||
onClick( elementIndex );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var env = CKEDITOR.env,
|
||||
selection = ev.data.selection,
|
||||
element = selection.getStartElement(),
|
||||
html = [],
|
||||
editor = ev.editor,
|
||||
elementsList = editor._.elementsPath.list = [],
|
||||
filters = editor._.elementsPath.filters;
|
||||
|
||||
while ( element )
|
||||
{
|
||||
var ignore = 0,
|
||||
name;
|
||||
|
||||
if ( element.data( 'cke-display-name' ) )
|
||||
name = element.data( 'cke-display-name' );
|
||||
else if ( element.data( 'cke-real-element-type' ) )
|
||||
name = element.data( 'cke-real-element-type' );
|
||||
else
|
||||
name = element.getName();
|
||||
|
||||
for ( var i = 0; i < filters.length; i++ )
|
||||
{
|
||||
var ret = filters[ i ]( element, name );
|
||||
if ( ret === false )
|
||||
{
|
||||
ignore = 1;
|
||||
break;
|
||||
}
|
||||
name = ret || name;
|
||||
}
|
||||
|
||||
if ( !ignore )
|
||||
{
|
||||
var index = elementsList.push( element ) - 1;
|
||||
|
||||
// Use this variable to add conditional stuff to the
|
||||
// HTML (because we are doing it in reverse order... unshift).
|
||||
var extra = '';
|
||||
|
||||
// Some browsers don't cancel key events in the keydown but in the
|
||||
// keypress.
|
||||
// TODO: Check if really needed for Gecko+Mac.
|
||||
if ( env.opera || ( env.gecko && env.mac ) )
|
||||
extra += ' onkeypress="return false;"';
|
||||
|
||||
// With Firefox, we need to force the button to redraw, otherwise it
|
||||
// will remain in the focus state.
|
||||
if ( env.gecko )
|
||||
extra += ' onblur="this.style.cssText = this.style.cssText;"';
|
||||
|
||||
var label = editor.lang.elementsPath.eleTitle.replace( /%1/, name );
|
||||
html.unshift(
|
||||
'<a' +
|
||||
' id="', idBase, index, '"' +
|
||||
' href="javascript:void(\'', name, '\')"' +
|
||||
' tabindex="-1"' +
|
||||
' title="', label, '"' +
|
||||
( ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) ?
|
||||
' onfocus="event.preventBubble();"' : '' ) +
|
||||
' hidefocus="true" ' +
|
||||
' onkeydown="return CKEDITOR.tools.callFunction(', onKeyDownHandler, ',', index, ', event );"' +
|
||||
extra ,
|
||||
' onclick="CKEDITOR.tools.callFunction('+ onClickHanlder, ',', index, '); return false;"',
|
||||
' role="button" aria-labelledby="' + idBase + index + '_label">',
|
||||
name,
|
||||
'<span id="', idBase, index, '_label" class="cke_label">' + label + '</span>',
|
||||
'</a>' );
|
||||
|
||||
}
|
||||
|
||||
if ( name == 'body' )
|
||||
break;
|
||||
|
||||
element = element.getParent();
|
||||
}
|
||||
|
||||
var space = getSpaceElement();
|
||||
space.setHtml( html.join('') + emptyHtml );
|
||||
editor.fire( 'elementsPathUpdate', { space : space } );
|
||||
});
|
||||
|
||||
function empty()
|
||||
{
|
||||
spaceElement && spaceElement.setHtml( emptyHtml );
|
||||
delete editor._.elementsPath.list;
|
||||
}
|
||||
|
||||
editor.on( 'readOnly', empty );
|
||||
editor.on( 'contentDomUnload', empty );
|
||||
|
||||
editor.addCommand( 'elementsPathFocus', commands.toolbarFocus );
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Fired when the contents of the elementsPath are changed
|
||||
* @name CKEDITOR.editor#elementsPathUpdate
|
||||
* @event
|
||||
* @param {Object} eventData.space The elementsPath container
|
||||
*/
|
||||
|
||||
@@ -1,433 +1,433 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'enterkey',
|
||||
{
|
||||
requires : [ 'keystrokes', 'indent' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'enter', {
|
||||
modes : { wysiwyg:1 },
|
||||
editorFocus : false,
|
||||
exec : function( editor ){ enter( editor ); }
|
||||
});
|
||||
|
||||
editor.addCommand( 'shiftEnter', {
|
||||
modes : { wysiwyg:1 },
|
||||
editorFocus : false,
|
||||
exec : function( editor ){ shiftEnter( editor ); }
|
||||
});
|
||||
|
||||
var keystrokes = editor.keystrokeHandler.keystrokes;
|
||||
keystrokes[ 13 ] = 'enter';
|
||||
keystrokes[ CKEDITOR.SHIFT + 13 ] = 'shiftEnter';
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.plugins.enterkey =
|
||||
{
|
||||
enterBlock : function( editor, mode, range, forceMode )
|
||||
{
|
||||
// Get the range for the current selection.
|
||||
range = range || getRange( editor );
|
||||
|
||||
// We may not have valid ranges to work on, like when inside a
|
||||
// contenteditable=false element.
|
||||
if ( !range )
|
||||
return;
|
||||
|
||||
var doc = range.document;
|
||||
|
||||
var atBlockStart = range.checkStartOfBlock(),
|
||||
atBlockEnd = range.checkEndOfBlock(),
|
||||
path = new CKEDITOR.dom.elementPath( range.startContainer ),
|
||||
block = path.block;
|
||||
|
||||
if ( atBlockStart && atBlockEnd )
|
||||
{
|
||||
// Exit the list when we're inside an empty list item block. (#5376)
|
||||
if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) )
|
||||
{
|
||||
editor.execCommand( 'outdent' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( block && block.getParent().is( 'blockquote' ) )
|
||||
{
|
||||
block.breakParent( block.getParent() );
|
||||
|
||||
// If we were at the start of <blockquote>, there will be an empty element before it now.
|
||||
if ( !block.getPrevious().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
|
||||
block.getPrevious().remove();
|
||||
|
||||
// If we were at the end of <blockquote>, there will be an empty element after it now.
|
||||
if ( !block.getNext().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
|
||||
block.getNext().remove();
|
||||
|
||||
range.moveToElementEditStart( block );
|
||||
range.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Don't split <pre> if we're in the middle of it, act as shift enter key.
|
||||
else if ( block && block.is( 'pre' ) )
|
||||
{
|
||||
if ( !atBlockEnd )
|
||||
{
|
||||
enterBr( editor, mode, range, forceMode );
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Don't split caption blocks. (#7944)
|
||||
else if ( block && CKEDITOR.dtd.$captionBlock[ block.getName() ] )
|
||||
{
|
||||
enterBr( editor, mode, range, forceMode );
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine the block element to be used.
|
||||
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
|
||||
|
||||
// Split the range.
|
||||
var splitInfo = range.splitBlock( blockTag );
|
||||
|
||||
if ( !splitInfo )
|
||||
return;
|
||||
|
||||
// Get the current blocks.
|
||||
var previousBlock = splitInfo.previousBlock,
|
||||
nextBlock = splitInfo.nextBlock;
|
||||
|
||||
var isStartOfBlock = splitInfo.wasStartOfBlock,
|
||||
isEndOfBlock = splitInfo.wasEndOfBlock;
|
||||
|
||||
var node;
|
||||
|
||||
// If this is a block under a list item, split it as well. (#1647)
|
||||
if ( nextBlock )
|
||||
{
|
||||
node = nextBlock.getParent();
|
||||
if ( node.is( 'li' ) )
|
||||
{
|
||||
nextBlock.breakParent( node );
|
||||
nextBlock.move( nextBlock.getNext(), 1 );
|
||||
}
|
||||
}
|
||||
else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) )
|
||||
{
|
||||
previousBlock.breakParent( node );
|
||||
node = previousBlock.getNext();
|
||||
range.moveToElementEditStart( node );
|
||||
previousBlock.move( previousBlock.getPrevious() );
|
||||
}
|
||||
|
||||
// If we have both the previous and next blocks, it means that the
|
||||
// boundaries were on separated blocks, or none of them where on the
|
||||
// block limits (start/end).
|
||||
if ( !isStartOfBlock && !isEndOfBlock )
|
||||
{
|
||||
// If the next block is an <li> with another list tree as the first
|
||||
// child, we'll need to append a filler (<br>/NBSP) or the list item
|
||||
// wouldn't be editable. (#1420)
|
||||
if ( nextBlock.is( 'li' )
|
||||
&& ( node = nextBlock.getFirst( CKEDITOR.dom.walker.invisible( true ) ) )
|
||||
&& node.is && node.is( 'ul', 'ol' ) )
|
||||
( CKEDITOR.env.ie ? doc.createText( '\xa0' ) : doc.createElement( 'br' ) ).insertBefore( node );
|
||||
|
||||
// Move the selection to the end block.
|
||||
if ( nextBlock )
|
||||
range.moveToElementEditStart( nextBlock );
|
||||
}
|
||||
else
|
||||
{
|
||||
var newBlock,
|
||||
newBlockDir;
|
||||
|
||||
if ( previousBlock )
|
||||
{
|
||||
// Do not enter this block if it's a header tag, or we are in
|
||||
// a Shift+Enter (#77). Create a new block element instead
|
||||
// (later in the code).
|
||||
if ( previousBlock.is( 'li' ) ||
|
||||
! ( headerTagRegex.test( previousBlock.getName() ) || previousBlock.is( 'pre' ) ) )
|
||||
{
|
||||
// Otherwise, duplicate the previous block.
|
||||
newBlock = previousBlock.clone();
|
||||
}
|
||||
}
|
||||
else if ( nextBlock )
|
||||
newBlock = nextBlock.clone();
|
||||
|
||||
if ( !newBlock )
|
||||
{
|
||||
// We have already created a new list item. (#6849)
|
||||
if ( node && node.is( 'li' ) )
|
||||
newBlock = node;
|
||||
else
|
||||
{
|
||||
newBlock = doc.createElement( blockTag );
|
||||
if ( previousBlock && ( newBlockDir = previousBlock.getDirection() ) )
|
||||
newBlock.setAttribute( 'dir', newBlockDir );
|
||||
}
|
||||
}
|
||||
// Force the enter block unless we're talking of a list item.
|
||||
else if ( forceMode && !newBlock.is( 'li' ) )
|
||||
newBlock.renameNode( blockTag );
|
||||
|
||||
// Recreate the inline elements tree, which was available
|
||||
// before hitting enter, so the same styles will be available in
|
||||
// the new block.
|
||||
var elementPath = splitInfo.elementPath;
|
||||
if ( elementPath )
|
||||
{
|
||||
for ( var i = 0, len = elementPath.elements.length ; i < len ; i++ )
|
||||
{
|
||||
var element = elementPath.elements[ i ];
|
||||
|
||||
if ( element.equals( elementPath.block ) || element.equals( elementPath.blockLimit ) )
|
||||
break;
|
||||
|
||||
if ( CKEDITOR.dtd.$removeEmpty[ element.getName() ] )
|
||||
{
|
||||
element = element.clone();
|
||||
newBlock.moveChildren( element );
|
||||
newBlock.append( element );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !CKEDITOR.env.ie )
|
||||
newBlock.appendBogus();
|
||||
|
||||
if ( !newBlock.getParent() )
|
||||
range.insertNode( newBlock );
|
||||
|
||||
// list item start number should not be duplicated (#7330), but we need
|
||||
// to remove the attribute after it's onto the DOM tree because of old IEs (#7581).
|
||||
newBlock.is( 'li' ) && newBlock.removeAttribute( 'value' );
|
||||
|
||||
// This is tricky, but to make the new block visible correctly
|
||||
// we must select it.
|
||||
// The previousBlock check has been included because it may be
|
||||
// empty if we have fixed a block-less space (like ENTER into an
|
||||
// empty table cell).
|
||||
if ( CKEDITOR.env.ie && isStartOfBlock && ( !isEndOfBlock || !previousBlock.getChildCount() ) )
|
||||
{
|
||||
// Move the selection to the new block.
|
||||
range.moveToElementEditStart( isEndOfBlock ? previousBlock : newBlock );
|
||||
range.select();
|
||||
}
|
||||
|
||||
// Move the selection to the new block.
|
||||
range.moveToElementEditStart( isStartOfBlock && !isEndOfBlock ? nextBlock : newBlock );
|
||||
}
|
||||
|
||||
if ( !CKEDITOR.env.ie )
|
||||
{
|
||||
if ( nextBlock )
|
||||
{
|
||||
// If we have split the block, adds a temporary span at the
|
||||
// range position and scroll relatively to it.
|
||||
var tmpNode = doc.createElement( 'span' );
|
||||
|
||||
// We need some content for Safari.
|
||||
tmpNode.setHtml( ' ' );
|
||||
|
||||
range.insertNode( tmpNode );
|
||||
tmpNode.scrollIntoView();
|
||||
range.deleteContents();
|
||||
}
|
||||
else
|
||||
{
|
||||
// We may use the above scroll logic for the new block case
|
||||
// too, but it gives some weird result with Opera.
|
||||
newBlock.scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
range.select();
|
||||
},
|
||||
|
||||
enterBr : function( editor, mode, range, forceMode )
|
||||
{
|
||||
// Get the range for the current selection.
|
||||
range = range || getRange( editor );
|
||||
|
||||
// We may not have valid ranges to work on, like when inside a
|
||||
// contenteditable=false element.
|
||||
if ( !range )
|
||||
return;
|
||||
|
||||
var doc = range.document;
|
||||
|
||||
// Determine the block element to be used.
|
||||
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
|
||||
|
||||
var isEndOfBlock = range.checkEndOfBlock();
|
||||
|
||||
var elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() );
|
||||
|
||||
var startBlock = elementPath.block,
|
||||
startBlockTag = startBlock && elementPath.block.getName();
|
||||
|
||||
var isPre = false;
|
||||
|
||||
if ( !forceMode && startBlockTag == 'li' )
|
||||
{
|
||||
enterBlock( editor, mode, range, forceMode );
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are at the end of a header block.
|
||||
if ( !forceMode && isEndOfBlock && headerTagRegex.test( startBlockTag ) )
|
||||
{
|
||||
var newBlock,
|
||||
newBlockDir;
|
||||
|
||||
if ( ( newBlockDir = startBlock.getDirection() ) )
|
||||
{
|
||||
newBlock = doc.createElement( 'div' );
|
||||
newBlock.setAttribute( 'dir', newBlockDir );
|
||||
newBlock.insertAfter( startBlock );
|
||||
range.setStart( newBlock, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Insert a <br> after the current paragraph.
|
||||
doc.createElement( 'br' ).insertAfter( startBlock );
|
||||
|
||||
// A text node is required by Gecko only to make the cursor blink.
|
||||
if ( CKEDITOR.env.gecko )
|
||||
doc.createText( '' ).insertAfter( startBlock );
|
||||
|
||||
// IE has different behaviors regarding position.
|
||||
range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var lineBreak;
|
||||
|
||||
isPre = ( startBlockTag == 'pre' );
|
||||
|
||||
// Gecko prefers <br> as line-break inside <pre> (#4711).
|
||||
if ( isPre && !CKEDITOR.env.gecko )
|
||||
lineBreak = doc.createText( CKEDITOR.env.ie ? '\r' : '\n' );
|
||||
else
|
||||
lineBreak = doc.createElement( 'br' );
|
||||
|
||||
range.deleteContents();
|
||||
range.insertNode( lineBreak );
|
||||
|
||||
// IE has different behavior regarding position.
|
||||
if ( CKEDITOR.env.ie )
|
||||
range.setStartAt( lineBreak, CKEDITOR.POSITION_AFTER_END );
|
||||
else
|
||||
{
|
||||
// A text node is required by Gecko only to make the cursor blink.
|
||||
// We need some text inside of it, so the bogus <br> is properly
|
||||
// created.
|
||||
doc.createText( '\ufeff' ).insertAfter( lineBreak );
|
||||
|
||||
// If we are at the end of a block, we must be sure the bogus node is available in that block.
|
||||
if ( isEndOfBlock )
|
||||
lineBreak.getParent().appendBogus();
|
||||
|
||||
// Now we can remove the text node contents, so the caret doesn't
|
||||
// stop on it.
|
||||
lineBreak.getNext().$.nodeValue = '';
|
||||
|
||||
range.setStartAt( lineBreak.getNext(), CKEDITOR.POSITION_AFTER_START );
|
||||
|
||||
// Scroll into view, for non IE.
|
||||
var dummy = null;
|
||||
|
||||
// BR is not positioned in Opera and Webkit.
|
||||
if ( !CKEDITOR.env.gecko )
|
||||
{
|
||||
dummy = doc.createElement( 'span' );
|
||||
// We need have some contents for Webkit to position it
|
||||
// under parent node. ( #3681)
|
||||
dummy.setHtml(' ');
|
||||
}
|
||||
else
|
||||
dummy = doc.createElement( 'br' );
|
||||
|
||||
dummy.insertBefore( lineBreak.getNext() );
|
||||
dummy.scrollIntoView();
|
||||
dummy.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// This collapse guarantees the cursor will be blinking.
|
||||
range.collapse( true );
|
||||
|
||||
range.select( isPre );
|
||||
}
|
||||
};
|
||||
|
||||
var plugin = CKEDITOR.plugins.enterkey,
|
||||
enterBr = plugin.enterBr,
|
||||
enterBlock = plugin.enterBlock,
|
||||
headerTagRegex = /^h[1-6]$/;
|
||||
|
||||
function shiftEnter( editor )
|
||||
{
|
||||
// Only effective within document.
|
||||
if ( editor.mode != 'wysiwyg' )
|
||||
return false;
|
||||
|
||||
// On SHIFT+ENTER:
|
||||
// 1. We want to enforce the mode to be respected, instead
|
||||
// of cloning the current block. (#77)
|
||||
return enter( editor, editor.config.shiftEnterMode, 1 );
|
||||
}
|
||||
|
||||
function enter( editor, mode, forceMode )
|
||||
{
|
||||
forceMode = editor.config.forceEnterMode || forceMode;
|
||||
|
||||
// Only effective within document.
|
||||
if ( editor.mode != 'wysiwyg' )
|
||||
return false;
|
||||
|
||||
if ( !mode )
|
||||
mode = editor.config.enterMode;
|
||||
|
||||
// Use setTimout so the keys get cancelled immediatelly.
|
||||
setTimeout( function()
|
||||
{
|
||||
editor.fire( 'saveSnapshot' ); // Save undo step.
|
||||
|
||||
if ( mode == CKEDITOR.ENTER_BR )
|
||||
enterBr( editor, mode, null, forceMode );
|
||||
else
|
||||
enterBlock( editor, mode, null, forceMode );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
}, 0 );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function getRange( editor )
|
||||
{
|
||||
// Get the selection ranges.
|
||||
var ranges = editor.getSelection().getRanges( true );
|
||||
|
||||
// Delete the contents of all ranges except the first one.
|
||||
for ( var i = ranges.length - 1 ; i > 0 ; i-- )
|
||||
{
|
||||
ranges[ i ].deleteContents();
|
||||
}
|
||||
|
||||
// Return the first range.
|
||||
return ranges[ 0 ];
|
||||
}
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'enterkey',
|
||||
{
|
||||
requires : [ 'keystrokes', 'indent' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'enter', {
|
||||
modes : { wysiwyg:1 },
|
||||
editorFocus : false,
|
||||
exec : function( editor ){ enter( editor ); }
|
||||
});
|
||||
|
||||
editor.addCommand( 'shiftEnter', {
|
||||
modes : { wysiwyg:1 },
|
||||
editorFocus : false,
|
||||
exec : function( editor ){ shiftEnter( editor ); }
|
||||
});
|
||||
|
||||
var keystrokes = editor.keystrokeHandler.keystrokes;
|
||||
keystrokes[ 13 ] = 'enter';
|
||||
keystrokes[ CKEDITOR.SHIFT + 13 ] = 'shiftEnter';
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.plugins.enterkey =
|
||||
{
|
||||
enterBlock : function( editor, mode, range, forceMode )
|
||||
{
|
||||
// Get the range for the current selection.
|
||||
range = range || getRange( editor );
|
||||
|
||||
// We may not have valid ranges to work on, like when inside a
|
||||
// contenteditable=false element.
|
||||
if ( !range )
|
||||
return;
|
||||
|
||||
var doc = range.document;
|
||||
|
||||
var atBlockStart = range.checkStartOfBlock(),
|
||||
atBlockEnd = range.checkEndOfBlock(),
|
||||
path = new CKEDITOR.dom.elementPath( range.startContainer ),
|
||||
block = path.block;
|
||||
|
||||
if ( atBlockStart && atBlockEnd )
|
||||
{
|
||||
// Exit the list when we're inside an empty list item block. (#5376)
|
||||
if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) )
|
||||
{
|
||||
editor.execCommand( 'outdent' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( block && block.getParent().is( 'blockquote' ) )
|
||||
{
|
||||
block.breakParent( block.getParent() );
|
||||
|
||||
// If we were at the start of <blockquote>, there will be an empty element before it now.
|
||||
if ( !block.getPrevious().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
|
||||
block.getPrevious().remove();
|
||||
|
||||
// If we were at the end of <blockquote>, there will be an empty element after it now.
|
||||
if ( !block.getNext().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
|
||||
block.getNext().remove();
|
||||
|
||||
range.moveToElementEditStart( block );
|
||||
range.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Don't split <pre> if we're in the middle of it, act as shift enter key.
|
||||
else if ( block && block.is( 'pre' ) )
|
||||
{
|
||||
if ( !atBlockEnd )
|
||||
{
|
||||
enterBr( editor, mode, range, forceMode );
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Don't split caption blocks. (#7944)
|
||||
else if ( block && CKEDITOR.dtd.$captionBlock[ block.getName() ] )
|
||||
{
|
||||
enterBr( editor, mode, range, forceMode );
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine the block element to be used.
|
||||
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
|
||||
|
||||
// Split the range.
|
||||
var splitInfo = range.splitBlock( blockTag );
|
||||
|
||||
if ( !splitInfo )
|
||||
return;
|
||||
|
||||
// Get the current blocks.
|
||||
var previousBlock = splitInfo.previousBlock,
|
||||
nextBlock = splitInfo.nextBlock;
|
||||
|
||||
var isStartOfBlock = splitInfo.wasStartOfBlock,
|
||||
isEndOfBlock = splitInfo.wasEndOfBlock;
|
||||
|
||||
var node;
|
||||
|
||||
// If this is a block under a list item, split it as well. (#1647)
|
||||
if ( nextBlock )
|
||||
{
|
||||
node = nextBlock.getParent();
|
||||
if ( node.is( 'li' ) )
|
||||
{
|
||||
nextBlock.breakParent( node );
|
||||
nextBlock.move( nextBlock.getNext(), 1 );
|
||||
}
|
||||
}
|
||||
else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) )
|
||||
{
|
||||
previousBlock.breakParent( node );
|
||||
node = previousBlock.getNext();
|
||||
range.moveToElementEditStart( node );
|
||||
previousBlock.move( previousBlock.getPrevious() );
|
||||
}
|
||||
|
||||
// If we have both the previous and next blocks, it means that the
|
||||
// boundaries were on separated blocks, or none of them where on the
|
||||
// block limits (start/end).
|
||||
if ( !isStartOfBlock && !isEndOfBlock )
|
||||
{
|
||||
// If the next block is an <li> with another list tree as the first
|
||||
// child, we'll need to append a filler (<br>/NBSP) or the list item
|
||||
// wouldn't be editable. (#1420)
|
||||
if ( nextBlock.is( 'li' )
|
||||
&& ( node = nextBlock.getFirst( CKEDITOR.dom.walker.invisible( true ) ) )
|
||||
&& node.is && node.is( 'ul', 'ol' ) )
|
||||
( CKEDITOR.env.ie ? doc.createText( '\xa0' ) : doc.createElement( 'br' ) ).insertBefore( node );
|
||||
|
||||
// Move the selection to the end block.
|
||||
if ( nextBlock )
|
||||
range.moveToElementEditStart( nextBlock );
|
||||
}
|
||||
else
|
||||
{
|
||||
var newBlock,
|
||||
newBlockDir;
|
||||
|
||||
if ( previousBlock )
|
||||
{
|
||||
// Do not enter this block if it's a header tag, or we are in
|
||||
// a Shift+Enter (#77). Create a new block element instead
|
||||
// (later in the code).
|
||||
if ( previousBlock.is( 'li' ) ||
|
||||
! ( headerTagRegex.test( previousBlock.getName() ) || previousBlock.is( 'pre' ) ) )
|
||||
{
|
||||
// Otherwise, duplicate the previous block.
|
||||
newBlock = previousBlock.clone();
|
||||
}
|
||||
}
|
||||
else if ( nextBlock )
|
||||
newBlock = nextBlock.clone();
|
||||
|
||||
if ( !newBlock )
|
||||
{
|
||||
// We have already created a new list item. (#6849)
|
||||
if ( node && node.is( 'li' ) )
|
||||
newBlock = node;
|
||||
else
|
||||
{
|
||||
newBlock = doc.createElement( blockTag );
|
||||
if ( previousBlock && ( newBlockDir = previousBlock.getDirection() ) )
|
||||
newBlock.setAttribute( 'dir', newBlockDir );
|
||||
}
|
||||
}
|
||||
// Force the enter block unless we're talking of a list item.
|
||||
else if ( forceMode && !newBlock.is( 'li' ) )
|
||||
newBlock.renameNode( blockTag );
|
||||
|
||||
// Recreate the inline elements tree, which was available
|
||||
// before hitting enter, so the same styles will be available in
|
||||
// the new block.
|
||||
var elementPath = splitInfo.elementPath;
|
||||
if ( elementPath )
|
||||
{
|
||||
for ( var i = 0, len = elementPath.elements.length ; i < len ; i++ )
|
||||
{
|
||||
var element = elementPath.elements[ i ];
|
||||
|
||||
if ( element.equals( elementPath.block ) || element.equals( elementPath.blockLimit ) )
|
||||
break;
|
||||
|
||||
if ( CKEDITOR.dtd.$removeEmpty[ element.getName() ] )
|
||||
{
|
||||
element = element.clone();
|
||||
newBlock.moveChildren( element );
|
||||
newBlock.append( element );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !CKEDITOR.env.ie )
|
||||
newBlock.appendBogus();
|
||||
|
||||
if ( !newBlock.getParent() )
|
||||
range.insertNode( newBlock );
|
||||
|
||||
// list item start number should not be duplicated (#7330), but we need
|
||||
// to remove the attribute after it's onto the DOM tree because of old IEs (#7581).
|
||||
newBlock.is( 'li' ) && newBlock.removeAttribute( 'value' );
|
||||
|
||||
// This is tricky, but to make the new block visible correctly
|
||||
// we must select it.
|
||||
// The previousBlock check has been included because it may be
|
||||
// empty if we have fixed a block-less space (like ENTER into an
|
||||
// empty table cell).
|
||||
if ( CKEDITOR.env.ie && isStartOfBlock && ( !isEndOfBlock || !previousBlock.getChildCount() ) )
|
||||
{
|
||||
// Move the selection to the new block.
|
||||
range.moveToElementEditStart( isEndOfBlock ? previousBlock : newBlock );
|
||||
range.select();
|
||||
}
|
||||
|
||||
// Move the selection to the new block.
|
||||
range.moveToElementEditStart( isStartOfBlock && !isEndOfBlock ? nextBlock : newBlock );
|
||||
}
|
||||
|
||||
if ( !CKEDITOR.env.ie )
|
||||
{
|
||||
if ( nextBlock )
|
||||
{
|
||||
// If we have split the block, adds a temporary span at the
|
||||
// range position and scroll relatively to it.
|
||||
var tmpNode = doc.createElement( 'span' );
|
||||
|
||||
// We need some content for Safari.
|
||||
tmpNode.setHtml( ' ' );
|
||||
|
||||
range.insertNode( tmpNode );
|
||||
tmpNode.scrollIntoView();
|
||||
range.deleteContents();
|
||||
}
|
||||
else
|
||||
{
|
||||
// We may use the above scroll logic for the new block case
|
||||
// too, but it gives some weird result with Opera.
|
||||
newBlock.scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
range.select();
|
||||
},
|
||||
|
||||
enterBr : function( editor, mode, range, forceMode )
|
||||
{
|
||||
// Get the range for the current selection.
|
||||
range = range || getRange( editor );
|
||||
|
||||
// We may not have valid ranges to work on, like when inside a
|
||||
// contenteditable=false element.
|
||||
if ( !range )
|
||||
return;
|
||||
|
||||
var doc = range.document;
|
||||
|
||||
// Determine the block element to be used.
|
||||
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
|
||||
|
||||
var isEndOfBlock = range.checkEndOfBlock();
|
||||
|
||||
var elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() );
|
||||
|
||||
var startBlock = elementPath.block,
|
||||
startBlockTag = startBlock && elementPath.block.getName();
|
||||
|
||||
var isPre = false;
|
||||
|
||||
if ( !forceMode && startBlockTag == 'li' )
|
||||
{
|
||||
enterBlock( editor, mode, range, forceMode );
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are at the end of a header block.
|
||||
if ( !forceMode && isEndOfBlock && headerTagRegex.test( startBlockTag ) )
|
||||
{
|
||||
var newBlock,
|
||||
newBlockDir;
|
||||
|
||||
if ( ( newBlockDir = startBlock.getDirection() ) )
|
||||
{
|
||||
newBlock = doc.createElement( 'div' );
|
||||
newBlock.setAttribute( 'dir', newBlockDir );
|
||||
newBlock.insertAfter( startBlock );
|
||||
range.setStart( newBlock, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Insert a <br> after the current paragraph.
|
||||
doc.createElement( 'br' ).insertAfter( startBlock );
|
||||
|
||||
// A text node is required by Gecko only to make the cursor blink.
|
||||
if ( CKEDITOR.env.gecko )
|
||||
doc.createText( '' ).insertAfter( startBlock );
|
||||
|
||||
// IE has different behaviors regarding position.
|
||||
range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var lineBreak;
|
||||
|
||||
isPre = ( startBlockTag == 'pre' );
|
||||
|
||||
// Gecko prefers <br> as line-break inside <pre> (#4711).
|
||||
if ( isPre && !CKEDITOR.env.gecko )
|
||||
lineBreak = doc.createText( CKEDITOR.env.ie ? '\r' : '\n' );
|
||||
else
|
||||
lineBreak = doc.createElement( 'br' );
|
||||
|
||||
range.deleteContents();
|
||||
range.insertNode( lineBreak );
|
||||
|
||||
// IE has different behavior regarding position.
|
||||
if ( CKEDITOR.env.ie )
|
||||
range.setStartAt( lineBreak, CKEDITOR.POSITION_AFTER_END );
|
||||
else
|
||||
{
|
||||
// A text node is required by Gecko only to make the cursor blink.
|
||||
// We need some text inside of it, so the bogus <br> is properly
|
||||
// created.
|
||||
doc.createText( '\ufeff' ).insertAfter( lineBreak );
|
||||
|
||||
// If we are at the end of a block, we must be sure the bogus node is available in that block.
|
||||
if ( isEndOfBlock )
|
||||
lineBreak.getParent().appendBogus();
|
||||
|
||||
// Now we can remove the text node contents, so the caret doesn't
|
||||
// stop on it.
|
||||
lineBreak.getNext().$.nodeValue = '';
|
||||
|
||||
range.setStartAt( lineBreak.getNext(), CKEDITOR.POSITION_AFTER_START );
|
||||
|
||||
// Scroll into view, for non IE.
|
||||
var dummy = null;
|
||||
|
||||
// BR is not positioned in Opera and Webkit.
|
||||
if ( !CKEDITOR.env.gecko )
|
||||
{
|
||||
dummy = doc.createElement( 'span' );
|
||||
// We need have some contents for Webkit to position it
|
||||
// under parent node. ( #3681)
|
||||
dummy.setHtml(' ');
|
||||
}
|
||||
else
|
||||
dummy = doc.createElement( 'br' );
|
||||
|
||||
dummy.insertBefore( lineBreak.getNext() );
|
||||
dummy.scrollIntoView();
|
||||
dummy.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// This collapse guarantees the cursor will be blinking.
|
||||
range.collapse( true );
|
||||
|
||||
range.select( isPre );
|
||||
}
|
||||
};
|
||||
|
||||
var plugin = CKEDITOR.plugins.enterkey,
|
||||
enterBr = plugin.enterBr,
|
||||
enterBlock = plugin.enterBlock,
|
||||
headerTagRegex = /^h[1-6]$/;
|
||||
|
||||
function shiftEnter( editor )
|
||||
{
|
||||
// Only effective within document.
|
||||
if ( editor.mode != 'wysiwyg' )
|
||||
return false;
|
||||
|
||||
// On SHIFT+ENTER:
|
||||
// 1. We want to enforce the mode to be respected, instead
|
||||
// of cloning the current block. (#77)
|
||||
return enter( editor, editor.config.shiftEnterMode, 1 );
|
||||
}
|
||||
|
||||
function enter( editor, mode, forceMode )
|
||||
{
|
||||
forceMode = editor.config.forceEnterMode || forceMode;
|
||||
|
||||
// Only effective within document.
|
||||
if ( editor.mode != 'wysiwyg' )
|
||||
return false;
|
||||
|
||||
if ( !mode )
|
||||
mode = editor.config.enterMode;
|
||||
|
||||
// Use setTimout so the keys get cancelled immediatelly.
|
||||
setTimeout( function()
|
||||
{
|
||||
editor.fire( 'saveSnapshot' ); // Save undo step.
|
||||
|
||||
if ( mode == CKEDITOR.ENTER_BR )
|
||||
enterBr( editor, mode, null, forceMode );
|
||||
else
|
||||
enterBlock( editor, mode, null, forceMode );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
}, 0 );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function getRange( editor )
|
||||
{
|
||||
// Get the selection ranges.
|
||||
var ranges = editor.getSelection().getRanges( true );
|
||||
|
||||
// Delete the contents of all ranges except the first one.
|
||||
for ( var i = ranges.length - 1 ; i > 0 ; i-- )
|
||||
{
|
||||
ranges[ i ].deleteContents();
|
||||
}
|
||||
|
||||
// Return the first range.
|
||||
return ranges[ 0 ];
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -1,254 +1,254 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
// Base HTML entities.
|
||||
var htmlbase = 'nbsp,gt,lt,amp';
|
||||
|
||||
var entities =
|
||||
// Latin-1 Entities
|
||||
'quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,' +
|
||||
'not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,' +
|
||||
'cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,' +
|
||||
|
||||
// Symbols
|
||||
'fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,' +
|
||||
'alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,' +
|
||||
'forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,' +
|
||||
'radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,' +
|
||||
'equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,' +
|
||||
'rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,' +
|
||||
|
||||
// Other Special Characters
|
||||
'circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,' +
|
||||
'rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,' +
|
||||
'euro';
|
||||
|
||||
// Latin Letters Entities
|
||||
var latin =
|
||||
'Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,' +
|
||||
'Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,' +
|
||||
'Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,' +
|
||||
'agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,' +
|
||||
'ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,' +
|
||||
'otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,' +
|
||||
'OElig,oelig,Scaron,scaron,Yuml';
|
||||
|
||||
// Greek Letters Entities.
|
||||
var greek =
|
||||
'Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,' +
|
||||
'Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,' +
|
||||
'beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,' +
|
||||
'omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,' +
|
||||
'upsih,piv';
|
||||
|
||||
/**
|
||||
* Create a mapping table between one character and its entity form from a list of entity names.
|
||||
* @param reverse {Boolean} Whether to create a reverse map from the entity string form to an actual character.
|
||||
*/
|
||||
function buildTable( entities, reverse )
|
||||
{
|
||||
var table = {},
|
||||
regex = [];
|
||||
|
||||
// Entities that the browsers DOM don't transform to the final char
|
||||
// automatically.
|
||||
var specialTable =
|
||||
{
|
||||
nbsp : '\u00A0', // IE | FF
|
||||
shy : '\u00AD', // IE
|
||||
gt : '\u003E', // IE | FF | -- | Opera
|
||||
lt : '\u003C', // IE | FF | Safari | Opera
|
||||
amp : '\u0026', // ALL
|
||||
apos : '\u0027', // IE
|
||||
quot : '\u0022' // IE
|
||||
};
|
||||
|
||||
entities = entities.replace( /\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function( match, entity )
|
||||
{
|
||||
var org = reverse ? '&' + entity + ';' : specialTable[ entity ],
|
||||
result = reverse ? specialTable[ entity ] : '&' + entity + ';';
|
||||
|
||||
table[ org ] = result;
|
||||
regex.push( org );
|
||||
return '';
|
||||
});
|
||||
|
||||
if ( !reverse && entities )
|
||||
{
|
||||
// Transforms the entities string into an array.
|
||||
entities = entities.split( ',' );
|
||||
|
||||
// Put all entities inside a DOM element, transforming them to their
|
||||
// final chars.
|
||||
var div = document.createElement( 'div' ),
|
||||
chars;
|
||||
div.innerHTML = '&' + entities.join( ';&' ) + ';';
|
||||
chars = div.innerHTML;
|
||||
div = null;
|
||||
|
||||
// Add all chars to the table.
|
||||
for ( var i = 0 ; i < chars.length ; i++ )
|
||||
{
|
||||
var charAt = chars.charAt( i );
|
||||
table[ charAt ] = '&' + entities[ i ] + ';';
|
||||
regex.push( charAt );
|
||||
}
|
||||
}
|
||||
|
||||
table.regex = regex.join( reverse ? '|' : '' );
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'entities',
|
||||
{
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
var dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
if ( htmlFilter )
|
||||
{
|
||||
// Mandatory HTML base entities.
|
||||
var selectedEntities = [];
|
||||
|
||||
if ( config.basicEntities !== false )
|
||||
selectedEntities.push( htmlbase );
|
||||
|
||||
if ( config.entities )
|
||||
{
|
||||
if ( selectedEntities.length )
|
||||
selectedEntities.push( entities );
|
||||
|
||||
if ( config.entities_latin )
|
||||
selectedEntities.push( latin );
|
||||
|
||||
if ( config.entities_greek )
|
||||
selectedEntities.push( greek );
|
||||
|
||||
if ( config.entities_additional )
|
||||
selectedEntities.push( config.entities_additional );
|
||||
}
|
||||
|
||||
var entitiesTable = buildTable( selectedEntities.join( ',' ) );
|
||||
|
||||
// Create the Regex used to find entities in the text, leave it matches nothing if entities are empty.
|
||||
var entitiesRegex = entitiesTable.regex ? '[' + entitiesTable.regex + ']' : 'a^';
|
||||
delete entitiesTable.regex;
|
||||
|
||||
if ( config.entities && config.entities_processNumerical )
|
||||
entitiesRegex = '[^ -~]|' + entitiesRegex ;
|
||||
|
||||
entitiesRegex = new RegExp( entitiesRegex, 'g' );
|
||||
|
||||
function getEntity( character )
|
||||
{
|
||||
return config.entities_processNumerical == 'force' || !entitiesTable[ character ] ?
|
||||
'&#' + character.charCodeAt(0) + ';'
|
||||
: entitiesTable[ character ];
|
||||
}
|
||||
|
||||
// Decode entities that the browsers has transformed
|
||||
// at first place.
|
||||
var baseEntitiesTable = buildTable( [ htmlbase, 'shy' ].join( ',' ) , true ),
|
||||
baseEntitiesRegex = new RegExp( baseEntitiesTable.regex, 'g' );
|
||||
|
||||
function getChar( character )
|
||||
{
|
||||
return baseEntitiesTable[ character ];
|
||||
}
|
||||
|
||||
htmlFilter.addRules(
|
||||
{
|
||||
text : function( text )
|
||||
{
|
||||
return text.replace( baseEntitiesRegex, getChar )
|
||||
.replace( entitiesRegex, getEntity );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Whether to escape basic HTML entities in the document, including:
|
||||
* <ul>
|
||||
* <li><code>nbsp</code></li>
|
||||
* <li><code>gt</code></li>
|
||||
* <li><code>lt</code></li>
|
||||
* <li><code>amp</code></li>
|
||||
* </ul>
|
||||
* <strong>Note:</strong> It should not be subject to change unless when outputting a non-HTML data format like BBCode.
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.basicEntities = false;
|
||||
*/
|
||||
CKEDITOR.config.basicEntities = true;
|
||||
|
||||
/**
|
||||
* Whether to use HTML entities in the output.
|
||||
* @name CKEDITOR.config.entities
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.entities = false;
|
||||
*/
|
||||
CKEDITOR.config.entities = true;
|
||||
|
||||
/**
|
||||
* Whether to convert some Latin characters (Latin alphabet No. 1, ISO 8859-1)
|
||||
* to HTML entities. The list of entities can be found in the
|
||||
* <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.2.1">W3C HTML 4.01 Specification, section 24.2.1</a>.
|
||||
* @name CKEDITOR.config.entities_latin
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.entities_latin = false;
|
||||
*/
|
||||
CKEDITOR.config.entities_latin = true;
|
||||
|
||||
/**
|
||||
* Whether to convert some symbols, mathematical symbols, and Greek letters to
|
||||
* HTML entities. This may be more relevant for users typing text written in Greek.
|
||||
* The list of entities can be found in the
|
||||
* <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1">W3C HTML 4.01 Specification, section 24.3.1</a>.
|
||||
* @name CKEDITOR.config.entities_greek
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.entities_greek = false;
|
||||
*/
|
||||
CKEDITOR.config.entities_greek = true;
|
||||
|
||||
/**
|
||||
* Whether to convert all remaining characters not included in the ASCII
|
||||
* character table to their relative decimal numeric representation of HTML entity.
|
||||
* When set to <code>force</code>, it will convert all entities into this format.
|
||||
* For example the phrase "This is Chinese: 汉语." is output
|
||||
* as "This is Chinese: &#27721;&#35821;."
|
||||
* @name CKEDITOR.config.entities_processNumerical
|
||||
* @type Boolean|String
|
||||
* @default <code>false</code>
|
||||
* @example
|
||||
* config.entities_processNumerical = true;
|
||||
* config.entities_processNumerical = 'force'; //Converts from " " into " ";
|
||||
*/
|
||||
|
||||
/**
|
||||
* A comma separated list of additional entities to be used. Entity names
|
||||
* or numbers must be used in a form that excludes the "&" prefix and the ";" ending.
|
||||
* @name CKEDITOR.config.entities_additional
|
||||
* @default <code>'#39'</code> (The single quote (') character.)
|
||||
* @type String
|
||||
* @example
|
||||
* config.entities_additional = '#1049'; // Adds Cyrillic capital letter Short I (Й).
|
||||
*/
|
||||
CKEDITOR.config.entities_additional = '#39';
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
// Base HTML entities.
|
||||
var htmlbase = 'nbsp,gt,lt,amp';
|
||||
|
||||
var entities =
|
||||
// Latin-1 Entities
|
||||
'quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,' +
|
||||
'not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,' +
|
||||
'cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,' +
|
||||
|
||||
// Symbols
|
||||
'fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,' +
|
||||
'alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,' +
|
||||
'forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,' +
|
||||
'radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,' +
|
||||
'equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,' +
|
||||
'rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,' +
|
||||
|
||||
// Other Special Characters
|
||||
'circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,' +
|
||||
'rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,' +
|
||||
'euro';
|
||||
|
||||
// Latin Letters Entities
|
||||
var latin =
|
||||
'Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,' +
|
||||
'Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,' +
|
||||
'Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,' +
|
||||
'agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,' +
|
||||
'ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,' +
|
||||
'otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,' +
|
||||
'OElig,oelig,Scaron,scaron,Yuml';
|
||||
|
||||
// Greek Letters Entities.
|
||||
var greek =
|
||||
'Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,' +
|
||||
'Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,' +
|
||||
'beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,' +
|
||||
'omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,' +
|
||||
'upsih,piv';
|
||||
|
||||
/**
|
||||
* Create a mapping table between one character and its entity form from a list of entity names.
|
||||
* @param reverse {Boolean} Whether to create a reverse map from the entity string form to an actual character.
|
||||
*/
|
||||
function buildTable( entities, reverse )
|
||||
{
|
||||
var table = {},
|
||||
regex = [];
|
||||
|
||||
// Entities that the browsers DOM don't transform to the final char
|
||||
// automatically.
|
||||
var specialTable =
|
||||
{
|
||||
nbsp : '\u00A0', // IE | FF
|
||||
shy : '\u00AD', // IE
|
||||
gt : '\u003E', // IE | FF | -- | Opera
|
||||
lt : '\u003C', // IE | FF | Safari | Opera
|
||||
amp : '\u0026', // ALL
|
||||
apos : '\u0027', // IE
|
||||
quot : '\u0022' // IE
|
||||
};
|
||||
|
||||
entities = entities.replace( /\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function( match, entity )
|
||||
{
|
||||
var org = reverse ? '&' + entity + ';' : specialTable[ entity ],
|
||||
result = reverse ? specialTable[ entity ] : '&' + entity + ';';
|
||||
|
||||
table[ org ] = result;
|
||||
regex.push( org );
|
||||
return '';
|
||||
});
|
||||
|
||||
if ( !reverse && entities )
|
||||
{
|
||||
// Transforms the entities string into an array.
|
||||
entities = entities.split( ',' );
|
||||
|
||||
// Put all entities inside a DOM element, transforming them to their
|
||||
// final chars.
|
||||
var div = document.createElement( 'div' ),
|
||||
chars;
|
||||
div.innerHTML = '&' + entities.join( ';&' ) + ';';
|
||||
chars = div.innerHTML;
|
||||
div = null;
|
||||
|
||||
// Add all chars to the table.
|
||||
for ( var i = 0 ; i < chars.length ; i++ )
|
||||
{
|
||||
var charAt = chars.charAt( i );
|
||||
table[ charAt ] = '&' + entities[ i ] + ';';
|
||||
regex.push( charAt );
|
||||
}
|
||||
}
|
||||
|
||||
table.regex = regex.join( reverse ? '|' : '' );
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'entities',
|
||||
{
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
var dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
if ( htmlFilter )
|
||||
{
|
||||
// Mandatory HTML base entities.
|
||||
var selectedEntities = [];
|
||||
|
||||
if ( config.basicEntities !== false )
|
||||
selectedEntities.push( htmlbase );
|
||||
|
||||
if ( config.entities )
|
||||
{
|
||||
if ( selectedEntities.length )
|
||||
selectedEntities.push( entities );
|
||||
|
||||
if ( config.entities_latin )
|
||||
selectedEntities.push( latin );
|
||||
|
||||
if ( config.entities_greek )
|
||||
selectedEntities.push( greek );
|
||||
|
||||
if ( config.entities_additional )
|
||||
selectedEntities.push( config.entities_additional );
|
||||
}
|
||||
|
||||
var entitiesTable = buildTable( selectedEntities.join( ',' ) );
|
||||
|
||||
// Create the Regex used to find entities in the text, leave it matches nothing if entities are empty.
|
||||
var entitiesRegex = entitiesTable.regex ? '[' + entitiesTable.regex + ']' : 'a^';
|
||||
delete entitiesTable.regex;
|
||||
|
||||
if ( config.entities && config.entities_processNumerical )
|
||||
entitiesRegex = '[^ -~]|' + entitiesRegex ;
|
||||
|
||||
entitiesRegex = new RegExp( entitiesRegex, 'g' );
|
||||
|
||||
function getEntity( character )
|
||||
{
|
||||
return config.entities_processNumerical == 'force' || !entitiesTable[ character ] ?
|
||||
'&#' + character.charCodeAt(0) + ';'
|
||||
: entitiesTable[ character ];
|
||||
}
|
||||
|
||||
// Decode entities that the browsers has transformed
|
||||
// at first place.
|
||||
var baseEntitiesTable = buildTable( [ htmlbase, 'shy' ].join( ',' ) , true ),
|
||||
baseEntitiesRegex = new RegExp( baseEntitiesTable.regex, 'g' );
|
||||
|
||||
function getChar( character )
|
||||
{
|
||||
return baseEntitiesTable[ character ];
|
||||
}
|
||||
|
||||
htmlFilter.addRules(
|
||||
{
|
||||
text : function( text )
|
||||
{
|
||||
return text.replace( baseEntitiesRegex, getChar )
|
||||
.replace( entitiesRegex, getEntity );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Whether to escape basic HTML entities in the document, including:
|
||||
* <ul>
|
||||
* <li><code>nbsp</code></li>
|
||||
* <li><code>gt</code></li>
|
||||
* <li><code>lt</code></li>
|
||||
* <li><code>amp</code></li>
|
||||
* </ul>
|
||||
* <strong>Note:</strong> It should not be subject to change unless when outputting a non-HTML data format like BBCode.
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.basicEntities = false;
|
||||
*/
|
||||
CKEDITOR.config.basicEntities = true;
|
||||
|
||||
/**
|
||||
* Whether to use HTML entities in the output.
|
||||
* @name CKEDITOR.config.entities
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.entities = false;
|
||||
*/
|
||||
CKEDITOR.config.entities = true;
|
||||
|
||||
/**
|
||||
* Whether to convert some Latin characters (Latin alphabet No. 1, ISO 8859-1)
|
||||
* to HTML entities. The list of entities can be found in the
|
||||
* <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.2.1">W3C HTML 4.01 Specification, section 24.2.1</a>.
|
||||
* @name CKEDITOR.config.entities_latin
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.entities_latin = false;
|
||||
*/
|
||||
CKEDITOR.config.entities_latin = true;
|
||||
|
||||
/**
|
||||
* Whether to convert some symbols, mathematical symbols, and Greek letters to
|
||||
* HTML entities. This may be more relevant for users typing text written in Greek.
|
||||
* The list of entities can be found in the
|
||||
* <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1">W3C HTML 4.01 Specification, section 24.3.1</a>.
|
||||
* @name CKEDITOR.config.entities_greek
|
||||
* @type Boolean
|
||||
* @default <code>true</code>
|
||||
* @example
|
||||
* config.entities_greek = false;
|
||||
*/
|
||||
CKEDITOR.config.entities_greek = true;
|
||||
|
||||
/**
|
||||
* Whether to convert all remaining characters not included in the ASCII
|
||||
* character table to their relative decimal numeric representation of HTML entity.
|
||||
* When set to <code>force</code>, it will convert all entities into this format.
|
||||
* For example the phrase "This is Chinese: 汉语." is output
|
||||
* as "This is Chinese: &#27721;&#35821;."
|
||||
* @name CKEDITOR.config.entities_processNumerical
|
||||
* @type Boolean|String
|
||||
* @default <code>false</code>
|
||||
* @example
|
||||
* config.entities_processNumerical = true;
|
||||
* config.entities_processNumerical = 'force'; //Converts from " " into " ";
|
||||
*/
|
||||
|
||||
/**
|
||||
* A comma separated list of additional entities to be used. Entity names
|
||||
* or numbers must be used in a form that excludes the "&" prefix and the ";" ending.
|
||||
* @name CKEDITOR.config.entities_additional
|
||||
* @default <code>'#39'</code> (The single quote (') character.)
|
||||
* @type String
|
||||
* @example
|
||||
* config.entities_additional = '#1049'; // Adds Cyrillic capital letter Short I (Й).
|
||||
*/
|
||||
CKEDITOR.config.entities_additional = '#39';
|
||||
|
||||
@@ -1,181 +1,181 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var cssStyle = CKEDITOR.htmlParser.cssStyle,
|
||||
cssLength = CKEDITOR.tools.cssLength;
|
||||
|
||||
var cssLengthRegex = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;
|
||||
|
||||
/*
|
||||
* Replacing the former CSS length value with the later one, with
|
||||
* adjustment to the length unit.
|
||||
*/
|
||||
function replaceCssLength( length1, length2 )
|
||||
{
|
||||
var parts1 = cssLengthRegex.exec( length1 ),
|
||||
parts2 = cssLengthRegex.exec( length2 );
|
||||
|
||||
// Omit pixel length unit when necessary,
|
||||
// e.g. replaceCssLength( 10, '20px' ) -> 20
|
||||
if ( parts1 )
|
||||
{
|
||||
if ( !parts1[ 2 ] && parts2[ 2 ] == 'px' )
|
||||
return parts2[ 1 ];
|
||||
if ( parts1[ 2 ] == 'px' && !parts2[ 2 ] )
|
||||
return parts2[ 1 ] + 'px';
|
||||
}
|
||||
|
||||
return length2;
|
||||
}
|
||||
|
||||
var htmlFilterRules =
|
||||
{
|
||||
elements :
|
||||
{
|
||||
$ : function( element )
|
||||
{
|
||||
var attributes = element.attributes,
|
||||
realHtml = attributes && attributes[ 'data-cke-realelement' ],
|
||||
realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ),
|
||||
realElement = realFragment && realFragment.children[ 0 ];
|
||||
|
||||
// Width/height in the fake object are subjected to clone into the real element.
|
||||
if ( realElement && element.attributes[ 'data-cke-resizable' ] )
|
||||
{
|
||||
var styles = new cssStyle( element ).rules,
|
||||
realAttrs = realElement.attributes,
|
||||
width = styles.width,
|
||||
height = styles.height;
|
||||
|
||||
width && ( realAttrs.width = replaceCssLength( realAttrs.width, width ) );
|
||||
height && ( realAttrs.height = replaceCssLength( realAttrs.height, height ) );
|
||||
}
|
||||
|
||||
return realElement;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'fakeobjects',
|
||||
{
|
||||
requires : [ 'htmlwriter' ],
|
||||
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
if ( htmlFilter )
|
||||
htmlFilter.addRules( htmlFilterRules );
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable )
|
||||
{
|
||||
var lang = this.lang.fakeobjects,
|
||||
label = lang[ realElementType ] || lang.unknown;
|
||||
|
||||
var attributes =
|
||||
{
|
||||
'class' : className,
|
||||
'data-cke-realelement' : encodeURIComponent( realElement.getOuterHtml() ),
|
||||
'data-cke-real-node-type' : realElement.type,
|
||||
alt : label,
|
||||
title : label,
|
||||
align : realElement.getAttribute( 'align' ) || ''
|
||||
};
|
||||
|
||||
// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
|
||||
if ( !CKEDITOR.env.hc )
|
||||
attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' );
|
||||
|
||||
if ( realElementType )
|
||||
attributes[ 'data-cke-real-element-type' ] = realElementType;
|
||||
|
||||
if ( isResizable )
|
||||
{
|
||||
attributes[ 'data-cke-resizable' ] = isResizable;
|
||||
|
||||
var fakeStyle = new cssStyle();
|
||||
|
||||
var width = realElement.getAttribute( 'width' ),
|
||||
height = realElement.getAttribute( 'height' );
|
||||
|
||||
width && ( fakeStyle.rules.width = cssLength( width ) );
|
||||
height && ( fakeStyle.rules.height = cssLength( height ) );
|
||||
fakeStyle.populate( attributes );
|
||||
}
|
||||
|
||||
return this.document.createElement( 'img', { attributes : attributes } );
|
||||
};
|
||||
|
||||
CKEDITOR.editor.prototype.createFakeParserElement = function( realElement, className, realElementType, isResizable )
|
||||
{
|
||||
var lang = this.lang.fakeobjects,
|
||||
label = lang[ realElementType ] || lang.unknown,
|
||||
html;
|
||||
|
||||
var writer = new CKEDITOR.htmlParser.basicWriter();
|
||||
realElement.writeHtml( writer );
|
||||
html = writer.getHtml();
|
||||
|
||||
var attributes =
|
||||
{
|
||||
'class' : className,
|
||||
'data-cke-realelement' : encodeURIComponent( html ),
|
||||
'data-cke-real-node-type' : realElement.type,
|
||||
alt : label,
|
||||
title : label,
|
||||
align : realElement.attributes.align || ''
|
||||
};
|
||||
|
||||
// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
|
||||
if ( !CKEDITOR.env.hc )
|
||||
attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' );
|
||||
|
||||
if ( realElementType )
|
||||
attributes[ 'data-cke-real-element-type' ] = realElementType;
|
||||
|
||||
if ( isResizable )
|
||||
{
|
||||
attributes[ 'data-cke-resizable' ] = isResizable;
|
||||
var realAttrs = realElement.attributes,
|
||||
fakeStyle = new cssStyle();
|
||||
|
||||
var width = realAttrs.width,
|
||||
height = realAttrs.height;
|
||||
|
||||
width != undefined && ( fakeStyle.rules.width = cssLength( width ) );
|
||||
height != undefined && ( fakeStyle.rules.height = cssLength ( height ) );
|
||||
fakeStyle.populate( attributes );
|
||||
}
|
||||
|
||||
return new CKEDITOR.htmlParser.element( 'img', attributes );
|
||||
};
|
||||
|
||||
CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement )
|
||||
{
|
||||
if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT )
|
||||
return null;
|
||||
|
||||
var element = CKEDITOR.dom.element.createFromHtml(
|
||||
decodeURIComponent( fakeElement.data( 'cke-realelement' ) ),
|
||||
this.document );
|
||||
|
||||
if ( fakeElement.data( 'cke-resizable') )
|
||||
{
|
||||
var width = fakeElement.getStyle( 'width' ),
|
||||
height = fakeElement.getStyle( 'height' );
|
||||
|
||||
width && element.setAttribute( 'width', replaceCssLength( element.getAttribute( 'width' ), width ) );
|
||||
height && element.setAttribute( 'height', replaceCssLength( element.getAttribute( 'height' ), height ) );
|
||||
}
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var cssStyle = CKEDITOR.htmlParser.cssStyle,
|
||||
cssLength = CKEDITOR.tools.cssLength;
|
||||
|
||||
var cssLengthRegex = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;
|
||||
|
||||
/*
|
||||
* Replacing the former CSS length value with the later one, with
|
||||
* adjustment to the length unit.
|
||||
*/
|
||||
function replaceCssLength( length1, length2 )
|
||||
{
|
||||
var parts1 = cssLengthRegex.exec( length1 ),
|
||||
parts2 = cssLengthRegex.exec( length2 );
|
||||
|
||||
// Omit pixel length unit when necessary,
|
||||
// e.g. replaceCssLength( 10, '20px' ) -> 20
|
||||
if ( parts1 )
|
||||
{
|
||||
if ( !parts1[ 2 ] && parts2[ 2 ] == 'px' )
|
||||
return parts2[ 1 ];
|
||||
if ( parts1[ 2 ] == 'px' && !parts2[ 2 ] )
|
||||
return parts2[ 1 ] + 'px';
|
||||
}
|
||||
|
||||
return length2;
|
||||
}
|
||||
|
||||
var htmlFilterRules =
|
||||
{
|
||||
elements :
|
||||
{
|
||||
$ : function( element )
|
||||
{
|
||||
var attributes = element.attributes,
|
||||
realHtml = attributes && attributes[ 'data-cke-realelement' ],
|
||||
realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ),
|
||||
realElement = realFragment && realFragment.children[ 0 ];
|
||||
|
||||
// Width/height in the fake object are subjected to clone into the real element.
|
||||
if ( realElement && element.attributes[ 'data-cke-resizable' ] )
|
||||
{
|
||||
var styles = new cssStyle( element ).rules,
|
||||
realAttrs = realElement.attributes,
|
||||
width = styles.width,
|
||||
height = styles.height;
|
||||
|
||||
width && ( realAttrs.width = replaceCssLength( realAttrs.width, width ) );
|
||||
height && ( realAttrs.height = replaceCssLength( realAttrs.height, height ) );
|
||||
}
|
||||
|
||||
return realElement;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'fakeobjects',
|
||||
{
|
||||
requires : [ 'htmlwriter' ],
|
||||
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
if ( htmlFilter )
|
||||
htmlFilter.addRules( htmlFilterRules );
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable )
|
||||
{
|
||||
var lang = this.lang.fakeobjects,
|
||||
label = lang[ realElementType ] || lang.unknown;
|
||||
|
||||
var attributes =
|
||||
{
|
||||
'class' : className,
|
||||
'data-cke-realelement' : encodeURIComponent( realElement.getOuterHtml() ),
|
||||
'data-cke-real-node-type' : realElement.type,
|
||||
alt : label,
|
||||
title : label,
|
||||
align : realElement.getAttribute( 'align' ) || ''
|
||||
};
|
||||
|
||||
// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
|
||||
if ( !CKEDITOR.env.hc )
|
||||
attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' );
|
||||
|
||||
if ( realElementType )
|
||||
attributes[ 'data-cke-real-element-type' ] = realElementType;
|
||||
|
||||
if ( isResizable )
|
||||
{
|
||||
attributes[ 'data-cke-resizable' ] = isResizable;
|
||||
|
||||
var fakeStyle = new cssStyle();
|
||||
|
||||
var width = realElement.getAttribute( 'width' ),
|
||||
height = realElement.getAttribute( 'height' );
|
||||
|
||||
width && ( fakeStyle.rules.width = cssLength( width ) );
|
||||
height && ( fakeStyle.rules.height = cssLength( height ) );
|
||||
fakeStyle.populate( attributes );
|
||||
}
|
||||
|
||||
return this.document.createElement( 'img', { attributes : attributes } );
|
||||
};
|
||||
|
||||
CKEDITOR.editor.prototype.createFakeParserElement = function( realElement, className, realElementType, isResizable )
|
||||
{
|
||||
var lang = this.lang.fakeobjects,
|
||||
label = lang[ realElementType ] || lang.unknown,
|
||||
html;
|
||||
|
||||
var writer = new CKEDITOR.htmlParser.basicWriter();
|
||||
realElement.writeHtml( writer );
|
||||
html = writer.getHtml();
|
||||
|
||||
var attributes =
|
||||
{
|
||||
'class' : className,
|
||||
'data-cke-realelement' : encodeURIComponent( html ),
|
||||
'data-cke-real-node-type' : realElement.type,
|
||||
alt : label,
|
||||
title : label,
|
||||
align : realElement.attributes.align || ''
|
||||
};
|
||||
|
||||
// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
|
||||
if ( !CKEDITOR.env.hc )
|
||||
attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' );
|
||||
|
||||
if ( realElementType )
|
||||
attributes[ 'data-cke-real-element-type' ] = realElementType;
|
||||
|
||||
if ( isResizable )
|
||||
{
|
||||
attributes[ 'data-cke-resizable' ] = isResizable;
|
||||
var realAttrs = realElement.attributes,
|
||||
fakeStyle = new cssStyle();
|
||||
|
||||
var width = realAttrs.width,
|
||||
height = realAttrs.height;
|
||||
|
||||
width != undefined && ( fakeStyle.rules.width = cssLength( width ) );
|
||||
height != undefined && ( fakeStyle.rules.height = cssLength ( height ) );
|
||||
fakeStyle.populate( attributes );
|
||||
}
|
||||
|
||||
return new CKEDITOR.htmlParser.element( 'img', attributes );
|
||||
};
|
||||
|
||||
CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement )
|
||||
{
|
||||
if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT )
|
||||
return null;
|
||||
|
||||
var element = CKEDITOR.dom.element.createFromHtml(
|
||||
decodeURIComponent( fakeElement.data( 'cke-realelement' ) ),
|
||||
this.document );
|
||||
|
||||
if ( fakeElement.data( 'cke-resizable') )
|
||||
{
|
||||
var width = fakeElement.getStyle( 'width' ),
|
||||
height = fakeElement.getStyle( 'height' );
|
||||
|
||||
width && element.setAttribute( 'width', replaceCssLength( element.getAttribute( 'width' ), width ) );
|
||||
height && element.setAttribute( 'height', replaceCssLength( element.getAttribute( 'height' ), height ) );
|
||||
}
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,48 +1,48 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'find',
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
init : function( editor )
|
||||
{
|
||||
var forms = CKEDITOR.plugins.find;
|
||||
editor.ui.addButton( 'Find',
|
||||
{
|
||||
label : editor.lang.findAndReplace.find,
|
||||
command : 'find'
|
||||
});
|
||||
var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) );
|
||||
findCommand.canUndo = false;
|
||||
findCommand.readOnly = 1;
|
||||
|
||||
editor.ui.addButton( 'Replace',
|
||||
{
|
||||
label : editor.lang.findAndReplace.replace,
|
||||
command : 'replace'
|
||||
});
|
||||
var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) );
|
||||
replaceCommand.canUndo = false;
|
||||
|
||||
CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' );
|
||||
CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' );
|
||||
},
|
||||
|
||||
requires : [ 'styles' ]
|
||||
} );
|
||||
|
||||
/**
|
||||
* Defines the style to be used to highlight results with the find dialog.
|
||||
* @type Object
|
||||
* @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } }
|
||||
* @example
|
||||
* // Highlight search results with blue on yellow.
|
||||
* config.find_highlight =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'background-color' : '#ff0', 'color' : '#00f' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'find',
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
init : function( editor )
|
||||
{
|
||||
var forms = CKEDITOR.plugins.find;
|
||||
editor.ui.addButton( 'Find',
|
||||
{
|
||||
label : editor.lang.findAndReplace.find,
|
||||
command : 'find'
|
||||
});
|
||||
var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) );
|
||||
findCommand.canUndo = false;
|
||||
findCommand.readOnly = 1;
|
||||
|
||||
editor.ui.addButton( 'Replace',
|
||||
{
|
||||
label : editor.lang.findAndReplace.replace,
|
||||
command : 'replace'
|
||||
});
|
||||
var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) );
|
||||
replaceCommand.canUndo = false;
|
||||
|
||||
CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' );
|
||||
CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' );
|
||||
},
|
||||
|
||||
requires : [ 'styles' ]
|
||||
} );
|
||||
|
||||
/**
|
||||
* Defines the style to be used to highlight results with the find dialog.
|
||||
* @type Object
|
||||
* @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } }
|
||||
* @example
|
||||
* // Highlight search results with blue on yellow.
|
||||
* config.find_highlight =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'background-color' : '#ff0', 'color' : '#00f' }
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,154 +1,154 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var flashFilenameRegex = /\.swf(?:$|\?)/i;
|
||||
|
||||
function isFlashEmbed( element )
|
||||
{
|
||||
var attributes = element.attributes;
|
||||
|
||||
return ( attributes.type == 'application/x-shockwave-flash' || flashFilenameRegex.test( attributes.src || '' ) );
|
||||
}
|
||||
|
||||
function createFakeElement( editor, realElement )
|
||||
{
|
||||
return editor.createFakeParserElement( realElement, 'cke_flash', 'flash', true );
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'flash',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'flash', new CKEDITOR.dialogCommand( 'flash' ) );
|
||||
editor.ui.addButton( 'Flash',
|
||||
{
|
||||
label : editor.lang.common.flash,
|
||||
command : 'flash'
|
||||
});
|
||||
CKEDITOR.dialog.add( 'flash', this.path + 'dialogs/flash.js' );
|
||||
|
||||
editor.addCss(
|
||||
'img.cke_flash' +
|
||||
'{' +
|
||||
'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
|
||||
'background-position: center center;' +
|
||||
'background-repeat: no-repeat;' +
|
||||
'border: 1px solid #a9a9a9;' +
|
||||
'width: 80px;' +
|
||||
'height: 80px;' +
|
||||
'}'
|
||||
);
|
||||
|
||||
// If the "menu" plugin is loaded, register the menu items.
|
||||
if ( editor.addMenuItems )
|
||||
{
|
||||
editor.addMenuItems(
|
||||
{
|
||||
flash :
|
||||
{
|
||||
label : editor.lang.flash.properties,
|
||||
command : 'flash',
|
||||
group : 'flash'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
editor.on( 'doubleclick', function( evt )
|
||||
{
|
||||
var element = evt.data.element;
|
||||
|
||||
if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'flash' )
|
||||
evt.data.dialog = 'flash';
|
||||
});
|
||||
|
||||
// If the "contextmenu" plugin is loaded, register the listeners.
|
||||
if ( editor.contextMenu )
|
||||
{
|
||||
editor.contextMenu.addListener( function( element, selection )
|
||||
{
|
||||
if ( element && element.is( 'img' ) && !element.isReadOnly()
|
||||
&& element.data( 'cke-real-element-type' ) == 'flash' )
|
||||
return { flash : CKEDITOR.TRISTATE_OFF };
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var dataProcessor = editor.dataProcessor,
|
||||
dataFilter = dataProcessor && dataProcessor.dataFilter;
|
||||
|
||||
if ( dataFilter )
|
||||
{
|
||||
dataFilter.addRules(
|
||||
{
|
||||
elements :
|
||||
{
|
||||
'cke:object' : function( element )
|
||||
{
|
||||
var attributes = element.attributes,
|
||||
classId = attributes.classid && String( attributes.classid ).toLowerCase();
|
||||
|
||||
if ( !classId && !isFlashEmbed( element ) )
|
||||
{
|
||||
// Look for the inner <embed>
|
||||
for ( var i = 0 ; i < element.children.length ; i++ )
|
||||
{
|
||||
if ( element.children[ i ].name == 'cke:embed' )
|
||||
{
|
||||
if ( !isFlashEmbed( element.children[ i ] ) )
|
||||
return null;
|
||||
|
||||
return createFakeElement( editor, element );
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return createFakeElement( editor, element );
|
||||
},
|
||||
|
||||
'cke:embed' : function( element )
|
||||
{
|
||||
if ( !isFlashEmbed( element ) )
|
||||
return null;
|
||||
|
||||
return createFakeElement( editor, element );
|
||||
}
|
||||
}
|
||||
},
|
||||
5);
|
||||
}
|
||||
},
|
||||
|
||||
requires : [ 'fakeobjects' ]
|
||||
});
|
||||
})();
|
||||
|
||||
CKEDITOR.tools.extend( CKEDITOR.config,
|
||||
{
|
||||
/**
|
||||
* Save as EMBED tag only. This tag is unrecommended.
|
||||
* @type Boolean
|
||||
* @default false
|
||||
*/
|
||||
flashEmbedTagOnly : false,
|
||||
|
||||
/**
|
||||
* Add EMBED tag as alternative: <object><embed></embed></object>
|
||||
* @type Boolean
|
||||
* @default false
|
||||
*/
|
||||
flashAddEmbedTag : true,
|
||||
|
||||
/**
|
||||
* Use embedTagOnly and addEmbedTag values on edit.
|
||||
* @type Boolean
|
||||
* @default false
|
||||
*/
|
||||
flashConvertOnEdit : false
|
||||
} );
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var flashFilenameRegex = /\.swf(?:$|\?)/i;
|
||||
|
||||
function isFlashEmbed( element )
|
||||
{
|
||||
var attributes = element.attributes;
|
||||
|
||||
return ( attributes.type == 'application/x-shockwave-flash' || flashFilenameRegex.test( attributes.src || '' ) );
|
||||
}
|
||||
|
||||
function createFakeElement( editor, realElement )
|
||||
{
|
||||
return editor.createFakeParserElement( realElement, 'cke_flash', 'flash', true );
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'flash',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'flash', new CKEDITOR.dialogCommand( 'flash' ) );
|
||||
editor.ui.addButton( 'Flash',
|
||||
{
|
||||
label : editor.lang.common.flash,
|
||||
command : 'flash'
|
||||
});
|
||||
CKEDITOR.dialog.add( 'flash', this.path + 'dialogs/flash.js' );
|
||||
|
||||
editor.addCss(
|
||||
'img.cke_flash' +
|
||||
'{' +
|
||||
'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
|
||||
'background-position: center center;' +
|
||||
'background-repeat: no-repeat;' +
|
||||
'border: 1px solid #a9a9a9;' +
|
||||
'width: 80px;' +
|
||||
'height: 80px;' +
|
||||
'}'
|
||||
);
|
||||
|
||||
// If the "menu" plugin is loaded, register the menu items.
|
||||
if ( editor.addMenuItems )
|
||||
{
|
||||
editor.addMenuItems(
|
||||
{
|
||||
flash :
|
||||
{
|
||||
label : editor.lang.flash.properties,
|
||||
command : 'flash',
|
||||
group : 'flash'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
editor.on( 'doubleclick', function( evt )
|
||||
{
|
||||
var element = evt.data.element;
|
||||
|
||||
if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'flash' )
|
||||
evt.data.dialog = 'flash';
|
||||
});
|
||||
|
||||
// If the "contextmenu" plugin is loaded, register the listeners.
|
||||
if ( editor.contextMenu )
|
||||
{
|
||||
editor.contextMenu.addListener( function( element, selection )
|
||||
{
|
||||
if ( element && element.is( 'img' ) && !element.isReadOnly()
|
||||
&& element.data( 'cke-real-element-type' ) == 'flash' )
|
||||
return { flash : CKEDITOR.TRISTATE_OFF };
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var dataProcessor = editor.dataProcessor,
|
||||
dataFilter = dataProcessor && dataProcessor.dataFilter;
|
||||
|
||||
if ( dataFilter )
|
||||
{
|
||||
dataFilter.addRules(
|
||||
{
|
||||
elements :
|
||||
{
|
||||
'cke:object' : function( element )
|
||||
{
|
||||
var attributes = element.attributes,
|
||||
classId = attributes.classid && String( attributes.classid ).toLowerCase();
|
||||
|
||||
if ( !classId && !isFlashEmbed( element ) )
|
||||
{
|
||||
// Look for the inner <embed>
|
||||
for ( var i = 0 ; i < element.children.length ; i++ )
|
||||
{
|
||||
if ( element.children[ i ].name == 'cke:embed' )
|
||||
{
|
||||
if ( !isFlashEmbed( element.children[ i ] ) )
|
||||
return null;
|
||||
|
||||
return createFakeElement( editor, element );
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return createFakeElement( editor, element );
|
||||
},
|
||||
|
||||
'cke:embed' : function( element )
|
||||
{
|
||||
if ( !isFlashEmbed( element ) )
|
||||
return null;
|
||||
|
||||
return createFakeElement( editor, element );
|
||||
}
|
||||
}
|
||||
},
|
||||
5);
|
||||
}
|
||||
},
|
||||
|
||||
requires : [ 'fakeobjects' ]
|
||||
});
|
||||
})();
|
||||
|
||||
CKEDITOR.tools.extend( CKEDITOR.config,
|
||||
{
|
||||
/**
|
||||
* Save as EMBED tag only. This tag is unrecommended.
|
||||
* @type Boolean
|
||||
* @default false
|
||||
*/
|
||||
flashEmbedTagOnly : false,
|
||||
|
||||
/**
|
||||
* Add EMBED tag as alternative: <object><embed></embed></object>
|
||||
* @type Boolean
|
||||
* @default false
|
||||
*/
|
||||
flashAddEmbedTag : true,
|
||||
|
||||
/**
|
||||
* Use embedTagOnly and addEmbedTag values on edit.
|
||||
* @type Boolean
|
||||
* @default false
|
||||
*/
|
||||
flashConvertOnEdit : false
|
||||
} );
|
||||
|
||||
@@ -1,476 +1,476 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'floatpanel',
|
||||
{
|
||||
requires : [ 'panel' ]
|
||||
});
|
||||
|
||||
(function()
|
||||
{
|
||||
var panels = {};
|
||||
var isShowing = false;
|
||||
|
||||
function getPanel( editor, doc, parentElement, definition, level )
|
||||
{
|
||||
// Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level]
|
||||
var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir,
|
||||
editor.uiColor || '', definition.css || '', level || '' );
|
||||
|
||||
var panel = panels[ key ];
|
||||
|
||||
if ( !panel )
|
||||
{
|
||||
panel = panels[ key ] = new CKEDITOR.ui.panel( doc, definition );
|
||||
panel.element = parentElement.append( CKEDITOR.dom.element.createFromHtml( panel.renderHtml( editor ), doc ) );
|
||||
|
||||
panel.element.setStyles(
|
||||
{
|
||||
display : 'none',
|
||||
position : 'absolute'
|
||||
});
|
||||
}
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass(
|
||||
{
|
||||
$ : function( editor, parentElement, definition, level )
|
||||
{
|
||||
definition.forceIFrame = 1;
|
||||
|
||||
var doc = parentElement.getDocument(),
|
||||
panel = getPanel( editor, doc, parentElement, definition, level || 0 ),
|
||||
element = panel.element,
|
||||
iframe = element.getFirst().getFirst();
|
||||
|
||||
// Disable native browser menu. (#4825)
|
||||
element.disableContextMenu();
|
||||
|
||||
this.element = element;
|
||||
|
||||
this._ =
|
||||
{
|
||||
editor : editor,
|
||||
// The panel that will be floating.
|
||||
panel : panel,
|
||||
parentElement : parentElement,
|
||||
definition : definition,
|
||||
document : doc,
|
||||
iframe : iframe,
|
||||
children : [],
|
||||
dir : editor.lang.dir
|
||||
};
|
||||
|
||||
editor.on( 'mode', function(){ this.hide(); }, this );
|
||||
},
|
||||
|
||||
proto :
|
||||
{
|
||||
addBlock : function( name, block )
|
||||
{
|
||||
return this._.panel.addBlock( name, block );
|
||||
},
|
||||
|
||||
addListBlock : function( name, multiSelect )
|
||||
{
|
||||
return this._.panel.addListBlock( name, multiSelect );
|
||||
},
|
||||
|
||||
getBlock : function( name )
|
||||
{
|
||||
return this._.panel.getBlock( name );
|
||||
},
|
||||
|
||||
/*
|
||||
corner (LTR):
|
||||
1 = top-left
|
||||
2 = top-right
|
||||
3 = bottom-right
|
||||
4 = bottom-left
|
||||
|
||||
corner (RTL):
|
||||
1 = top-right
|
||||
2 = top-left
|
||||
3 = bottom-left
|
||||
4 = bottom-right
|
||||
*/
|
||||
showBlock : function( name, offsetParent, corner, offsetX, offsetY )
|
||||
{
|
||||
var panel = this._.panel,
|
||||
block = panel.showBlock( name );
|
||||
|
||||
this.allowBlur( false );
|
||||
isShowing = 1;
|
||||
|
||||
// Record from where the focus is when open panel.
|
||||
this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement );
|
||||
|
||||
|
||||
var element = this.element,
|
||||
iframe = this._.iframe,
|
||||
definition = this._.definition,
|
||||
position = offsetParent.getDocumentPosition( element.getDocument() ),
|
||||
rtl = this._.dir == 'rtl';
|
||||
|
||||
var left = position.x + ( offsetX || 0 ),
|
||||
top = position.y + ( offsetY || 0 );
|
||||
|
||||
// Floating panels are off by (-1px, 0px) in RTL mode. (#3438)
|
||||
if ( rtl && ( corner == 1 || corner == 4 ) )
|
||||
left += offsetParent.$.offsetWidth;
|
||||
else if ( !rtl && ( corner == 2 || corner == 3 ) )
|
||||
left += offsetParent.$.offsetWidth - 1;
|
||||
|
||||
if ( corner == 3 || corner == 4 )
|
||||
top += offsetParent.$.offsetHeight - 1;
|
||||
|
||||
// Memorize offsetParent by it's ID.
|
||||
this._.panel._.offsetParentId = offsetParent.getId();
|
||||
|
||||
element.setStyles(
|
||||
{
|
||||
top : top + 'px',
|
||||
left: 0,
|
||||
display : ''
|
||||
});
|
||||
|
||||
// Don't use display or visibility style because we need to
|
||||
// calculate the rendering layout later and focus the element.
|
||||
element.setOpacity( 0 );
|
||||
|
||||
// To allow the context menu to decrease back their width
|
||||
element.getFirst().removeStyle( 'width' );
|
||||
|
||||
// Configure the IFrame blur event. Do that only once.
|
||||
if ( !this._.blurSet )
|
||||
{
|
||||
// Non IE prefer the event into a window object.
|
||||
var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow );
|
||||
|
||||
// With addEventListener compatible browsers, we must
|
||||
// useCapture when registering the focus/blur events to
|
||||
// guarantee they will be firing in all situations. (#3068, #3222 )
|
||||
CKEDITOR.event.useCapture = true;
|
||||
|
||||
focused.on( 'blur', function( ev )
|
||||
{
|
||||
if ( !this.allowBlur() )
|
||||
return;
|
||||
|
||||
// As we are using capture to register the listener,
|
||||
// the blur event may get fired even when focusing
|
||||
// inside the window itself, so we must ensure the
|
||||
// target is out of it.
|
||||
var target = ev.data.getTarget() ;
|
||||
if ( target.getName && target.getName() != 'iframe' )
|
||||
return;
|
||||
|
||||
if ( this.visible && !this._.activeChild && !isShowing )
|
||||
{
|
||||
// Panel close is caused by user's navigating away the focus, e.g. click outside the panel.
|
||||
// DO NOT restore focus in this case.
|
||||
delete this._.returnFocus;
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
this );
|
||||
|
||||
focused.on( 'focus', function()
|
||||
{
|
||||
this._.focused = true;
|
||||
this.hideChild();
|
||||
this.allowBlur( true );
|
||||
},
|
||||
this );
|
||||
|
||||
CKEDITOR.event.useCapture = false;
|
||||
|
||||
this._.blurSet = 1;
|
||||
}
|
||||
|
||||
panel.onEscape = CKEDITOR.tools.bind( function( keystroke )
|
||||
{
|
||||
if ( this.onEscape && this.onEscape( keystroke ) === false )
|
||||
return false;
|
||||
},
|
||||
this );
|
||||
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
var panelLoad = CKEDITOR.tools.bind( function ()
|
||||
{
|
||||
var target = element.getFirst();
|
||||
|
||||
if ( block.autoSize )
|
||||
{
|
||||
// We must adjust first the width or IE6 could include extra lines in the height computation
|
||||
var widthNode = block.element.$;
|
||||
|
||||
if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )
|
||||
widthNode = widthNode.parentNode;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
widthNode = widthNode.document.body;
|
||||
|
||||
var width = widthNode.scrollWidth;
|
||||
// Account for extra height needed due to IE quirks box model bug:
|
||||
// http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
|
||||
// (#3426)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && width > 0 )
|
||||
width += ( target.$.offsetWidth || 0 ) - ( target.$.clientWidth || 0 ) + 3;
|
||||
// A little extra at the end.
|
||||
// If not present, IE6 might break into the next line, but also it looks better this way
|
||||
width += 4 ;
|
||||
|
||||
target.setStyle( 'width', width + 'px' );
|
||||
|
||||
// IE doesn't compute the scrollWidth if a filter is applied previously
|
||||
block.element.addClass( 'cke_frameLoaded' );
|
||||
|
||||
var height = block.element.$.scrollHeight;
|
||||
|
||||
// Account for extra height needed due to IE quirks box model bug:
|
||||
// http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
|
||||
// (#3426)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 )
|
||||
height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 ) + 3;
|
||||
|
||||
target.setStyle( 'height', height + 'px' );
|
||||
|
||||
// Fix IE < 8 visibility.
|
||||
panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' );
|
||||
}
|
||||
else
|
||||
target.removeStyle( 'height' );
|
||||
|
||||
// Flip panel layout horizontally in RTL with known width.
|
||||
if ( rtl )
|
||||
left -= element.$.offsetWidth;
|
||||
|
||||
// Pop the style now for measurement.
|
||||
element.setStyle( 'left', left + 'px' );
|
||||
|
||||
/* panel layout smartly fit the viewport size. */
|
||||
var panelElement = panel.element,
|
||||
panelWindow = panelElement.getWindow(),
|
||||
rect = element.$.getBoundingClientRect(),
|
||||
viewportSize = panelWindow.getViewPaneSize();
|
||||
|
||||
// Compensation for browsers that dont support "width" and "height".
|
||||
var rectWidth = rect.width || rect.right - rect.left,
|
||||
rectHeight = rect.height || rect.bottom - rect.top;
|
||||
|
||||
// Check if default horizontal layout is impossible.
|
||||
var spaceAfter = rtl ? rect.right : viewportSize.width - rect.left,
|
||||
spaceBefore = rtl ? viewportSize.width - rect.right : rect.left;
|
||||
|
||||
if ( rtl )
|
||||
{
|
||||
if ( spaceAfter < rectWidth )
|
||||
{
|
||||
// Flip to show on right.
|
||||
if ( spaceBefore > rectWidth )
|
||||
left += rectWidth;
|
||||
// Align to window left.
|
||||
else if ( viewportSize.width > rectWidth )
|
||||
left = left - rect.left;
|
||||
// Align to window right, never cutting the panel at right.
|
||||
else
|
||||
left = left - rect.right + viewportSize.width;
|
||||
}
|
||||
}
|
||||
else if ( spaceAfter < rectWidth )
|
||||
{
|
||||
// Flip to show on left.
|
||||
if ( spaceBefore > rectWidth )
|
||||
left -= rectWidth;
|
||||
// Align to window right.
|
||||
else if ( viewportSize.width > rectWidth )
|
||||
left = left - rect.right + viewportSize.width;
|
||||
// Align to window left, never cutting the panel at left.
|
||||
else
|
||||
left = left - rect.left;
|
||||
}
|
||||
|
||||
|
||||
// Check if the default vertical layout is possible.
|
||||
var spaceBelow = viewportSize.height - rect.top,
|
||||
spaceAbove = rect.top;
|
||||
|
||||
if ( spaceBelow < rectHeight )
|
||||
{
|
||||
// Flip to show above.
|
||||
if ( spaceAbove > rectHeight )
|
||||
top -= rectHeight;
|
||||
// Align to window bottom.
|
||||
else if ( viewportSize.height > rectHeight )
|
||||
top = top - rect.bottom + viewportSize.height;
|
||||
// Align to top, never cutting the panel at top.
|
||||
else
|
||||
top = top - rect.top;
|
||||
}
|
||||
|
||||
// If IE is in RTL, we have troubles with absolute
|
||||
// position and horizontal scrolls. Here we have a
|
||||
// series of hacks to workaround it. (#6146)
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var offsetParent = new CKEDITOR.dom.element( element.$.offsetParent ),
|
||||
scrollParent = offsetParent;
|
||||
|
||||
// Quirks returns <body>, but standards returns <html>.
|
||||
if ( scrollParent.getName() == 'html' )
|
||||
scrollParent = scrollParent.getDocument().getBody();
|
||||
|
||||
if ( scrollParent.getComputedStyle( 'direction' ) == 'rtl' )
|
||||
{
|
||||
// For IE8, there is not much logic on this, but it works.
|
||||
if ( CKEDITOR.env.ie8Compat )
|
||||
left -= element.getDocument().getDocumentElement().$.scrollLeft * 2;
|
||||
else
|
||||
left -= ( offsetParent.$.scrollWidth - offsetParent.$.clientWidth );
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger the onHide event of the previously active panel to prevent
|
||||
// incorrect styles from being applied (#6170)
|
||||
var innerElement = element.getFirst(),
|
||||
activePanel;
|
||||
if ( ( activePanel = innerElement.getCustomData( 'activePanel' ) ) )
|
||||
activePanel.onHide && activePanel.onHide.call( this, 1 );
|
||||
innerElement.setCustomData( 'activePanel', this );
|
||||
|
||||
element.setStyles(
|
||||
{
|
||||
top : top + 'px',
|
||||
left : left + 'px'
|
||||
} );
|
||||
element.setOpacity( 1 );
|
||||
} , this );
|
||||
|
||||
panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad;
|
||||
|
||||
// Set the panel frame focus, so the blur event gets fired.
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
iframe.$.contentWindow.focus();
|
||||
// We need this get fired manually because of unfired focus() function.
|
||||
this.allowBlur( true );
|
||||
}, 0, this);
|
||||
}, CKEDITOR.env.air ? 200 : 0, this);
|
||||
this.visible = 1;
|
||||
|
||||
if ( this.onShow )
|
||||
this.onShow.call( this );
|
||||
|
||||
isShowing = 0;
|
||||
},
|
||||
|
||||
hide : function( returnFocus )
|
||||
{
|
||||
if ( this.visible && ( !this.onHide || this.onHide.call( this ) !== true ) )
|
||||
{
|
||||
this.hideChild();
|
||||
// Blur previously focused element. (#6671)
|
||||
CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur();
|
||||
this.element.setStyle( 'display', 'none' );
|
||||
this.visible = 0;
|
||||
this.element.getFirst().removeCustomData( 'activePanel' );
|
||||
|
||||
// Return focus properly. (#6247)
|
||||
var focusReturn = returnFocus !== false && this._.returnFocus;
|
||||
if ( focusReturn )
|
||||
{
|
||||
// Webkit requires focus moved out panel iframe first.
|
||||
if ( CKEDITOR.env.webkit && focusReturn.type )
|
||||
focusReturn.getWindow().$.focus();
|
||||
|
||||
focusReturn.focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
allowBlur : function( allow ) // Prevent editor from hiding the panel. #3222.
|
||||
{
|
||||
var panel = this._.panel;
|
||||
if ( allow != undefined )
|
||||
panel.allowBlur = allow;
|
||||
|
||||
return panel.allowBlur;
|
||||
},
|
||||
|
||||
showAsChild : function( panel, blockName, offsetParent, corner, offsetX, offsetY )
|
||||
{
|
||||
// Skip reshowing of child which is already visible.
|
||||
if ( this._.activeChild == panel && panel._.panel._.offsetParentId == offsetParent.getId() )
|
||||
return;
|
||||
|
||||
this.hideChild();
|
||||
|
||||
panel.onHide = CKEDITOR.tools.bind( function()
|
||||
{
|
||||
// Use a timeout, so we give time for this menu to get
|
||||
// potentially focused.
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
if ( !this._.focused )
|
||||
this.hide();
|
||||
},
|
||||
0, this );
|
||||
},
|
||||
this );
|
||||
|
||||
this._.activeChild = panel;
|
||||
this._.focused = false;
|
||||
|
||||
panel.showBlock( blockName, offsetParent, corner, offsetX, offsetY );
|
||||
|
||||
/* #3767 IE: Second level menu may not have borders */
|
||||
if ( CKEDITOR.env.ie7Compat || ( CKEDITOR.env.ie8 && CKEDITOR.env.ie6Compat ) )
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
panel.element.getChild( 0 ).$.style.cssText += '';
|
||||
}, 100);
|
||||
}
|
||||
},
|
||||
|
||||
hideChild : function()
|
||||
{
|
||||
var activeChild = this._.activeChild;
|
||||
|
||||
if ( activeChild )
|
||||
{
|
||||
delete activeChild.onHide;
|
||||
// Sub panels don't manage focus. (#7881)
|
||||
delete activeChild._.returnFocus;
|
||||
delete this._.activeChild;
|
||||
activeChild.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.on( 'instanceDestroyed', function()
|
||||
{
|
||||
var isLastInstance = CKEDITOR.tools.isEmpty( CKEDITOR.instances );
|
||||
|
||||
for ( var i in panels )
|
||||
{
|
||||
var panel = panels[ i ];
|
||||
// Safe to destroy it since there're no more instances.(#4241)
|
||||
if ( isLastInstance )
|
||||
panel.destroy();
|
||||
// Panel might be used by other instances, just hide them.(#4552)
|
||||
else
|
||||
panel.element.hide();
|
||||
}
|
||||
// Remove the registration.
|
||||
isLastInstance && ( panels = {} );
|
||||
|
||||
} );
|
||||
})();
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'floatpanel',
|
||||
{
|
||||
requires : [ 'panel' ]
|
||||
});
|
||||
|
||||
(function()
|
||||
{
|
||||
var panels = {};
|
||||
var isShowing = false;
|
||||
|
||||
function getPanel( editor, doc, parentElement, definition, level )
|
||||
{
|
||||
// Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level]
|
||||
var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir,
|
||||
editor.uiColor || '', definition.css || '', level || '' );
|
||||
|
||||
var panel = panels[ key ];
|
||||
|
||||
if ( !panel )
|
||||
{
|
||||
panel = panels[ key ] = new CKEDITOR.ui.panel( doc, definition );
|
||||
panel.element = parentElement.append( CKEDITOR.dom.element.createFromHtml( panel.renderHtml( editor ), doc ) );
|
||||
|
||||
panel.element.setStyles(
|
||||
{
|
||||
display : 'none',
|
||||
position : 'absolute'
|
||||
});
|
||||
}
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass(
|
||||
{
|
||||
$ : function( editor, parentElement, definition, level )
|
||||
{
|
||||
definition.forceIFrame = 1;
|
||||
|
||||
var doc = parentElement.getDocument(),
|
||||
panel = getPanel( editor, doc, parentElement, definition, level || 0 ),
|
||||
element = panel.element,
|
||||
iframe = element.getFirst().getFirst();
|
||||
|
||||
// Disable native browser menu. (#4825)
|
||||
element.disableContextMenu();
|
||||
|
||||
this.element = element;
|
||||
|
||||
this._ =
|
||||
{
|
||||
editor : editor,
|
||||
// The panel that will be floating.
|
||||
panel : panel,
|
||||
parentElement : parentElement,
|
||||
definition : definition,
|
||||
document : doc,
|
||||
iframe : iframe,
|
||||
children : [],
|
||||
dir : editor.lang.dir
|
||||
};
|
||||
|
||||
editor.on( 'mode', function(){ this.hide(); }, this );
|
||||
},
|
||||
|
||||
proto :
|
||||
{
|
||||
addBlock : function( name, block )
|
||||
{
|
||||
return this._.panel.addBlock( name, block );
|
||||
},
|
||||
|
||||
addListBlock : function( name, multiSelect )
|
||||
{
|
||||
return this._.panel.addListBlock( name, multiSelect );
|
||||
},
|
||||
|
||||
getBlock : function( name )
|
||||
{
|
||||
return this._.panel.getBlock( name );
|
||||
},
|
||||
|
||||
/*
|
||||
corner (LTR):
|
||||
1 = top-left
|
||||
2 = top-right
|
||||
3 = bottom-right
|
||||
4 = bottom-left
|
||||
|
||||
corner (RTL):
|
||||
1 = top-right
|
||||
2 = top-left
|
||||
3 = bottom-left
|
||||
4 = bottom-right
|
||||
*/
|
||||
showBlock : function( name, offsetParent, corner, offsetX, offsetY )
|
||||
{
|
||||
var panel = this._.panel,
|
||||
block = panel.showBlock( name );
|
||||
|
||||
this.allowBlur( false );
|
||||
isShowing = 1;
|
||||
|
||||
// Record from where the focus is when open panel.
|
||||
this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement );
|
||||
|
||||
|
||||
var element = this.element,
|
||||
iframe = this._.iframe,
|
||||
definition = this._.definition,
|
||||
position = offsetParent.getDocumentPosition( element.getDocument() ),
|
||||
rtl = this._.dir == 'rtl';
|
||||
|
||||
var left = position.x + ( offsetX || 0 ),
|
||||
top = position.y + ( offsetY || 0 );
|
||||
|
||||
// Floating panels are off by (-1px, 0px) in RTL mode. (#3438)
|
||||
if ( rtl && ( corner == 1 || corner == 4 ) )
|
||||
left += offsetParent.$.offsetWidth;
|
||||
else if ( !rtl && ( corner == 2 || corner == 3 ) )
|
||||
left += offsetParent.$.offsetWidth - 1;
|
||||
|
||||
if ( corner == 3 || corner == 4 )
|
||||
top += offsetParent.$.offsetHeight - 1;
|
||||
|
||||
// Memorize offsetParent by it's ID.
|
||||
this._.panel._.offsetParentId = offsetParent.getId();
|
||||
|
||||
element.setStyles(
|
||||
{
|
||||
top : top + 'px',
|
||||
left: 0,
|
||||
display : ''
|
||||
});
|
||||
|
||||
// Don't use display or visibility style because we need to
|
||||
// calculate the rendering layout later and focus the element.
|
||||
element.setOpacity( 0 );
|
||||
|
||||
// To allow the context menu to decrease back their width
|
||||
element.getFirst().removeStyle( 'width' );
|
||||
|
||||
// Configure the IFrame blur event. Do that only once.
|
||||
if ( !this._.blurSet )
|
||||
{
|
||||
// Non IE prefer the event into a window object.
|
||||
var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow );
|
||||
|
||||
// With addEventListener compatible browsers, we must
|
||||
// useCapture when registering the focus/blur events to
|
||||
// guarantee they will be firing in all situations. (#3068, #3222 )
|
||||
CKEDITOR.event.useCapture = true;
|
||||
|
||||
focused.on( 'blur', function( ev )
|
||||
{
|
||||
if ( !this.allowBlur() )
|
||||
return;
|
||||
|
||||
// As we are using capture to register the listener,
|
||||
// the blur event may get fired even when focusing
|
||||
// inside the window itself, so we must ensure the
|
||||
// target is out of it.
|
||||
var target = ev.data.getTarget() ;
|
||||
if ( target.getName && target.getName() != 'iframe' )
|
||||
return;
|
||||
|
||||
if ( this.visible && !this._.activeChild && !isShowing )
|
||||
{
|
||||
// Panel close is caused by user's navigating away the focus, e.g. click outside the panel.
|
||||
// DO NOT restore focus in this case.
|
||||
delete this._.returnFocus;
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
this );
|
||||
|
||||
focused.on( 'focus', function()
|
||||
{
|
||||
this._.focused = true;
|
||||
this.hideChild();
|
||||
this.allowBlur( true );
|
||||
},
|
||||
this );
|
||||
|
||||
CKEDITOR.event.useCapture = false;
|
||||
|
||||
this._.blurSet = 1;
|
||||
}
|
||||
|
||||
panel.onEscape = CKEDITOR.tools.bind( function( keystroke )
|
||||
{
|
||||
if ( this.onEscape && this.onEscape( keystroke ) === false )
|
||||
return false;
|
||||
},
|
||||
this );
|
||||
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
var panelLoad = CKEDITOR.tools.bind( function ()
|
||||
{
|
||||
var target = element.getFirst();
|
||||
|
||||
if ( block.autoSize )
|
||||
{
|
||||
// We must adjust first the width or IE6 could include extra lines in the height computation
|
||||
var widthNode = block.element.$;
|
||||
|
||||
if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )
|
||||
widthNode = widthNode.parentNode;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
widthNode = widthNode.document.body;
|
||||
|
||||
var width = widthNode.scrollWidth;
|
||||
// Account for extra height needed due to IE quirks box model bug:
|
||||
// http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
|
||||
// (#3426)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && width > 0 )
|
||||
width += ( target.$.offsetWidth || 0 ) - ( target.$.clientWidth || 0 ) + 3;
|
||||
// A little extra at the end.
|
||||
// If not present, IE6 might break into the next line, but also it looks better this way
|
||||
width += 4 ;
|
||||
|
||||
target.setStyle( 'width', width + 'px' );
|
||||
|
||||
// IE doesn't compute the scrollWidth if a filter is applied previously
|
||||
block.element.addClass( 'cke_frameLoaded' );
|
||||
|
||||
var height = block.element.$.scrollHeight;
|
||||
|
||||
// Account for extra height needed due to IE quirks box model bug:
|
||||
// http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
|
||||
// (#3426)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 )
|
||||
height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 ) + 3;
|
||||
|
||||
target.setStyle( 'height', height + 'px' );
|
||||
|
||||
// Fix IE < 8 visibility.
|
||||
panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' );
|
||||
}
|
||||
else
|
||||
target.removeStyle( 'height' );
|
||||
|
||||
// Flip panel layout horizontally in RTL with known width.
|
||||
if ( rtl )
|
||||
left -= element.$.offsetWidth;
|
||||
|
||||
// Pop the style now for measurement.
|
||||
element.setStyle( 'left', left + 'px' );
|
||||
|
||||
/* panel layout smartly fit the viewport size. */
|
||||
var panelElement = panel.element,
|
||||
panelWindow = panelElement.getWindow(),
|
||||
rect = element.$.getBoundingClientRect(),
|
||||
viewportSize = panelWindow.getViewPaneSize();
|
||||
|
||||
// Compensation for browsers that dont support "width" and "height".
|
||||
var rectWidth = rect.width || rect.right - rect.left,
|
||||
rectHeight = rect.height || rect.bottom - rect.top;
|
||||
|
||||
// Check if default horizontal layout is impossible.
|
||||
var spaceAfter = rtl ? rect.right : viewportSize.width - rect.left,
|
||||
spaceBefore = rtl ? viewportSize.width - rect.right : rect.left;
|
||||
|
||||
if ( rtl )
|
||||
{
|
||||
if ( spaceAfter < rectWidth )
|
||||
{
|
||||
// Flip to show on right.
|
||||
if ( spaceBefore > rectWidth )
|
||||
left += rectWidth;
|
||||
// Align to window left.
|
||||
else if ( viewportSize.width > rectWidth )
|
||||
left = left - rect.left;
|
||||
// Align to window right, never cutting the panel at right.
|
||||
else
|
||||
left = left - rect.right + viewportSize.width;
|
||||
}
|
||||
}
|
||||
else if ( spaceAfter < rectWidth )
|
||||
{
|
||||
// Flip to show on left.
|
||||
if ( spaceBefore > rectWidth )
|
||||
left -= rectWidth;
|
||||
// Align to window right.
|
||||
else if ( viewportSize.width > rectWidth )
|
||||
left = left - rect.right + viewportSize.width;
|
||||
// Align to window left, never cutting the panel at left.
|
||||
else
|
||||
left = left - rect.left;
|
||||
}
|
||||
|
||||
|
||||
// Check if the default vertical layout is possible.
|
||||
var spaceBelow = viewportSize.height - rect.top,
|
||||
spaceAbove = rect.top;
|
||||
|
||||
if ( spaceBelow < rectHeight )
|
||||
{
|
||||
// Flip to show above.
|
||||
if ( spaceAbove > rectHeight )
|
||||
top -= rectHeight;
|
||||
// Align to window bottom.
|
||||
else if ( viewportSize.height > rectHeight )
|
||||
top = top - rect.bottom + viewportSize.height;
|
||||
// Align to top, never cutting the panel at top.
|
||||
else
|
||||
top = top - rect.top;
|
||||
}
|
||||
|
||||
// If IE is in RTL, we have troubles with absolute
|
||||
// position and horizontal scrolls. Here we have a
|
||||
// series of hacks to workaround it. (#6146)
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var offsetParent = new CKEDITOR.dom.element( element.$.offsetParent ),
|
||||
scrollParent = offsetParent;
|
||||
|
||||
// Quirks returns <body>, but standards returns <html>.
|
||||
if ( scrollParent.getName() == 'html' )
|
||||
scrollParent = scrollParent.getDocument().getBody();
|
||||
|
||||
if ( scrollParent.getComputedStyle( 'direction' ) == 'rtl' )
|
||||
{
|
||||
// For IE8, there is not much logic on this, but it works.
|
||||
if ( CKEDITOR.env.ie8Compat )
|
||||
left -= element.getDocument().getDocumentElement().$.scrollLeft * 2;
|
||||
else
|
||||
left -= ( offsetParent.$.scrollWidth - offsetParent.$.clientWidth );
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger the onHide event of the previously active panel to prevent
|
||||
// incorrect styles from being applied (#6170)
|
||||
var innerElement = element.getFirst(),
|
||||
activePanel;
|
||||
if ( ( activePanel = innerElement.getCustomData( 'activePanel' ) ) )
|
||||
activePanel.onHide && activePanel.onHide.call( this, 1 );
|
||||
innerElement.setCustomData( 'activePanel', this );
|
||||
|
||||
element.setStyles(
|
||||
{
|
||||
top : top + 'px',
|
||||
left : left + 'px'
|
||||
} );
|
||||
element.setOpacity( 1 );
|
||||
} , this );
|
||||
|
||||
panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad;
|
||||
|
||||
// Set the panel frame focus, so the blur event gets fired.
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
iframe.$.contentWindow.focus();
|
||||
// We need this get fired manually because of unfired focus() function.
|
||||
this.allowBlur( true );
|
||||
}, 0, this);
|
||||
}, CKEDITOR.env.air ? 200 : 0, this);
|
||||
this.visible = 1;
|
||||
|
||||
if ( this.onShow )
|
||||
this.onShow.call( this );
|
||||
|
||||
isShowing = 0;
|
||||
},
|
||||
|
||||
hide : function( returnFocus )
|
||||
{
|
||||
if ( this.visible && ( !this.onHide || this.onHide.call( this ) !== true ) )
|
||||
{
|
||||
this.hideChild();
|
||||
// Blur previously focused element. (#6671)
|
||||
CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur();
|
||||
this.element.setStyle( 'display', 'none' );
|
||||
this.visible = 0;
|
||||
this.element.getFirst().removeCustomData( 'activePanel' );
|
||||
|
||||
// Return focus properly. (#6247)
|
||||
var focusReturn = returnFocus !== false && this._.returnFocus;
|
||||
if ( focusReturn )
|
||||
{
|
||||
// Webkit requires focus moved out panel iframe first.
|
||||
if ( CKEDITOR.env.webkit && focusReturn.type )
|
||||
focusReturn.getWindow().$.focus();
|
||||
|
||||
focusReturn.focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
allowBlur : function( allow ) // Prevent editor from hiding the panel. #3222.
|
||||
{
|
||||
var panel = this._.panel;
|
||||
if ( allow != undefined )
|
||||
panel.allowBlur = allow;
|
||||
|
||||
return panel.allowBlur;
|
||||
},
|
||||
|
||||
showAsChild : function( panel, blockName, offsetParent, corner, offsetX, offsetY )
|
||||
{
|
||||
// Skip reshowing of child which is already visible.
|
||||
if ( this._.activeChild == panel && panel._.panel._.offsetParentId == offsetParent.getId() )
|
||||
return;
|
||||
|
||||
this.hideChild();
|
||||
|
||||
panel.onHide = CKEDITOR.tools.bind( function()
|
||||
{
|
||||
// Use a timeout, so we give time for this menu to get
|
||||
// potentially focused.
|
||||
CKEDITOR.tools.setTimeout( function()
|
||||
{
|
||||
if ( !this._.focused )
|
||||
this.hide();
|
||||
},
|
||||
0, this );
|
||||
},
|
||||
this );
|
||||
|
||||
this._.activeChild = panel;
|
||||
this._.focused = false;
|
||||
|
||||
panel.showBlock( blockName, offsetParent, corner, offsetX, offsetY );
|
||||
|
||||
/* #3767 IE: Second level menu may not have borders */
|
||||
if ( CKEDITOR.env.ie7Compat || ( CKEDITOR.env.ie8 && CKEDITOR.env.ie6Compat ) )
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
panel.element.getChild( 0 ).$.style.cssText += '';
|
||||
}, 100);
|
||||
}
|
||||
},
|
||||
|
||||
hideChild : function()
|
||||
{
|
||||
var activeChild = this._.activeChild;
|
||||
|
||||
if ( activeChild )
|
||||
{
|
||||
delete activeChild.onHide;
|
||||
// Sub panels don't manage focus. (#7881)
|
||||
delete activeChild._.returnFocus;
|
||||
delete this._.activeChild;
|
||||
activeChild.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.on( 'instanceDestroyed', function()
|
||||
{
|
||||
var isLastInstance = CKEDITOR.tools.isEmpty( CKEDITOR.instances );
|
||||
|
||||
for ( var i in panels )
|
||||
{
|
||||
var panel = panels[ i ];
|
||||
// Safe to destroy it since there're no more instances.(#4241)
|
||||
if ( isLastInstance )
|
||||
panel.destroy();
|
||||
// Panel might be used by other instances, just hide them.(#4552)
|
||||
else
|
||||
panel.element.hide();
|
||||
}
|
||||
// Remove the registration.
|
||||
isLastInstance && ( panels = {} );
|
||||
|
||||
} );
|
||||
})();
|
||||
|
||||
@@ -1,234 +1,234 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
function addCombo( editor, comboName, styleType, lang, entries, defaultLabel, styleDefinition )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
// Gets the list of fonts from the settings.
|
||||
var names = entries.split( ';' ),
|
||||
values = [];
|
||||
|
||||
// Create style objects for all fonts.
|
||||
var styles = {};
|
||||
for ( var i = 0 ; i < names.length ; i++ )
|
||||
{
|
||||
var parts = names[ i ];
|
||||
|
||||
if ( parts )
|
||||
{
|
||||
parts = parts.split( '/' );
|
||||
|
||||
var vars = {},
|
||||
name = names[ i ] = parts[ 0 ];
|
||||
|
||||
vars[ styleType ] = values[ i ] = parts[ 1 ] || name;
|
||||
|
||||
styles[ name ] = new CKEDITOR.style( styleDefinition, vars );
|
||||
styles[ name ]._.definition.name = name;
|
||||
}
|
||||
else
|
||||
names.splice( i--, 1 );
|
||||
}
|
||||
|
||||
editor.ui.addRichCombo( comboName,
|
||||
{
|
||||
label : lang.label,
|
||||
title : lang.panelTitle,
|
||||
className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ),
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css.concat( config.contentsCss ),
|
||||
multiSelect : false,
|
||||
attributes : { 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
this.startGroup( lang.panelTitle );
|
||||
|
||||
for ( var i = 0 ; i < names.length ; i++ )
|
||||
{
|
||||
var name = names[ i ];
|
||||
|
||||
// Add the tag entry to the panel list.
|
||||
this.add( name, styles[ name ].buildPreview(), name );
|
||||
}
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
var style = styles[ value ];
|
||||
|
||||
if ( this.getValue() == value )
|
||||
style.remove( editor.document );
|
||||
else
|
||||
style.apply( editor.document );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
},
|
||||
|
||||
onRender : function()
|
||||
{
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var currentValue = this.getValue();
|
||||
|
||||
var elementPath = ev.data.path,
|
||||
elements = elementPath.elements;
|
||||
|
||||
// For each element into the elements path.
|
||||
for ( var i = 0, element ; i < elements.length ; i++ )
|
||||
{
|
||||
element = elements[i];
|
||||
|
||||
// Check if the element is removable by any of
|
||||
// the styles.
|
||||
for ( var value in styles )
|
||||
{
|
||||
if ( styles[ value ].checkElementMatch( element, true ) )
|
||||
{
|
||||
if ( value != currentValue )
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no styles match, just empty it.
|
||||
this.setValue( '', defaultLabel );
|
||||
},
|
||||
this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'font',
|
||||
{
|
||||
requires : [ 'richcombo', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
addCombo( editor, 'Font', 'family', editor.lang.font, config.font_names, config.font_defaultLabel, config.font_style );
|
||||
addCombo( editor, 'FontSize', 'size', editor.lang.fontSize, config.fontSize_sizes, config.fontSize_defaultLabel, config.fontSize_style );
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* The list of fonts names to be displayed in the Font combo in the toolbar.
|
||||
* Entries are separated by semi-colons (;), while it's possible to have more
|
||||
* than one font for each entry, in the HTML way (separated by comma).
|
||||
*
|
||||
* A display name may be optionally defined by prefixing the entries with the
|
||||
* name and the slash character. For example, "Arial/Arial, Helvetica, sans-serif"
|
||||
* will be displayed as "Arial" in the list, but will be outputted as
|
||||
* "Arial, Helvetica, sans-serif".
|
||||
* @type String
|
||||
* @example
|
||||
* config.font_names =
|
||||
* 'Arial/Arial, Helvetica, sans-serif;' +
|
||||
* 'Times New Roman/Times New Roman, Times, serif;' +
|
||||
* 'Verdana';
|
||||
* @example
|
||||
* config.font_names = 'Arial;Times New Roman;Verdana';
|
||||
*/
|
||||
CKEDITOR.config.font_names =
|
||||
'Arial/Arial, Helvetica, sans-serif;' +
|
||||
'Comic Sans MS/Comic Sans MS, cursive;' +
|
||||
'Courier New/Courier New, Courier, monospace;' +
|
||||
'Georgia/Georgia, serif;' +
|
||||
'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
|
||||
'Tahoma/Tahoma, Geneva, sans-serif;' +
|
||||
'Times New Roman/Times New Roman, Times, serif;' +
|
||||
'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
|
||||
'Verdana/Verdana, Geneva, sans-serif';
|
||||
|
||||
/**
|
||||
* The text to be displayed in the Font combo is none of the available values
|
||||
* matches the current cursor position or text selection.
|
||||
* @type String
|
||||
* @example
|
||||
* // If the default site font is Arial, we may making it more explicit to the end user.
|
||||
* config.font_defaultLabel = 'Arial';
|
||||
*/
|
||||
CKEDITOR.config.font_defaultLabel = '';
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the font in the text.
|
||||
* @type Object
|
||||
* @example
|
||||
* // This is actually the default value for it.
|
||||
* config.font_style =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'font-family' : '#(family)' },
|
||||
* overrides : [ { element : 'font', attributes : { 'face' : null } } ]
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.font_style =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'font-family' : '#(family)' },
|
||||
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
|
||||
};
|
||||
|
||||
/**
|
||||
* The list of fonts size to be displayed in the Font Size combo in the
|
||||
* toolbar. Entries are separated by semi-colons (;).
|
||||
*
|
||||
* Any kind of "CSS like" size can be used, like "12px", "2.3em", "130%",
|
||||
* "larger" or "x-small".
|
||||
*
|
||||
* A display name may be optionally defined by prefixing the entries with the
|
||||
* name and the slash character. For example, "Bigger Font/14px" will be
|
||||
* displayed as "Bigger Font" in the list, but will be outputted as "14px".
|
||||
* @type String
|
||||
* @default '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'
|
||||
* @example
|
||||
* config.fontSize_sizes = '16/16px;24/24px;48/48px;';
|
||||
* @example
|
||||
* config.fontSize_sizes = '12px;2.3em;130%;larger;x-small';
|
||||
* @example
|
||||
* config.fontSize_sizes = '12 Pixels/12px;Big/2.3em;30 Percent More/130%;Bigger/larger;Very Small/x-small';
|
||||
*/
|
||||
CKEDITOR.config.fontSize_sizes =
|
||||
'8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
|
||||
|
||||
/**
|
||||
* The text to be displayed in the Font Size combo is none of the available
|
||||
* values matches the current cursor position or text selection.
|
||||
* @type String
|
||||
* @example
|
||||
* // If the default site font size is 12px, we may making it more explicit to the end user.
|
||||
* config.fontSize_defaultLabel = '12px';
|
||||
*/
|
||||
CKEDITOR.config.fontSize_defaultLabel = '';
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the font size in the text.
|
||||
* @type Object
|
||||
* @example
|
||||
* // This is actually the default value for it.
|
||||
* config.fontSize_style =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'font-size' : '#(size)' },
|
||||
* overrides : [ { element : 'font', attributes : { 'size' : null } } ]
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.fontSize_style =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'font-size' : '#(size)' },
|
||||
overrides : [ { element : 'font', attributes : { 'size' : null } } ]
|
||||
};
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
function addCombo( editor, comboName, styleType, lang, entries, defaultLabel, styleDefinition )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
// Gets the list of fonts from the settings.
|
||||
var names = entries.split( ';' ),
|
||||
values = [];
|
||||
|
||||
// Create style objects for all fonts.
|
||||
var styles = {};
|
||||
for ( var i = 0 ; i < names.length ; i++ )
|
||||
{
|
||||
var parts = names[ i ];
|
||||
|
||||
if ( parts )
|
||||
{
|
||||
parts = parts.split( '/' );
|
||||
|
||||
var vars = {},
|
||||
name = names[ i ] = parts[ 0 ];
|
||||
|
||||
vars[ styleType ] = values[ i ] = parts[ 1 ] || name;
|
||||
|
||||
styles[ name ] = new CKEDITOR.style( styleDefinition, vars );
|
||||
styles[ name ]._.definition.name = name;
|
||||
}
|
||||
else
|
||||
names.splice( i--, 1 );
|
||||
}
|
||||
|
||||
editor.ui.addRichCombo( comboName,
|
||||
{
|
||||
label : lang.label,
|
||||
title : lang.panelTitle,
|
||||
className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ),
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css.concat( config.contentsCss ),
|
||||
multiSelect : false,
|
||||
attributes : { 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
this.startGroup( lang.panelTitle );
|
||||
|
||||
for ( var i = 0 ; i < names.length ; i++ )
|
||||
{
|
||||
var name = names[ i ];
|
||||
|
||||
// Add the tag entry to the panel list.
|
||||
this.add( name, styles[ name ].buildPreview(), name );
|
||||
}
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
var style = styles[ value ];
|
||||
|
||||
if ( this.getValue() == value )
|
||||
style.remove( editor.document );
|
||||
else
|
||||
style.apply( editor.document );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
},
|
||||
|
||||
onRender : function()
|
||||
{
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var currentValue = this.getValue();
|
||||
|
||||
var elementPath = ev.data.path,
|
||||
elements = elementPath.elements;
|
||||
|
||||
// For each element into the elements path.
|
||||
for ( var i = 0, element ; i < elements.length ; i++ )
|
||||
{
|
||||
element = elements[i];
|
||||
|
||||
// Check if the element is removable by any of
|
||||
// the styles.
|
||||
for ( var value in styles )
|
||||
{
|
||||
if ( styles[ value ].checkElementMatch( element, true ) )
|
||||
{
|
||||
if ( value != currentValue )
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no styles match, just empty it.
|
||||
this.setValue( '', defaultLabel );
|
||||
},
|
||||
this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'font',
|
||||
{
|
||||
requires : [ 'richcombo', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
addCombo( editor, 'Font', 'family', editor.lang.font, config.font_names, config.font_defaultLabel, config.font_style );
|
||||
addCombo( editor, 'FontSize', 'size', editor.lang.fontSize, config.fontSize_sizes, config.fontSize_defaultLabel, config.fontSize_style );
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* The list of fonts names to be displayed in the Font combo in the toolbar.
|
||||
* Entries are separated by semi-colons (;), while it's possible to have more
|
||||
* than one font for each entry, in the HTML way (separated by comma).
|
||||
*
|
||||
* A display name may be optionally defined by prefixing the entries with the
|
||||
* name and the slash character. For example, "Arial/Arial, Helvetica, sans-serif"
|
||||
* will be displayed as "Arial" in the list, but will be outputted as
|
||||
* "Arial, Helvetica, sans-serif".
|
||||
* @type String
|
||||
* @example
|
||||
* config.font_names =
|
||||
* 'Arial/Arial, Helvetica, sans-serif;' +
|
||||
* 'Times New Roman/Times New Roman, Times, serif;' +
|
||||
* 'Verdana';
|
||||
* @example
|
||||
* config.font_names = 'Arial;Times New Roman;Verdana';
|
||||
*/
|
||||
CKEDITOR.config.font_names =
|
||||
'Arial/Arial, Helvetica, sans-serif;' +
|
||||
'Comic Sans MS/Comic Sans MS, cursive;' +
|
||||
'Courier New/Courier New, Courier, monospace;' +
|
||||
'Georgia/Georgia, serif;' +
|
||||
'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
|
||||
'Tahoma/Tahoma, Geneva, sans-serif;' +
|
||||
'Times New Roman/Times New Roman, Times, serif;' +
|
||||
'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
|
||||
'Verdana/Verdana, Geneva, sans-serif';
|
||||
|
||||
/**
|
||||
* The text to be displayed in the Font combo is none of the available values
|
||||
* matches the current cursor position or text selection.
|
||||
* @type String
|
||||
* @example
|
||||
* // If the default site font is Arial, we may making it more explicit to the end user.
|
||||
* config.font_defaultLabel = 'Arial';
|
||||
*/
|
||||
CKEDITOR.config.font_defaultLabel = '';
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the font in the text.
|
||||
* @type Object
|
||||
* @example
|
||||
* // This is actually the default value for it.
|
||||
* config.font_style =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'font-family' : '#(family)' },
|
||||
* overrides : [ { element : 'font', attributes : { 'face' : null } } ]
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.font_style =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'font-family' : '#(family)' },
|
||||
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
|
||||
};
|
||||
|
||||
/**
|
||||
* The list of fonts size to be displayed in the Font Size combo in the
|
||||
* toolbar. Entries are separated by semi-colons (;).
|
||||
*
|
||||
* Any kind of "CSS like" size can be used, like "12px", "2.3em", "130%",
|
||||
* "larger" or "x-small".
|
||||
*
|
||||
* A display name may be optionally defined by prefixing the entries with the
|
||||
* name and the slash character. For example, "Bigger Font/14px" will be
|
||||
* displayed as "Bigger Font" in the list, but will be outputted as "14px".
|
||||
* @type String
|
||||
* @default '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'
|
||||
* @example
|
||||
* config.fontSize_sizes = '16/16px;24/24px;48/48px;';
|
||||
* @example
|
||||
* config.fontSize_sizes = '12px;2.3em;130%;larger;x-small';
|
||||
* @example
|
||||
* config.fontSize_sizes = '12 Pixels/12px;Big/2.3em;30 Percent More/130%;Bigger/larger;Very Small/x-small';
|
||||
*/
|
||||
CKEDITOR.config.fontSize_sizes =
|
||||
'8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
|
||||
|
||||
/**
|
||||
* The text to be displayed in the Font Size combo is none of the available
|
||||
* values matches the current cursor position or text selection.
|
||||
* @type String
|
||||
* @example
|
||||
* // If the default site font size is 12px, we may making it more explicit to the end user.
|
||||
* config.fontSize_defaultLabel = '12px';
|
||||
*/
|
||||
CKEDITOR.config.fontSize_defaultLabel = '';
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the font size in the text.
|
||||
* @type Object
|
||||
* @example
|
||||
* // This is actually the default value for it.
|
||||
* config.fontSize_style =
|
||||
* {
|
||||
* element : 'span',
|
||||
* styles : { 'font-size' : '#(size)' },
|
||||
* overrides : [ { element : 'font', attributes : { 'size' : null } } ]
|
||||
* };
|
||||
*/
|
||||
CKEDITOR.config.fontSize_style =
|
||||
{
|
||||
element : 'span',
|
||||
styles : { 'font-size' : '#(size)' },
|
||||
overrides : [ { element : 'font', attributes : { 'size' : null } } ]
|
||||
};
|
||||
|
||||
@@ -1,197 +1,197 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'format',
|
||||
{
|
||||
requires : [ 'richcombo', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.format;
|
||||
|
||||
// Gets the list of tags from the settings.
|
||||
var tags = config.format_tags.split( ';' );
|
||||
|
||||
// Create style objects for all defined styles.
|
||||
var styles = {};
|
||||
for ( var i = 0 ; i < tags.length ; i++ )
|
||||
{
|
||||
var tag = tags[ i ];
|
||||
styles[ tag ] = new CKEDITOR.style( config[ 'format_' + tag ] );
|
||||
styles[ tag ]._.enterMode = editor.config.enterMode;
|
||||
}
|
||||
|
||||
editor.ui.addRichCombo( 'Format',
|
||||
{
|
||||
label : lang.label,
|
||||
title : lang.panelTitle,
|
||||
className : 'cke_format',
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css.concat( config.contentsCss ),
|
||||
multiSelect : false,
|
||||
attributes : { 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
this.startGroup( lang.panelTitle );
|
||||
|
||||
for ( var tag in styles )
|
||||
{
|
||||
var label = lang[ 'tag_' + tag ];
|
||||
|
||||
// Add the tag entry to the panel list.
|
||||
this.add( tag, styles[tag].buildPreview( label ), label );
|
||||
}
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
var style = styles[ value ],
|
||||
elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() );
|
||||
|
||||
style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document );
|
||||
|
||||
// Save the undo snapshot after all changes are affected. (#4899)
|
||||
setTimeout( function()
|
||||
{
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}, 0 );
|
||||
},
|
||||
|
||||
onRender : function()
|
||||
{
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var currentTag = this.getValue();
|
||||
|
||||
var elementPath = ev.data.path;
|
||||
|
||||
for ( var tag in styles )
|
||||
{
|
||||
if ( styles[ tag ].checkActive( elementPath ) )
|
||||
{
|
||||
if ( tag != currentTag )
|
||||
this.setValue( tag, editor.lang.format[ 'tag_' + tag ] );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If no styles match, just empty it.
|
||||
this.setValue( '' );
|
||||
},
|
||||
this);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* A list of semi colon separated style names (by default tags) representing
|
||||
* the style definition for each entry to be displayed in the Format combo in
|
||||
* the toolbar. Each entry must have its relative definition configuration in a
|
||||
* setting named "format_(tagName)". For example, the "p" entry has its
|
||||
* definition taken from config.format_p.
|
||||
* @type String
|
||||
* @default 'p;h1;h2;h3;h4;h5;h6;pre;address;div'
|
||||
* @example
|
||||
* config.format_tags = 'p;h2;h3;pre'
|
||||
*/
|
||||
CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Normal" format.
|
||||
* @type Object
|
||||
* @default { element : 'p' }
|
||||
* @example
|
||||
* config.format_p = { element : 'p', attributes : { 'class' : 'normalPara' } };
|
||||
*/
|
||||
CKEDITOR.config.format_p = { element : 'p' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Normal (DIV)" format.
|
||||
* @type Object
|
||||
* @default { element : 'div' }
|
||||
* @example
|
||||
* config.format_div = { element : 'div', attributes : { 'class' : 'normalDiv' } };
|
||||
*/
|
||||
CKEDITOR.config.format_div = { element : 'div' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Formatted" format.
|
||||
* @type Object
|
||||
* @default { element : 'pre' }
|
||||
* @example
|
||||
* config.format_pre = { element : 'pre', attributes : { 'class' : 'code' } };
|
||||
*/
|
||||
CKEDITOR.config.format_pre = { element : 'pre' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Address" format.
|
||||
* @type Object
|
||||
* @default { element : 'address' }
|
||||
* @example
|
||||
* config.format_address = { element : 'address', attributes : { 'class' : 'styledAddress' } };
|
||||
*/
|
||||
CKEDITOR.config.format_address = { element : 'address' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h1' }
|
||||
* @example
|
||||
* config.format_h1 = { element : 'h1', attributes : { 'class' : 'contentTitle1' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h1 = { element : 'h1' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h2' }
|
||||
* @example
|
||||
* config.format_h2 = { element : 'h2', attributes : { 'class' : 'contentTitle2' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h2 = { element : 'h2' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h3' }
|
||||
* @example
|
||||
* config.format_h3 = { element : 'h3', attributes : { 'class' : 'contentTitle3' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h3 = { element : 'h3' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h4' }
|
||||
* @example
|
||||
* config.format_h4 = { element : 'h4', attributes : { 'class' : 'contentTitle4' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h4 = { element : 'h4' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h5' }
|
||||
* @example
|
||||
* config.format_h5 = { element : 'h5', attributes : { 'class' : 'contentTitle5' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h5 = { element : 'h5' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h6' }
|
||||
* @example
|
||||
* config.format_h6 = { element : 'h6', attributes : { 'class' : 'contentTitle6' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h6 = { element : 'h6' };
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'format',
|
||||
{
|
||||
requires : [ 'richcombo', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.format;
|
||||
|
||||
// Gets the list of tags from the settings.
|
||||
var tags = config.format_tags.split( ';' );
|
||||
|
||||
// Create style objects for all defined styles.
|
||||
var styles = {};
|
||||
for ( var i = 0 ; i < tags.length ; i++ )
|
||||
{
|
||||
var tag = tags[ i ];
|
||||
styles[ tag ] = new CKEDITOR.style( config[ 'format_' + tag ] );
|
||||
styles[ tag ]._.enterMode = editor.config.enterMode;
|
||||
}
|
||||
|
||||
editor.ui.addRichCombo( 'Format',
|
||||
{
|
||||
label : lang.label,
|
||||
title : lang.panelTitle,
|
||||
className : 'cke_format',
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css.concat( config.contentsCss ),
|
||||
multiSelect : false,
|
||||
attributes : { 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
this.startGroup( lang.panelTitle );
|
||||
|
||||
for ( var tag in styles )
|
||||
{
|
||||
var label = lang[ 'tag_' + tag ];
|
||||
|
||||
// Add the tag entry to the panel list.
|
||||
this.add( tag, styles[tag].buildPreview( label ), label );
|
||||
}
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
var style = styles[ value ],
|
||||
elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() );
|
||||
|
||||
style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document );
|
||||
|
||||
// Save the undo snapshot after all changes are affected. (#4899)
|
||||
setTimeout( function()
|
||||
{
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}, 0 );
|
||||
},
|
||||
|
||||
onRender : function()
|
||||
{
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var currentTag = this.getValue();
|
||||
|
||||
var elementPath = ev.data.path;
|
||||
|
||||
for ( var tag in styles )
|
||||
{
|
||||
if ( styles[ tag ].checkActive( elementPath ) )
|
||||
{
|
||||
if ( tag != currentTag )
|
||||
this.setValue( tag, editor.lang.format[ 'tag_' + tag ] );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If no styles match, just empty it.
|
||||
this.setValue( '' );
|
||||
},
|
||||
this);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* A list of semi colon separated style names (by default tags) representing
|
||||
* the style definition for each entry to be displayed in the Format combo in
|
||||
* the toolbar. Each entry must have its relative definition configuration in a
|
||||
* setting named "format_(tagName)". For example, the "p" entry has its
|
||||
* definition taken from config.format_p.
|
||||
* @type String
|
||||
* @default 'p;h1;h2;h3;h4;h5;h6;pre;address;div'
|
||||
* @example
|
||||
* config.format_tags = 'p;h2;h3;pre'
|
||||
*/
|
||||
CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Normal" format.
|
||||
* @type Object
|
||||
* @default { element : 'p' }
|
||||
* @example
|
||||
* config.format_p = { element : 'p', attributes : { 'class' : 'normalPara' } };
|
||||
*/
|
||||
CKEDITOR.config.format_p = { element : 'p' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Normal (DIV)" format.
|
||||
* @type Object
|
||||
* @default { element : 'div' }
|
||||
* @example
|
||||
* config.format_div = { element : 'div', attributes : { 'class' : 'normalDiv' } };
|
||||
*/
|
||||
CKEDITOR.config.format_div = { element : 'div' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Formatted" format.
|
||||
* @type Object
|
||||
* @default { element : 'pre' }
|
||||
* @example
|
||||
* config.format_pre = { element : 'pre', attributes : { 'class' : 'code' } };
|
||||
*/
|
||||
CKEDITOR.config.format_pre = { element : 'pre' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Address" format.
|
||||
* @type Object
|
||||
* @default { element : 'address' }
|
||||
* @example
|
||||
* config.format_address = { element : 'address', attributes : { 'class' : 'styledAddress' } };
|
||||
*/
|
||||
CKEDITOR.config.format_address = { element : 'address' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h1' }
|
||||
* @example
|
||||
* config.format_h1 = { element : 'h1', attributes : { 'class' : 'contentTitle1' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h1 = { element : 'h1' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h2' }
|
||||
* @example
|
||||
* config.format_h2 = { element : 'h2', attributes : { 'class' : 'contentTitle2' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h2 = { element : 'h2' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h3' }
|
||||
* @example
|
||||
* config.format_h3 = { element : 'h3', attributes : { 'class' : 'contentTitle3' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h3 = { element : 'h3' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h4' }
|
||||
* @example
|
||||
* config.format_h4 = { element : 'h4', attributes : { 'class' : 'contentTitle4' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h4 = { element : 'h4' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h5' }
|
||||
* @example
|
||||
* config.format_h5 = { element : 'h5', attributes : { 'class' : 'contentTitle5' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h5 = { element : 'h5' };
|
||||
|
||||
/**
|
||||
* The style definition to be used to apply the "Heading 1" format.
|
||||
* @type Object
|
||||
* @default { element : 'h6' }
|
||||
* @example
|
||||
* config.format_h6 = { element : 'h6', attributes : { 'class' : 'contentTitle6' } };
|
||||
*/
|
||||
CKEDITOR.config.format_h6 = { element : 'h6' };
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'button', function( editor )
|
||||
{
|
||||
function commitAttributes( element )
|
||||
{
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
{
|
||||
element.attributes[ this.id ] = val;
|
||||
if ( this.id == 'name' )
|
||||
element.attributes[ 'data-cke-saved-name' ] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete element.attributes[ this.id ];
|
||||
if ( this.id == 'name' )
|
||||
delete element.attributes[ 'data-cke-saved-name' ];
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.button.title,
|
||||
minWidth : 350,
|
||||
minHeight : 150,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.button;
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.is( 'input' ) )
|
||||
{
|
||||
var type = element.getAttribute( 'type' );
|
||||
if ( type in { button:1, reset:1, submit:1 } )
|
||||
{
|
||||
this.button = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = this.button,
|
||||
isInsertMode = !element;
|
||||
|
||||
var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ]
|
||||
: new CKEDITOR.htmlParser.element( 'input' );
|
||||
this.commitContent( fake );
|
||||
|
||||
var writer = new CKEDITOR.htmlParser.basicWriter();
|
||||
fake.writeHtml( writer );
|
||||
var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document );
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( newElement );
|
||||
else
|
||||
{
|
||||
newElement.replace( element );
|
||||
editor.getSelection().selectElement( newElement );
|
||||
}
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.button.title,
|
||||
title : editor.lang.button.title,
|
||||
elements : [
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.button.text,
|
||||
accessKey : 'V',
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
},
|
||||
{
|
||||
id : 'type',
|
||||
type : 'select',
|
||||
label : editor.lang.button.type,
|
||||
'default' : 'button',
|
||||
accessKey : 'T',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.button.typeBtn, 'button' ],
|
||||
[ editor.lang.button.typeSbm, 'submit' ],
|
||||
[ editor.lang.button.typeRst, 'reset' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'type' ) || '' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'button', function( editor )
|
||||
{
|
||||
function commitAttributes( element )
|
||||
{
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
{
|
||||
element.attributes[ this.id ] = val;
|
||||
if ( this.id == 'name' )
|
||||
element.attributes[ 'data-cke-saved-name' ] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete element.attributes[ this.id ];
|
||||
if ( this.id == 'name' )
|
||||
delete element.attributes[ 'data-cke-saved-name' ];
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.button.title,
|
||||
minWidth : 350,
|
||||
minHeight : 150,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.button;
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.is( 'input' ) )
|
||||
{
|
||||
var type = element.getAttribute( 'type' );
|
||||
if ( type in { button:1, reset:1, submit:1 } )
|
||||
{
|
||||
this.button = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = this.button,
|
||||
isInsertMode = !element;
|
||||
|
||||
var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ]
|
||||
: new CKEDITOR.htmlParser.element( 'input' );
|
||||
this.commitContent( fake );
|
||||
|
||||
var writer = new CKEDITOR.htmlParser.basicWriter();
|
||||
fake.writeHtml( writer );
|
||||
var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document );
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( newElement );
|
||||
else
|
||||
{
|
||||
newElement.replace( element );
|
||||
editor.getSelection().selectElement( newElement );
|
||||
}
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.button.title,
|
||||
title : editor.lang.button.title,
|
||||
elements : [
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.button.text,
|
||||
accessKey : 'V',
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
},
|
||||
{
|
||||
id : 'type',
|
||||
type : 'select',
|
||||
label : editor.lang.button.type,
|
||||
'default' : 'button',
|
||||
accessKey : 'T',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.button.typeBtn, 'button' ],
|
||||
[ editor.lang.button.typeSbm, 'submit' ],
|
||||
[ editor.lang.button.typeRst, 'reset' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'type' ) || '' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,153 +1,153 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'checkbox', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.checkbox;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
|
||||
if ( element && element.getAttribute( 'type' ) == 'checkbox' )
|
||||
{
|
||||
this.checkbox = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.checkbox,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'checkbox' );
|
||||
editor.insertElement( element );
|
||||
}
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
title : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
startupFocus : 'txtName',
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
// IE failed to update 'name' property on input elements, protect it now.
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'txtValue',
|
||||
type : 'text',
|
||||
label : editor.lang.checkboxAndRadio.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.getAttribute( 'value' );
|
||||
// IE Return 'on' as default attr value.
|
||||
this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element,
|
||||
value = this.getValue();
|
||||
|
||||
if ( value && !( CKEDITOR.env.ie && value == 'on' ) )
|
||||
element.setAttribute( 'value', value );
|
||||
else
|
||||
{
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
// Remove attribute 'value' of checkbox (#4721).
|
||||
var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() );
|
||||
element.copyAttributes( checkbox, { value: 1 } );
|
||||
checkbox.replace( element );
|
||||
editor.getSelection().selectElement( checkbox );
|
||||
data.element = checkbox;
|
||||
}
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'cmbSelected',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.checkboxAndRadio.selected,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
value : "checked",
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'checked' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var isElementChecked = !!element.getAttribute( 'checked' ),
|
||||
isChecked = !!this.getValue();
|
||||
|
||||
if ( isElementChecked != isChecked )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="checkbox"'
|
||||
+ ( isChecked ? ' checked="checked"' : '' )
|
||||
+ '/>', editor.document );
|
||||
|
||||
element.copyAttributes( replace, { type : 1, checked : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var value = this.getValue();
|
||||
if ( value )
|
||||
element.setAttribute( 'checked', 'checked' );
|
||||
else
|
||||
element.removeAttribute( 'checked' );
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'checkbox', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.checkbox;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
|
||||
if ( element && element.getAttribute( 'type' ) == 'checkbox' )
|
||||
{
|
||||
this.checkbox = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.checkbox,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'checkbox' );
|
||||
editor.insertElement( element );
|
||||
}
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
title : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
startupFocus : 'txtName',
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
// IE failed to update 'name' property on input elements, protect it now.
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'txtValue',
|
||||
type : 'text',
|
||||
label : editor.lang.checkboxAndRadio.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.getAttribute( 'value' );
|
||||
// IE Return 'on' as default attr value.
|
||||
this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element,
|
||||
value = this.getValue();
|
||||
|
||||
if ( value && !( CKEDITOR.env.ie && value == 'on' ) )
|
||||
element.setAttribute( 'value', value );
|
||||
else
|
||||
{
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
// Remove attribute 'value' of checkbox (#4721).
|
||||
var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() );
|
||||
element.copyAttributes( checkbox, { value: 1 } );
|
||||
checkbox.replace( element );
|
||||
editor.getSelection().selectElement( checkbox );
|
||||
data.element = checkbox;
|
||||
}
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'cmbSelected',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.checkboxAndRadio.selected,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
value : "checked",
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'checked' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var isElementChecked = !!element.getAttribute( 'checked' ),
|
||||
isChecked = !!this.getValue();
|
||||
|
||||
if ( isElementChecked != isChecked )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="checkbox"'
|
||||
+ ( isChecked ? ' checked="checked"' : '' )
|
||||
+ '/>', editor.document );
|
||||
|
||||
element.copyAttributes( replace, { type : 1, checked : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var value = this.getValue();
|
||||
if ( value )
|
||||
element.setAttribute( 'checked', 'checked' );
|
||||
else
|
||||
element.removeAttribute( 'checked' );
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,177 +1,177 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'form', function( editor )
|
||||
{
|
||||
var autoAttributes =
|
||||
{
|
||||
action : 1,
|
||||
id : 1,
|
||||
method : 1,
|
||||
enctype : 1,
|
||||
target : 1
|
||||
};
|
||||
|
||||
return {
|
||||
title : editor.lang.form.title,
|
||||
minWidth : 350,
|
||||
minHeight : 200,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.form;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getStartElement();
|
||||
var form = element && element.getAscendant( 'form', true );
|
||||
if ( form )
|
||||
{
|
||||
this.form = form;
|
||||
this.setupContent( form );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.form,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'form' );
|
||||
!CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( element );
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
function autoSetup( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( this.id ) || '' );
|
||||
}
|
||||
|
||||
function autoCommit( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( this.id, this.getValue() );
|
||||
else
|
||||
element.removeAttribute( this.id );
|
||||
}
|
||||
|
||||
this.foreach( function( contentObj )
|
||||
{
|
||||
if ( autoAttributes[ contentObj.id ] )
|
||||
{
|
||||
contentObj.setup = autoSetup;
|
||||
contentObj.commit = autoCommit;
|
||||
}
|
||||
} );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.form.title,
|
||||
title : editor.lang.form.title,
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'action',
|
||||
type : 'text',
|
||||
label : editor.lang.form.action,
|
||||
'default' : '',
|
||||
accessKey : 'T'
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'id',
|
||||
type : 'text',
|
||||
label : editor.lang.common.id,
|
||||
'default' : '',
|
||||
accessKey : 'I'
|
||||
},
|
||||
{
|
||||
id : 'enctype',
|
||||
type : 'select',
|
||||
label : editor.lang.form.encoding,
|
||||
style : 'width:100%',
|
||||
accessKey : 'E',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ '' ],
|
||||
[ 'text/plain' ],
|
||||
[ 'multipart/form-data' ],
|
||||
[ 'application/x-www-form-urlencoded' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'target',
|
||||
type : 'select',
|
||||
label : editor.lang.common.target,
|
||||
style : 'width:100%',
|
||||
accessKey : 'M',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet, '' ],
|
||||
[ editor.lang.common.targetNew, '_blank' ],
|
||||
[ editor.lang.common.targetTop, '_top' ],
|
||||
[ editor.lang.common.targetSelf, '_self' ],
|
||||
[ editor.lang.common.targetParent, '_parent' ]
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'method',
|
||||
type : 'select',
|
||||
label : editor.lang.form.method,
|
||||
accessKey : 'M',
|
||||
'default' : 'GET',
|
||||
items :
|
||||
[
|
||||
[ 'GET', 'get' ],
|
||||
[ 'POST', 'post' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'form', function( editor )
|
||||
{
|
||||
var autoAttributes =
|
||||
{
|
||||
action : 1,
|
||||
id : 1,
|
||||
method : 1,
|
||||
enctype : 1,
|
||||
target : 1
|
||||
};
|
||||
|
||||
return {
|
||||
title : editor.lang.form.title,
|
||||
minWidth : 350,
|
||||
minHeight : 200,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.form;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getStartElement();
|
||||
var form = element && element.getAscendant( 'form', true );
|
||||
if ( form )
|
||||
{
|
||||
this.form = form;
|
||||
this.setupContent( form );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.form,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'form' );
|
||||
!CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( element );
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
function autoSetup( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( this.id ) || '' );
|
||||
}
|
||||
|
||||
function autoCommit( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( this.id, this.getValue() );
|
||||
else
|
||||
element.removeAttribute( this.id );
|
||||
}
|
||||
|
||||
this.foreach( function( contentObj )
|
||||
{
|
||||
if ( autoAttributes[ contentObj.id ] )
|
||||
{
|
||||
contentObj.setup = autoSetup;
|
||||
contentObj.commit = autoCommit;
|
||||
}
|
||||
} );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.form.title,
|
||||
title : editor.lang.form.title,
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'action',
|
||||
type : 'text',
|
||||
label : editor.lang.form.action,
|
||||
'default' : '',
|
||||
accessKey : 'T'
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'id',
|
||||
type : 'text',
|
||||
label : editor.lang.common.id,
|
||||
'default' : '',
|
||||
accessKey : 'I'
|
||||
},
|
||||
{
|
||||
id : 'enctype',
|
||||
type : 'select',
|
||||
label : editor.lang.form.encoding,
|
||||
style : 'width:100%',
|
||||
accessKey : 'E',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ '' ],
|
||||
[ 'text/plain' ],
|
||||
[ 'multipart/form-data' ],
|
||||
[ 'application/x-www-form-urlencoded' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'target',
|
||||
type : 'select',
|
||||
label : editor.lang.common.target,
|
||||
style : 'width:100%',
|
||||
accessKey : 'M',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet, '' ],
|
||||
[ editor.lang.common.targetNew, '_blank' ],
|
||||
[ editor.lang.common.targetTop, '_top' ],
|
||||
[ editor.lang.common.targetSelf, '_self' ],
|
||||
[ editor.lang.common.targetParent, '_parent' ]
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'method',
|
||||
type : 'select',
|
||||
label : editor.lang.form.method,
|
||||
accessKey : 'M',
|
||||
'default' : 'GET',
|
||||
items :
|
||||
[
|
||||
[ 'GET', 'get' ],
|
||||
[ 'POST', 'post' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'hiddenfield', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.hidden.title,
|
||||
hiddenField : null,
|
||||
minWidth : 350,
|
||||
minHeight : 110,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.hiddenField;
|
||||
|
||||
var editor = this.getParentEditor(),
|
||||
selection = editor.getSelection(),
|
||||
element = selection.getSelectedElement();
|
||||
|
||||
if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
|
||||
{
|
||||
this.hiddenField = element;
|
||||
element = editor.restoreRealElement( this.hiddenField );
|
||||
this.setupContent( element );
|
||||
selection.selectElement( this.hiddenField );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var name = this.getValueOf( 'info', '_cke_saved_name' ),
|
||||
value = this.getValueOf( 'info', 'value' ),
|
||||
editor = this.getParentEditor(),
|
||||
element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ?
|
||||
editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' )
|
||||
: editor.document.createElement( 'input' );
|
||||
|
||||
element.setAttribute( 'type', 'hidden' );
|
||||
this.commitContent( element );
|
||||
var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' );
|
||||
if ( !this.hiddenField )
|
||||
editor.insertElement( fakeElement );
|
||||
else
|
||||
{
|
||||
fakeElement.replace( this.hiddenField );
|
||||
editor.getSelection().selectElement( fakeElement );
|
||||
}
|
||||
return true;
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.hidden.title,
|
||||
title : editor.lang.hidden.title,
|
||||
elements : [
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.hidden.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.hidden.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'value', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'hiddenfield', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.hidden.title,
|
||||
hiddenField : null,
|
||||
minWidth : 350,
|
||||
minHeight : 110,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.hiddenField;
|
||||
|
||||
var editor = this.getParentEditor(),
|
||||
selection = editor.getSelection(),
|
||||
element = selection.getSelectedElement();
|
||||
|
||||
if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
|
||||
{
|
||||
this.hiddenField = element;
|
||||
element = editor.restoreRealElement( this.hiddenField );
|
||||
this.setupContent( element );
|
||||
selection.selectElement( this.hiddenField );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var name = this.getValueOf( 'info', '_cke_saved_name' ),
|
||||
value = this.getValueOf( 'info', 'value' ),
|
||||
editor = this.getParentEditor(),
|
||||
element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ?
|
||||
editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' )
|
||||
: editor.document.createElement( 'input' );
|
||||
|
||||
element.setAttribute( 'type', 'hidden' );
|
||||
this.commitContent( element );
|
||||
var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' );
|
||||
if ( !this.hiddenField )
|
||||
editor.insertElement( fakeElement );
|
||||
else
|
||||
{
|
||||
fakeElement.replace( this.hiddenField );
|
||||
editor.getSelection().selectElement( fakeElement );
|
||||
}
|
||||
return true;
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.hidden.title,
|
||||
title : editor.lang.hidden.title,
|
||||
elements : [
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.hidden.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.hidden.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'value', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,135 +1,135 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'radio', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.checkboxAndRadio.radioTitle,
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.radioButton;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' )
|
||||
{
|
||||
this.radioButton = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.radioButton,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'radio' );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.checkboxAndRadio.radioTitle,
|
||||
title : editor.lang.checkboxAndRadio.radioTitle,
|
||||
elements : [
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.checkboxAndRadio.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'value', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'checked',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.checkboxAndRadio.selected,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
value : "checked",
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'checked' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'checked', 'checked' );
|
||||
else
|
||||
element.removeAttribute( 'checked' );
|
||||
}
|
||||
else
|
||||
{
|
||||
var isElementChecked = element.getAttribute( 'checked' );
|
||||
var isChecked = !!this.getValue();
|
||||
|
||||
if ( isElementChecked != isChecked )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="radio"'
|
||||
+ ( isChecked ? ' checked="checked"' : '' )
|
||||
+ '></input>', editor.document );
|
||||
element.copyAttributes( replace, { type : 1, checked : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'radio', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.checkboxAndRadio.radioTitle,
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.radioButton;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' )
|
||||
{
|
||||
this.radioButton = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.radioButton,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'radio' );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.checkboxAndRadio.radioTitle,
|
||||
title : editor.lang.checkboxAndRadio.radioTitle,
|
||||
elements : [
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.checkboxAndRadio.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'value', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'checked',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.checkboxAndRadio.selected,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
value : "checked",
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'checked' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'checked', 'checked' );
|
||||
else
|
||||
element.removeAttribute( 'checked' );
|
||||
}
|
||||
else
|
||||
{
|
||||
var isElementChecked = element.getAttribute( 'checked' );
|
||||
var isChecked = !!this.getValue();
|
||||
|
||||
if ( isElementChecked != isChecked )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="radio"'
|
||||
+ ( isChecked ? ' checked="checked"' : '' )
|
||||
+ '></input>', editor.document );
|
||||
element.copyAttributes( replace, { type : 1, checked : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,135 +1,135 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'textarea', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.textarea.title,
|
||||
minWidth : 350,
|
||||
minHeight : 220,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.textarea;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "textarea" )
|
||||
{
|
||||
this.textarea = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.textarea,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'textarea' );
|
||||
}
|
||||
this.commitContent( element );
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.textarea.title,
|
||||
title : editor.lang.textarea.title,
|
||||
elements : [
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths:['50%','50%'],
|
||||
children:[
|
||||
{
|
||||
id : 'cols',
|
||||
type : 'text',
|
||||
label : editor.lang.textarea.cols,
|
||||
'default' : '',
|
||||
accessKey : 'C',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' );
|
||||
this.setValue( value || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cols', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'cols' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'rows',
|
||||
type : 'text',
|
||||
label : editor.lang.textarea.rows,
|
||||
'default' : '',
|
||||
accessKey : 'R',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' );
|
||||
this.setValue( value || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'rows', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'rows' );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'textarea',
|
||||
label : editor.lang.textfield.value,
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.$.defaultValue );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
element.$.value = element.$.defaultValue = this.getValue() ;
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'textarea', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.textarea.title,
|
||||
minWidth : 350,
|
||||
minHeight : 220,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.textarea;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "textarea" )
|
||||
{
|
||||
this.textarea = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.textarea,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'textarea' );
|
||||
}
|
||||
this.commitContent( element );
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.textarea.title,
|
||||
title : editor.lang.textarea.title,
|
||||
elements : [
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths:['50%','50%'],
|
||||
children:[
|
||||
{
|
||||
id : 'cols',
|
||||
type : 'text',
|
||||
label : editor.lang.textarea.cols,
|
||||
'default' : '',
|
||||
accessKey : 'C',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' );
|
||||
this.setValue( value || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cols', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'cols' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'rows',
|
||||
type : 'text',
|
||||
label : editor.lang.textarea.rows,
|
||||
'default' : '',
|
||||
accessKey : 'R',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' );
|
||||
this.setValue( value || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'rows', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'rows' );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'textarea',
|
||||
label : editor.lang.textfield.value,
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.$.defaultValue );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
element.$.value = element.$.defaultValue = this.getValue() ;
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,199 +1,199 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'textfield', function( editor )
|
||||
{
|
||||
var autoAttributes =
|
||||
{
|
||||
value : 1,
|
||||
size : 1,
|
||||
maxLength : 1
|
||||
};
|
||||
|
||||
var acceptedTypes =
|
||||
{
|
||||
text : 1,
|
||||
password : 1
|
||||
};
|
||||
|
||||
return {
|
||||
title : editor.lang.textfield.title,
|
||||
minWidth : 350,
|
||||
minHeight : 150,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.textField;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "input" &&
|
||||
( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) )
|
||||
{
|
||||
this.textField = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.textField,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'text' );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
var autoSetup = function( element )
|
||||
{
|
||||
var value = element.hasAttribute( this.id ) && element.getAttribute( this.id );
|
||||
this.setValue( value || '' );
|
||||
};
|
||||
|
||||
var autoCommit = function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
var value = this.getValue();
|
||||
|
||||
if ( value )
|
||||
element.setAttribute( this.id, value );
|
||||
else
|
||||
element.removeAttribute( this.id );
|
||||
};
|
||||
|
||||
this.foreach( function( contentObj )
|
||||
{
|
||||
if ( autoAttributes[ contentObj.id ] )
|
||||
{
|
||||
contentObj.setup = autoSetup;
|
||||
contentObj.commit = autoCommit;
|
||||
}
|
||||
} );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.textfield.title,
|
||||
title : editor.lang.textfield.title,
|
||||
elements : [
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.value,
|
||||
'default' : '',
|
||||
accessKey : 'V'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'size',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.charWidth,
|
||||
'default' : '',
|
||||
accessKey : 'C',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
|
||||
},
|
||||
{
|
||||
id : 'maxLength',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.maxChars,
|
||||
'default' : '',
|
||||
accessKey : 'M',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
|
||||
}
|
||||
],
|
||||
onLoad : function()
|
||||
{
|
||||
// Repaint the style for IE7 (#6068)
|
||||
if ( CKEDITOR.env.ie7Compat )
|
||||
this.getElement().setStyle( 'zoom', '100%' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'type',
|
||||
type : 'select',
|
||||
label : editor.lang.textfield.type,
|
||||
'default' : 'text',
|
||||
accessKey : 'M',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.textfield.typeText, 'text' ],
|
||||
[ editor.lang.textfield.typePass, 'password' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'type' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var elementType = element.getAttribute( 'type' );
|
||||
var myType = this.getValue();
|
||||
|
||||
if ( elementType != myType )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="' + myType + '"></input>', editor.document );
|
||||
element.copyAttributes( replace, { type : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
else
|
||||
element.setAttribute( 'type', this.getValue() );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'textfield', function( editor )
|
||||
{
|
||||
var autoAttributes =
|
||||
{
|
||||
value : 1,
|
||||
size : 1,
|
||||
maxLength : 1
|
||||
};
|
||||
|
||||
var acceptedTypes =
|
||||
{
|
||||
text : 1,
|
||||
password : 1
|
||||
};
|
||||
|
||||
return {
|
||||
title : editor.lang.textfield.title,
|
||||
minWidth : 350,
|
||||
minHeight : 150,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.textField;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "input" &&
|
||||
( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) )
|
||||
{
|
||||
this.textField = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.textField,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'text' );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
var autoSetup = function( element )
|
||||
{
|
||||
var value = element.hasAttribute( this.id ) && element.getAttribute( this.id );
|
||||
this.setValue( value || '' );
|
||||
};
|
||||
|
||||
var autoCommit = function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
var value = this.getValue();
|
||||
|
||||
if ( value )
|
||||
element.setAttribute( this.id, value );
|
||||
else
|
||||
element.removeAttribute( this.id );
|
||||
};
|
||||
|
||||
this.foreach( function( contentObj )
|
||||
{
|
||||
if ( autoAttributes[ contentObj.id ] )
|
||||
{
|
||||
contentObj.setup = autoSetup;
|
||||
contentObj.commit = autoCommit;
|
||||
}
|
||||
} );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.textfield.title,
|
||||
title : editor.lang.textfield.title,
|
||||
elements : [
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.value,
|
||||
'default' : '',
|
||||
accessKey : 'V'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'size',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.charWidth,
|
||||
'default' : '',
|
||||
accessKey : 'C',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
|
||||
},
|
||||
{
|
||||
id : 'maxLength',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.maxChars,
|
||||
'default' : '',
|
||||
accessKey : 'M',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
|
||||
}
|
||||
],
|
||||
onLoad : function()
|
||||
{
|
||||
// Repaint the style for IE7 (#6068)
|
||||
if ( CKEDITOR.env.ie7Compat )
|
||||
this.getElement().setStyle( 'zoom', '100%' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'type',
|
||||
type : 'select',
|
||||
label : editor.lang.textfield.type,
|
||||
'default' : 'text',
|
||||
accessKey : 'M',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.textfield.typeText, 'text' ],
|
||||
[ editor.lang.textfield.typePass, 'password' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'type' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var elementType = element.getAttribute( 'type' );
|
||||
var myType = this.getValue();
|
||||
|
||||
if ( elementType != myType )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="' + myType + '"></input>', editor.document );
|
||||
element.copyAttributes( replace, { type : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
else
|
||||
element.setAttribute( 'type', this.getValue() );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user