[FIX] force ckeditor lang to en and replace en-gb localization file with en
avoids automatic locale picking selecting something different than the one locale file currently provided and blowing up, preventing edition from working bzr revid: xmo@openerp.com-20130912154957-yod17u9xvw3r966i
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
CKEditor 4 Changelog
|
||||
====================
|
||||
|
||||
## CKEditor 4.3
|
||||
## CKEditor 4.3 beta
|
||||
|
||||
* [#10708](http://dev.ckeditor.com/ticket/10708): New smileys.
|
||||
|
||||
## CKEditor 4.2.1
|
||||
|
||||
|
||||
@@ -692,7 +692,7 @@ CKEDITOR.dom.range = function( root ) {
|
||||
collapsed: collapsed,
|
||||
is2: true // It's a createBookmark2 bookmark.
|
||||
};
|
||||
}
|
||||
};
|
||||
})(),
|
||||
|
||||
/**
|
||||
|
||||
@@ -237,56 +237,92 @@
|
||||
/**
|
||||
* @see CKEDITOR.editor#insertElement
|
||||
*/
|
||||
insertElement: function( element ) {
|
||||
beforeInsert( this );
|
||||
insertElement: function( element, range ) {
|
||||
if ( !range )
|
||||
this.insertElementIntoSelection( element );
|
||||
else
|
||||
this.insertElementIntoRange( element, range );
|
||||
},
|
||||
|
||||
/**
|
||||
* Inserts an element into the position in the editor determined by range.
|
||||
*
|
||||
* @param {CKEDITOR.dom.element} element The element to be inserted.
|
||||
* @param {CKEDITOR.dom.range} range The range as a place of insertion.
|
||||
* @returns {Boolean} Informs whether insertion was successful.
|
||||
*/
|
||||
insertElementIntoRange: function( element, range ) {
|
||||
var editor = this.editor,
|
||||
enterMode = editor.config.enterMode,
|
||||
elementName = element.getName(),
|
||||
isBlock = CKEDITOR.dtd.$block[ elementName ];
|
||||
|
||||
if ( range.checkReadOnly() )
|
||||
return false;
|
||||
|
||||
// Remove the original contents, merge split nodes.
|
||||
range.deleteContents( 1 );
|
||||
|
||||
// If we're inserting a block at dtd-violated position, split
|
||||
// the parent blocks until we reach blockLimit.
|
||||
var current, dtd;
|
||||
|
||||
if ( isBlock ) {
|
||||
while ( ( current = range.getCommonAncestor( 0, 1 ) ) &&
|
||||
( dtd = CKEDITOR.dtd[ current.getName() ] ) &&
|
||||
!( dtd && dtd[ elementName ] ) ) {
|
||||
|
||||
// Split up inline elements.
|
||||
if ( current.getName() in CKEDITOR.dtd.span )
|
||||
range.splitElement( current );
|
||||
|
||||
// If we're in an empty block which indicate a new paragraph,
|
||||
// simply replace it with the inserting block.(#3664)
|
||||
else if ( range.checkStartOfBlock() && range.checkEndOfBlock() ) {
|
||||
range.setStartBefore( current );
|
||||
range.collapse( true );
|
||||
current.remove();
|
||||
} else
|
||||
range.splitBlock( enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p', editor.editable() );
|
||||
}
|
||||
}
|
||||
|
||||
// Insert the new node.
|
||||
range.insertNode( element );
|
||||
|
||||
// Return true if insertion was successful.
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Inserts an element into the currently selected position in the editor.
|
||||
*
|
||||
* @param {CKEDITOR.dom.element} element The element to be inserted.
|
||||
*/
|
||||
insertElementIntoSelection: function( element ) {
|
||||
var editor = this.editor,
|
||||
enterMode = editor.activeEnterMode,
|
||||
selection = editor.getSelection(),
|
||||
ranges = selection.getRanges(),
|
||||
elementName = element.getName(),
|
||||
isBlock = CKEDITOR.dtd.$block[ elementName ];
|
||||
isBlock = CKEDITOR.dtd.$block[ elementName ],
|
||||
clone, lastElement, range;
|
||||
|
||||
var range, clone, lastElement;
|
||||
// Prepare for the insertion.
|
||||
beforeInsert( this );
|
||||
|
||||
for ( var i = ranges.length - 1; i >= 0; i-- ) {
|
||||
// Insert the element into all ranges by cloning.
|
||||
for ( var i = ranges.length; i--; ) {
|
||||
range = ranges[ i ];
|
||||
|
||||
if ( !range.checkReadOnly() ) {
|
||||
// Remove the original contents, merge split nodes.
|
||||
range.deleteContents( 1 );
|
||||
// Clone is an element for the first range.
|
||||
clone = !i && element || element.clone( 1 );
|
||||
|
||||
clone = !i && element || element.clone( 1 );
|
||||
|
||||
// If we're inserting a block at dtd-violated position, split
|
||||
// the parent blocks until we reach blockLimit.
|
||||
var current, dtd;
|
||||
if ( isBlock ) {
|
||||
while ( ( current = range.getCommonAncestor( 0, 1 ) ) &&
|
||||
( dtd = CKEDITOR.dtd[ current.getName() ] ) &&
|
||||
!( dtd && dtd[ elementName ] ) ) {
|
||||
// Split up inline elements.
|
||||
if ( current.getName() in CKEDITOR.dtd.span )
|
||||
range.splitElement( current );
|
||||
// If we're in an empty block which indicate a new paragraph,
|
||||
// simply replace it with the inserting block.(#3664)
|
||||
else if ( range.checkStartOfBlock() && range.checkEndOfBlock() ) {
|
||||
range.setStartBefore( current );
|
||||
range.collapse( true );
|
||||
current.remove();
|
||||
} else
|
||||
range.splitBlock( enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p', editor.editable() );
|
||||
}
|
||||
}
|
||||
|
||||
// Insert the new node.
|
||||
range.insertNode( clone );
|
||||
|
||||
// Save the last element reference so we can make the
|
||||
// selection later.
|
||||
if ( !lastElement )
|
||||
lastElement = clone;
|
||||
}
|
||||
// Put the clone into a particular range.
|
||||
// Save the last **successfully inserted** element reference
|
||||
// so we can make the selection later.
|
||||
if ( this.insertElementIntoRange( clone, range ) && !lastElement );
|
||||
lastElement = clone;
|
||||
}
|
||||
|
||||
if ( lastElement ) {
|
||||
@@ -301,8 +337,7 @@
|
||||
return isNotEmpty( node ) && !isBogus( node );
|
||||
} );
|
||||
|
||||
if ( next && next.type == CKEDITOR.NODE_ELEMENT &&
|
||||
next.is( CKEDITOR.dtd.$block ) ) {
|
||||
if ( next && next.type == CKEDITOR.NODE_ELEMENT && next.is( CKEDITOR.dtd.$block ) ) {
|
||||
|
||||
// If the next one is a text block, move cursor to the start of it's content.
|
||||
if ( next.getDtd()[ '#' ] )
|
||||
@@ -319,6 +354,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Set up the correct selection.
|
||||
selection.selectRanges( [ range ] );
|
||||
|
||||
// Do not scroll after inserting, because Opera may fail on certain element (e.g. iframe/iframe.html).
|
||||
|
||||
@@ -705,7 +705,7 @@
|
||||
function isFunction( f ) {
|
||||
// For IE8 typeof fun == object so we cannot use it.
|
||||
return !!( f && f.call && f.apply );
|
||||
};
|
||||
}
|
||||
|
||||
// Check if there is no element/elements input with name == "submit".
|
||||
// If they exists they will overwrite form submit function (form.$.submit).
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
var editor = this.editor = editorOrRules;
|
||||
this.customConfig = true;
|
||||
|
||||
var allowedContent = editor.config.allowedContent
|
||||
var allowedContent = editor.config.allowedContent;
|
||||
|
||||
// Disable filter completely by setting config.allowedContent = true.
|
||||
if ( allowedContent === true ) {
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
// Convert the filler into appropriate form.
|
||||
else {
|
||||
createFiller( isOutput ).insertAfter( node );
|
||||
node.remove()
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@
|
||||
|
||||
var dtd = CKEDITOR.dtd,
|
||||
// Define orders of table elements.
|
||||
tableOrder = [ 'caption', 'colgroup', 'col', 'thead', 'tfoot', 'tbody' ];
|
||||
tableOrder = [ 'caption', 'colgroup', 'col', 'thead', 'tfoot', 'tbody' ],
|
||||
// List of all block elements.
|
||||
blockLikeTags = CKEDITOR.tools.extend( {}, dtd.$blockLimit, dtd.$block );
|
||||
|
||||
|
||||
+12
-12
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
|
||||
* English (United Kingdom) language.
|
||||
* @fileOverview Defines the {@link CKEDITOR.lang} object for the English
|
||||
* language. This is the base file for all translations.
|
||||
*/
|
||||
|
||||
/**#@+
|
||||
@@ -17,7 +17,7 @@
|
||||
* Contains the dictionary of language entries.
|
||||
* @namespace
|
||||
*/
|
||||
CKEDITOR.lang[ 'en-gb' ] = {
|
||||
CKEDITOR.lang[ 'en' ] = {
|
||||
// ARIA description.
|
||||
editor: 'Rich Text Editor',
|
||||
|
||||
@@ -25,7 +25,7 @@ CKEDITOR.lang[ 'en-gb' ] = {
|
||||
common: {
|
||||
// Screenreader titles. Please note that screenreaders are not always capable
|
||||
// of reading non-English words. So be careful while translating it.
|
||||
editorHelp: 'Press ALT 0 for help', // MISSING
|
||||
editorHelp: 'Press ALT 0 for help',
|
||||
|
||||
browseServer: 'Browse Server',
|
||||
url: 'URL',
|
||||
@@ -58,7 +58,7 @@ CKEDITOR.lang[ 'en-gb' ] = {
|
||||
cancel: 'Cancel',
|
||||
close: 'Close',
|
||||
preview: 'Preview',
|
||||
resize: 'Drag to resize',
|
||||
resize: 'Resize',
|
||||
generalTab: 'General',
|
||||
advancedTab: 'Advanced',
|
||||
validateNumberFailed: 'This value is not a number.',
|
||||
@@ -76,20 +76,20 @@ CKEDITOR.lang[ 'en-gb' ] = {
|
||||
cssClasses: 'Stylesheet Classes',
|
||||
width: 'Width',
|
||||
height: 'Height',
|
||||
align: 'Align',
|
||||
align: 'Alignment',
|
||||
alignLeft: 'Left',
|
||||
alignRight: 'Right',
|
||||
alignCenter: 'Centre',
|
||||
alignCenter: 'Center',
|
||||
alignTop: 'Top',
|
||||
alignMiddle: 'Middle',
|
||||
alignBottom: 'Bottom',
|
||||
invalidValue : 'Invalid value.', // MISSING
|
||||
invalidValue : 'Invalid value.',
|
||||
invalidHeight: 'Height must be a number.',
|
||||
invalidWidth: 'Width must be a number.',
|
||||
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
|
||||
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
|
||||
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
|
||||
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
|
||||
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
|
||||
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',
|
||||
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.',
|
||||
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).',
|
||||
|
||||
// Put the voice-only part of the label in the span.
|
||||
unavailable: '%1<span class="cke_accessibility">, unavailable</span>'
|
||||
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'en', {
|
||||
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: ' Access previous focus space command',
|
||||
legend: 'Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, ' +
|
||||
'for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces.'
|
||||
},
|
||||
{
|
||||
name: ' Access next focus space command',
|
||||
legend: 'Press ${accessNextSpace} to access the closest unreachable focus space after the caret, ' +
|
||||
'for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces.'
|
||||
},
|
||||
{
|
||||
name: ' Accessibility Help',
|
||||
legend: 'Press ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'about', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'about', 'en', {
|
||||
copy: 'Copyright © $1. All rights reserved.',
|
||||
dlgTitle: 'About CKEditor',
|
||||
help: 'Check $1 for help.', // MISSING
|
||||
help: 'Check $1 for help.',
|
||||
moreInfo: 'For licensing information please visit our web site:',
|
||||
title: 'About CKEditor',
|
||||
userGuide: 'CKEditor User\'s Guide'
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'basicstyles', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'basicstyles', 'en', {
|
||||
bold: 'Bold',
|
||||
italic: 'Italic',
|
||||
strike: 'Strike Through',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'en', {
|
||||
ltr: 'Text direction from left to right',
|
||||
rtl: 'Text direction from right to left'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'blockquote', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'blockquote', 'en', {
|
||||
toolbar: 'Block Quote'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'clipboard', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'clipboard', 'en', {
|
||||
copy: 'Copy',
|
||||
copyError: 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).',
|
||||
cut: 'Cut',
|
||||
+9
-9
@@ -2,18 +2,18 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'colorbutton', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'colorbutton', 'en', {
|
||||
auto: 'Automatic',
|
||||
bgColorTitle: 'Background Colour',
|
||||
bgColorTitle: 'Background Color',
|
||||
colors: {
|
||||
'000': 'Black',
|
||||
'800000': 'Maroon',
|
||||
'8B4513': 'Saddle Brown',
|
||||
'2F4F4F': 'Dark Slate Grey',
|
||||
'2F4F4F': 'Dark Slate Gray',
|
||||
'008080': 'Teal',
|
||||
'000080': 'Navy',
|
||||
'4B0082': 'Indigo',
|
||||
'696969': 'Dark Grey',
|
||||
'696969': 'Dark Gray',
|
||||
B22222: 'Fire Brick',
|
||||
A52A2A: 'Brown',
|
||||
DAA520: 'Golden Rod',
|
||||
@@ -21,7 +21,7 @@ CKEDITOR.plugins.setLang( 'colorbutton', 'en-gb', {
|
||||
'40E0D0': 'Turquoise',
|
||||
'0000CD': 'Medium Blue',
|
||||
'800080': 'Purple',
|
||||
'808080': 'Grey',
|
||||
'808080': 'Gray',
|
||||
F00: 'Red',
|
||||
FF8C00: 'Dark Orange',
|
||||
FFD700: 'Gold',
|
||||
@@ -29,7 +29,7 @@ CKEDITOR.plugins.setLang( 'colorbutton', 'en-gb', {
|
||||
'0FF': 'Cyan',
|
||||
'00F': 'Blue',
|
||||
EE82EE: 'Violet',
|
||||
A9A9A9: 'Dim Grey',
|
||||
A9A9A9: 'Dim Gray',
|
||||
FFA07A: 'Light Salmon',
|
||||
FFA500: 'Orange',
|
||||
FFFF00: 'Yellow',
|
||||
@@ -47,7 +47,7 @@ CKEDITOR.plugins.setLang( 'colorbutton', 'en-gb', {
|
||||
E6E6FA: 'Lavender',
|
||||
FFF: 'White'
|
||||
},
|
||||
more: 'More Colours...',
|
||||
panelTitle: 'Colours',
|
||||
textColorTitle: 'Text Colour'
|
||||
more: 'More Colors...',
|
||||
panelTitle: 'Colors',
|
||||
textColorTitle: 'Text Color'
|
||||
});
|
||||
+4
-4
@@ -2,10 +2,10 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'colordialog', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'colordialog', 'en', {
|
||||
clear: 'Clear',
|
||||
highlight: 'Highlight',
|
||||
options: 'Colour Options',
|
||||
selected: 'Selected Colour',
|
||||
title: 'Select colour'
|
||||
options: 'Color Options',
|
||||
selected: 'Selected Color',
|
||||
title: 'Select color'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'contextmenu', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'contextmenu', 'en', {
|
||||
options: 'Context Menu Options'
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'en', {
|
||||
title: 'Element Information',
|
||||
dialogName: 'Dialog window name',
|
||||
tabName: 'Tab name',
|
||||
elementId: 'Element ID',
|
||||
elementType: 'Element type'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'div', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'div', 'en', {
|
||||
IdInputLabel: 'Id',
|
||||
advisoryTitleInputLabel: 'Advisory Title',
|
||||
cssClassInputLabel: 'Stylesheet Classes',
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'docprops', 'en-gb', {
|
||||
bgColor: 'Background Color', // MISSING
|
||||
bgFixed: 'Non-scrolling (Fixed) Background', // MISSING
|
||||
bgImage: 'Background Image URL', // MISSING
|
||||
charset: 'Character Set Encoding', // MISSING
|
||||
charsetASCII: 'ASCII', // MISSING
|
||||
charsetCE: 'Central European', // MISSING
|
||||
charsetCR: 'Cyrillic', // MISSING
|
||||
charsetCT: 'Chinese Traditional (Big5)', // MISSING
|
||||
charsetGR: 'Greek', // MISSING
|
||||
charsetJP: 'Japanese', // MISSING
|
||||
charsetKR: 'Korean', // MISSING
|
||||
charsetOther: 'Other Character Set Encoding', // MISSING
|
||||
charsetTR: 'Turkish', // MISSING
|
||||
charsetUN: 'Unicode (UTF-8)', // MISSING
|
||||
charsetWE: 'Western European', // MISSING
|
||||
chooseColor: 'Choose', // MISSING
|
||||
design: 'Design', // MISSING
|
||||
docTitle: 'Page Title', // MISSING
|
||||
docType: 'Document Type Heading', // MISSING
|
||||
docTypeOther: 'Other Document Type Heading', // MISSING
|
||||
label: 'Document Properties', // MISSING
|
||||
margin: 'Page Margins', // MISSING
|
||||
marginBottom: 'Bottom', // MISSING
|
||||
marginLeft: 'Left', // MISSING
|
||||
marginRight: 'Right', // MISSING
|
||||
marginTop: 'Top', // MISSING
|
||||
meta: 'Meta Tags', // MISSING
|
||||
metaAuthor: 'Author', // MISSING
|
||||
metaCopyright: 'Copyright', // MISSING
|
||||
metaDescription: 'Document Description', // MISSING
|
||||
metaKeywords: 'Document Indexing Keywords (comma separated)', // MISSING
|
||||
other: 'Other...', // MISSING
|
||||
previewHtml: '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>', // MISSING
|
||||
title: 'Document Properties', // MISSING
|
||||
txtColor: 'Text Color', // MISSING
|
||||
xhtmlDec: 'Include XHTML Declarations' // MISSING
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'docprops', 'en', {
|
||||
bgColor: 'Background Color',
|
||||
bgFixed: 'Non-scrolling (Fixed) Background',
|
||||
bgImage: 'Background Image URL',
|
||||
charset: 'Character Set Encoding',
|
||||
charsetASCII: 'ASCII',
|
||||
charsetCE: 'Central European',
|
||||
charsetCR: 'Cyrillic',
|
||||
charsetCT: 'Chinese Traditional (Big5)',
|
||||
charsetGR: 'Greek',
|
||||
charsetJP: 'Japanese',
|
||||
charsetKR: 'Korean',
|
||||
charsetOther: 'Other Character Set Encoding',
|
||||
charsetTR: 'Turkish',
|
||||
charsetUN: 'Unicode (UTF-8)',
|
||||
charsetWE: 'Western European',
|
||||
chooseColor: 'Choose',
|
||||
design: 'Design',
|
||||
docTitle: 'Page Title',
|
||||
docType: 'Document Type Heading',
|
||||
docTypeOther: 'Other Document Type Heading',
|
||||
label: 'Document Properties',
|
||||
margin: 'Page Margins',
|
||||
marginBottom: 'Bottom',
|
||||
marginLeft: 'Left',
|
||||
marginRight: 'Right',
|
||||
marginTop: 'Top',
|
||||
meta: 'Meta Tags',
|
||||
metaAuthor: 'Author',
|
||||
metaCopyright: 'Copyright',
|
||||
metaDescription: 'Document Description',
|
||||
metaKeywords: 'Document Indexing Keywords (comma separated)',
|
||||
other: 'Other...',
|
||||
previewHtml: '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>',
|
||||
title: 'Document Properties',
|
||||
txtColor: 'Text Color',
|
||||
xhtmlDec: 'Include XHTML Declarations'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'elementspath', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'elementspath', 'en', {
|
||||
eleLabel: 'Elements path',
|
||||
eleTitle: '%1 element'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'en', {
|
||||
anchor: 'Anchor',
|
||||
flash: 'Flash Animation',
|
||||
hiddenfield: 'Hidden Field',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'find', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'find', 'en', {
|
||||
find: 'Find',
|
||||
findOptions: 'Find Options',
|
||||
findWhat: 'Find what:',
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'flash', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'flash', 'en', {
|
||||
access: 'Script Access',
|
||||
accessAlways: 'Always',
|
||||
accessNever: 'Never',
|
||||
@@ -11,7 +11,7 @@ CKEDITOR.plugins.setLang( 'flash', 'en-gb', {
|
||||
alignAbsMiddle: 'Abs Middle',
|
||||
alignBaseline: 'Baseline',
|
||||
alignTextTop: 'Text Top',
|
||||
bgcolor: 'Background colour',
|
||||
bgcolor: 'Background color',
|
||||
chkFull: 'Allow Fullscreen',
|
||||
chkLoop: 'Loop',
|
||||
chkMenu: 'Enable Flash Menu',
|
||||
@@ -272,7 +272,7 @@
|
||||
alignSide == 'left' ? pageScrollX : -pageScrollX;
|
||||
|
||||
floatSpace.setStyle( alignSide, pixelate( ( mode == 'pin' ? pinnedOffsetX : dockedOffsetX ) + offset + scroll ) );
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
if ( topHtml ) {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'font', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'font', 'en', {
|
||||
fontSize: {
|
||||
label: 'Size',
|
||||
voiceLabel: 'Font Size',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'format', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'format', 'en', {
|
||||
label: 'Format',
|
||||
panelTitle: 'Paragraph Format',
|
||||
tag_address: 'Address',
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'forms', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'forms', 'en', {
|
||||
button: {
|
||||
title: 'Button Properties',
|
||||
text: 'Text (Value)',
|
||||
@@ -60,9 +60,9 @@ CKEDITOR.plugins.setLang( 'forms', 'en-gb', {
|
||||
type: 'Type',
|
||||
typeText: 'Text',
|
||||
typePass: 'Password',
|
||||
typeEmail: 'Email', // MISSING
|
||||
typeSearch: 'Search', // MISSING
|
||||
typeTel: 'Telephone Number', // MISSING
|
||||
typeEmail: 'Email',
|
||||
typeSearch: 'Search',
|
||||
typeTel: 'Telephone Number',
|
||||
typeUrl: 'URL'
|
||||
}
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'horizontalrule', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'horizontalrule', 'en', {
|
||||
toolbar: 'Insert Horizontal Line'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'iframe', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'iframe', 'en', {
|
||||
border: 'Show frame border',
|
||||
noUrl: 'Please type the iframe URL',
|
||||
scrolling: 'Enable scrollbars',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'image', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'image', 'en', {
|
||||
alertUrl: 'Please type the image URL',
|
||||
alt: 'Alternative Text',
|
||||
border: 'Border',
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
figure.caption {
|
||||
text-align: center;
|
||||
border: solid 1px #ccc;
|
||||
border-radius: 2px;
|
||||
background: rgba(0,0,0,0.05);
|
||||
padding: 10px;
|
||||
margin: 10px 20px;
|
||||
display: block; /* For IE8 */
|
||||
}
|
||||
|
||||
figure.caption figcaption {
|
||||
text-align: center;
|
||||
display: block; /* For IE8 */
|
||||
}
|
||||
|
||||
.cke_widget_wrapper:hover:after {
|
||||
content: "id: " attr(data-widget-id);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 2px 4px;
|
||||
background: #EEE;
|
||||
border: solid 1px #DDD;
|
||||
border-radius: 2px;
|
||||
color: #BBB;
|
||||
font: bold 10px sans-serif;
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Widget image2 — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<script src="../../../dev/console/console.js"></script>
|
||||
<script src="../../../dev/console/focusconsole.js"></script>
|
||||
<script src="../../widget/dev/console.js"></script>
|
||||
<script>
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
CKEDITOR.tools.enableHtml5Elements( document );
|
||||
</script>
|
||||
<link href="../../../samples/sample.css" rel="stylesheet">
|
||||
<meta name="ckeditor-sample-name" content="Widget image2">
|
||||
<meta name="ckeditor-sample-group" content="Plugins">
|
||||
<meta name="ckeditor-sample-description" content="Widget img showcase.">
|
||||
<meta name="ckeditor-sample-isnew" content="1">
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
font-size: 13px;
|
||||
}
|
||||
.editable {
|
||||
padding: 20px;
|
||||
border: 2px solid #dfdfdf;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
body p {
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
/* Reset some styles from sample.css */
|
||||
.cke_editable.cke_editable_inline
|
||||
{
|
||||
cursor: auto;
|
||||
}
|
||||
.cke_editable.cke_editable_inline.cke_focus
|
||||
{
|
||||
box-shadow: none;
|
||||
background: inherit;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link href="contents.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » Widget image2
|
||||
</h1>
|
||||
|
||||
<h2>Framed sample</h2>
|
||||
|
||||
<textarea id="editor1" cols="10" rows="10">
|
||||
<h1>Apollo 11</h1>
|
||||
|
||||
<figure class="caption" style="float: right">
|
||||
<img alt="Saturn V" src="assets/image1.jpg" width="200" />
|
||||
<figcaption>Roll out of Saturn V on launch pad</figcaption>
|
||||
</figure>
|
||||
|
||||
<p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
|
||||
|
||||
<p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
|
||||
|
||||
<h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
|
||||
|
||||
<p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>One small step for [a] man, one giant leap for mankind.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
|
||||
</blockquote>
|
||||
|
||||
<figure class="caption" style="float: right">
|
||||
<img alt="The Eagle" src="assets/image2.jpg" style="width: 200px" />
|
||||
<figcaption>The Eagle in lunar orbit</figcaption>
|
||||
</figure>
|
||||
|
||||
<h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
|
||||
|
||||
<p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>'s Apollo program. The Apollo spacecraft had three parts:</p>
|
||||
|
||||
<ol>
|
||||
<li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
|
||||
<li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
|
||||
<li><strong>Lunar Module</strong> for landing on the Moon.</li>
|
||||
</ol>
|
||||
|
||||
<p>After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
|
||||
|
||||
<p style="text-align:center">
|
||||
<img alt="Saturn V" src="assets/image1.jpg" width="200" />
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<p style="text-align:right"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
|
||||
</textarea>
|
||||
|
||||
<h2>Inline sample</h2>
|
||||
|
||||
<div id="editor2" contenteditable="true" class="editable">
|
||||
<h2>Apollo 11</h2>
|
||||
|
||||
<figure class="caption" style="float: right">
|
||||
<img alt="Saturn V" src="assets/image1.jpg" width="200" />
|
||||
<figcaption>Roll out of Saturn V on launch pad</figcaption>
|
||||
</figure>
|
||||
|
||||
<p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
|
||||
|
||||
<p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
|
||||
|
||||
<h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
|
||||
|
||||
<p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>One small step for [a] man, one giant leap for mankind.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
|
||||
</blockquote>
|
||||
|
||||
<figure class="caption" style="float: right">
|
||||
<img alt="The Eagle" src="assets/image2.jpg" style="width: 200px" />
|
||||
<figcaption>The Eagle in lunar orbit</figcaption>
|
||||
</figure>
|
||||
|
||||
<h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
|
||||
|
||||
<p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>'s Apollo program. The Apollo spacecraft had three parts:</p>
|
||||
|
||||
<ol>
|
||||
<li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
|
||||
<li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
|
||||
<li><strong>Lunar Module</strong> for landing on the Moon.</li>
|
||||
</ol>
|
||||
|
||||
<p>After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
|
||||
|
||||
<p style="text-align:center">
|
||||
<img alt="Saturn V" src="assets/image1.jpg" width="200" />
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<p style="text-align:right"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
CKEDITOR.disableAutoInline = true;
|
||||
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
extraPlugins: 'image2',
|
||||
height: 600,
|
||||
removePlugins: 'image,forms',
|
||||
contentsCss: [ '../../../contents.css', 'contents.css' ],
|
||||
} );
|
||||
|
||||
CKEDITOR.inline( 'editor2', {
|
||||
removePlugins: 'image,forms',
|
||||
extraPlugins: 'image2,sourcedialog'
|
||||
} );
|
||||
|
||||
CKCONSOLE.create( 'widget', { editor: 'editor1' } );
|
||||
CKCONSOLE.create( 'focus', { editor: 'editor1' } );
|
||||
CKCONSOLE.create( 'widget', { editor: 'editor2', folded: true } );
|
||||
CKCONSOLE.create( 'focus', { editor: 'editor2', folded: true } );
|
||||
|
||||
</script>
|
||||
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,480 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
CKEDITOR.dialog.add( 'image2', function( editor ) {
|
||||
|
||||
// RegExp: 123, 123px, empty string ""
|
||||
var regexGetSizeOrEmpty = /(^\s*(\d+)(px)?\s*$)|^$/i,
|
||||
|
||||
lockButtonId = CKEDITOR.tools.getNextId(),
|
||||
resetButtonId = CKEDITOR.tools.getNextId(),
|
||||
|
||||
lang = editor.lang.image2,
|
||||
commonLang = editor.lang.common,
|
||||
|
||||
lockResetStyle = 'margin-top:18px;width:40px;height:20px;',
|
||||
lockResetHtml = new CKEDITOR.template(
|
||||
'<div>' +
|
||||
'<a href="javascript:void(0)" tabindex="-1" title="' + lang.lockRatio + '" class="cke_btn_locked" id="{lockButtonId}" role="checkbox">' +
|
||||
'<span class="cke_icon"></span>' +
|
||||
'<span class="cke_label">' + lang.lockRatio + '</span>' +
|
||||
'</a>' +
|
||||
|
||||
'<a href="javascript:void(0)" tabindex="-1" title="' + lang.resetSize + '" class="cke_btn_reset" id="{resetButtonId}" role="button">' +
|
||||
'<span class="cke_label">' + lang.resetSize + '</span>' +
|
||||
'</a>' +
|
||||
'</div>' ).output( {
|
||||
lockButtonId: lockButtonId,
|
||||
resetButtonId: resetButtonId
|
||||
} ),
|
||||
|
||||
// Global variables referring to the dialog's context.
|
||||
doc, widget, image,
|
||||
|
||||
// Global variable referring to this dialog's image pre-loader.
|
||||
preLoader,
|
||||
|
||||
// Global variables holding the original size of the image.
|
||||
domWidth, domHeight,
|
||||
|
||||
// Global variables related to image pre-loading.
|
||||
preLoadedWidth, preLoadedHeight, srcChanged,
|
||||
|
||||
// Global variables related to size locking.
|
||||
lockRatio, userDefinedLock,
|
||||
|
||||
// Global variables referring to dialog fields and elements.
|
||||
lockButton, resetButton, widthField, heightField;
|
||||
|
||||
// Validates dimension. Allowed values are:
|
||||
// "123px", "123", "" (empty string)
|
||||
function validateDimension() {
|
||||
var match = this.getValue().match( regexGetSizeOrEmpty ),
|
||||
isValid = !!( match && parseInt( match[ 1 ], 10 ) !== 0 );
|
||||
|
||||
if ( !isValid )
|
||||
alert( commonLang[ 'invalid' + CKEDITOR.tools.capitalize( this.id ) ] );
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
// Creates a function that pre-loads images. The callback function passes
|
||||
// [image, width, height] or null if loading failed.
|
||||
//
|
||||
// @returns {Function}
|
||||
function createPreLoader() {
|
||||
var image = doc.createElement( 'img' ),
|
||||
listeners = [];
|
||||
|
||||
function addListener( event, callback ) {
|
||||
listeners.push( image.once( event, function( evt ) {
|
||||
removeListeners();
|
||||
callback( evt );
|
||||
} ) );
|
||||
}
|
||||
|
||||
function removeListeners() {
|
||||
var l;
|
||||
|
||||
while ( ( l = listeners.pop() ) )
|
||||
l.removeListener();
|
||||
}
|
||||
|
||||
// @param {String} src.
|
||||
// @param {Function} callback.
|
||||
return function( src, callback, scope ) {
|
||||
addListener( 'load', function() {
|
||||
callback.call( scope, image, image.$.width, image.$.height );
|
||||
} );
|
||||
|
||||
addListener( 'error', function() {
|
||||
callback( null );
|
||||
} );
|
||||
|
||||
addListener( 'abort', function() {
|
||||
callback( null );
|
||||
} );
|
||||
|
||||
image.setAttribute( 'src', src + '?' + Math.random().toString( 16 ).substring( 2 ) );
|
||||
};
|
||||
}
|
||||
|
||||
function onChangeDimension() {
|
||||
// If ratio is un-locked, then we don't care what's next.
|
||||
if ( !lockRatio )
|
||||
return;
|
||||
|
||||
var value = this.getValue();
|
||||
|
||||
// No reason to auto-scale or unlock if the field is empty.
|
||||
if ( !value )
|
||||
return;
|
||||
|
||||
// If the value of the field is invalid (e.g. with %), unlock ratio.
|
||||
if ( !value.match( regexGetSizeOrEmpty ) )
|
||||
toggleLockDimensions( false );
|
||||
|
||||
// No automatic re-scale when dimension is '0'.
|
||||
if ( value === '0' )
|
||||
return;
|
||||
|
||||
var isWidth = this.id == 'width',
|
||||
// If dialog opened for the new image, domWidth and domHeight
|
||||
// will be empty. Use dimensions from pre-loader in such case instead.
|
||||
width = domWidth || preLoadedWidth,
|
||||
height = domHeight || preLoadedHeight;
|
||||
|
||||
// If changing width, then auto-scale height.
|
||||
if ( isWidth )
|
||||
value = Math.round( height * ( value / width ) );
|
||||
|
||||
// If changing height, then auto-scale width.
|
||||
else
|
||||
value = Math.round( width * ( value / height ) );
|
||||
|
||||
// If the value is a number, apply it to the other field.
|
||||
if ( !isNaN( value ) )
|
||||
( isWidth ? heightField : widthField ).setValue( value );
|
||||
}
|
||||
|
||||
// Set-up function for lock and reset buttons:
|
||||
// * Adds lock and reset buttons to focusables. Check if button exist first
|
||||
// because it may be disabled e.g. due to ACF restrictions.
|
||||
// * Register mouseover and mouseout event listeners for UI manipulations.
|
||||
// * Register click event listeners for buttons.
|
||||
function onLoadLockReset() {
|
||||
var dialog = this.getDialog();
|
||||
|
||||
function setupMouseClasses( el ) {
|
||||
el.on( 'mouseover', function() {
|
||||
this.addClass( 'cke_btn_over' );
|
||||
}, el );
|
||||
|
||||
el.on( 'mouseout', function() {
|
||||
this.removeClass( 'cke_btn_over' );
|
||||
}, el );
|
||||
}
|
||||
|
||||
// Create references to lock and reset buttons for this dialog instance.
|
||||
lockButton = doc.getById( lockButtonId );
|
||||
resetButton = doc.getById( resetButtonId );
|
||||
|
||||
// Activate (Un)LockRatio button
|
||||
if ( lockButton ) {
|
||||
dialog.addFocusable( lockButton, 4 );
|
||||
|
||||
lockButton.on( 'click', function( evt ) {
|
||||
toggleLockDimensions();
|
||||
evt.data && evt.data.preventDefault();
|
||||
}, this.getDialog() );
|
||||
|
||||
setupMouseClasses( lockButton );
|
||||
}
|
||||
|
||||
// Activate the reset size button.
|
||||
if ( resetButton ) {
|
||||
dialog.addFocusable( resetButton, 5 );
|
||||
|
||||
// Fills width and height fields with the original dimensions of the
|
||||
// image (stored in widget#data since widget#init).
|
||||
resetButton.on( 'click', function( evt ) {
|
||||
// If there's a new image loaded, reset button should revert
|
||||
// cached dimensions of pre-loaded DOM element.
|
||||
if ( srcChanged ) {
|
||||
widthField.setValue( preLoadedWidth );
|
||||
heightField.setValue( preLoadedHeight );
|
||||
}
|
||||
|
||||
// If the old image remains, reset button should revert
|
||||
// dimensions as loaded when the dialog was first shown.
|
||||
else {
|
||||
widthField.setValue( domWidth );
|
||||
heightField.setValue( domHeight );
|
||||
}
|
||||
|
||||
evt.data && evt.data.preventDefault();
|
||||
}, this );
|
||||
|
||||
setupMouseClasses( resetButton );
|
||||
}
|
||||
}
|
||||
|
||||
function toggleLockDimensions( enable ) {
|
||||
// No locking if there's no radio (i.e. due to ACF).
|
||||
if ( !lockButton )
|
||||
return;
|
||||
|
||||
var width, height;
|
||||
|
||||
// Check image ratio and original image ratio, but respecting user's
|
||||
// preference. This is performed when a new image is pre-loaded
|
||||
// but not if user already manually locked the ratio.
|
||||
if ( enable == 'check' && !userDefinedLock ) {
|
||||
width = widthField.getValue();
|
||||
height = heightField.getValue();
|
||||
|
||||
var domRatio = preLoadedWidth * 1000 / preLoadedHeight,
|
||||
ratio = width * 1000 / height;
|
||||
|
||||
lockRatio = false;
|
||||
|
||||
// Lock ratio, if there is no width and no height specified.
|
||||
if ( !width && !height )
|
||||
lockRatio = true;
|
||||
|
||||
// Lock ratio if there is at least width or height specified,
|
||||
// and the old ratio that matches the new one.
|
||||
else if ( !isNaN( domRatio + ratio ) && Math.round( domRatio ) == Math.round( ratio ) )
|
||||
lockRatio = true;
|
||||
}
|
||||
|
||||
// True or false.
|
||||
else if ( typeof enable == 'boolean' )
|
||||
lockRatio = enable;
|
||||
|
||||
// Undefined. User changed lock value.
|
||||
else {
|
||||
userDefinedLock = true;
|
||||
lockRatio = !lockRatio;
|
||||
|
||||
width = widthField.getValue();
|
||||
|
||||
// Automatically adjust height to width to match
|
||||
// the original ratio (based on dom- dimensions).
|
||||
if ( lockRatio && width ) {
|
||||
height = domHeight / domWidth * width;
|
||||
|
||||
if ( !isNaN( height ) )
|
||||
heightField.setValue( Math.round( height ) );
|
||||
}
|
||||
}
|
||||
|
||||
lockButton[ lockRatio ? 'removeClass' : 'addClass' ]( 'cke_btn_unlocked' );
|
||||
lockButton.setAttribute( 'aria-checked', lockRatio );
|
||||
|
||||
// Ratio button hc presentation - WHITE SQUARE / BLACK SQUARE
|
||||
if ( CKEDITOR.env.hc ) {
|
||||
var icon = lockButton.getChild( 0 );
|
||||
icon.setHtml( lockRatio ? CKEDITOR.env.ie ? '\u25A0' : '\u25A3' : CKEDITOR.env.ie ? '\u25A1' : '\u25A2' );
|
||||
}
|
||||
}
|
||||
|
||||
function toggleDimensions( enable ) {
|
||||
var method = enable ? 'enable' : 'disable';
|
||||
|
||||
widthField[ method ]();
|
||||
heightField[ method ]();
|
||||
}
|
||||
|
||||
return {
|
||||
title: lang.title,
|
||||
minWidth: 250,
|
||||
minHeight: 100,
|
||||
onLoad: function() {
|
||||
// Create a "global" reference to the document for this dialog instance.
|
||||
doc = this._.element.getDocument();
|
||||
|
||||
// Create a pre-loader used for determining dimensions of new images.
|
||||
preLoader = createPreLoader();
|
||||
},
|
||||
onShow: function() {
|
||||
// Create a "global" reference to edited widget.
|
||||
widget = this._.widget;
|
||||
|
||||
// Create a "global" reference to widget's image.
|
||||
image = widget.parts.image;
|
||||
|
||||
// Reset global variables.
|
||||
preLoadedWidth = preLoadedHeight = srcChanged =
|
||||
userDefinedLock = lockRatio = false;
|
||||
|
||||
// TODO: IE8
|
||||
// Get the natural width of the image.
|
||||
domWidth = image.$.naturalWidth;
|
||||
|
||||
// TODO: IE8
|
||||
// Get the natural height of the image.
|
||||
domHeight = image.$.naturalHeight;
|
||||
|
||||
// Determine image ratio lock on startup. Delayed, waiting for
|
||||
// fields to be filled with setup functions.
|
||||
setTimeout( function() {
|
||||
toggleLockDimensions( 'check' );
|
||||
} );
|
||||
},
|
||||
contents: [
|
||||
{
|
||||
id: 'info',
|
||||
elements: [
|
||||
{
|
||||
id: 'src',
|
||||
type: 'text',
|
||||
label: commonLang.url,
|
||||
onKeyup: function() {
|
||||
var value = this.getValue();
|
||||
|
||||
toggleDimensions( false );
|
||||
|
||||
// Remember that src is different than default.
|
||||
if ( value !== widget.data.src ) {
|
||||
// Update dimensions of the image once it's preloaded.
|
||||
preLoader( value, function( image, width, height ) {
|
||||
// Re-enable width and height fields.
|
||||
toggleDimensions( true );
|
||||
|
||||
// There was problem loading the image. Unlock ratio.
|
||||
if ( !image )
|
||||
return toggleLockDimensions( false );
|
||||
|
||||
// Fill width field with the width of the new image.
|
||||
widthField.setValue( width );
|
||||
|
||||
// Fill height field with the height of the new image.
|
||||
heightField.setValue( height );
|
||||
|
||||
// Cache the new width.
|
||||
preLoadedWidth = width;
|
||||
|
||||
// Cache the new height.
|
||||
preLoadedHeight = height;
|
||||
|
||||
// Check for new lock value if image exist.
|
||||
toggleLockDimensions( 'check' );
|
||||
} );
|
||||
|
||||
srcChanged = true;
|
||||
}
|
||||
|
||||
// Value is the same as in widget data but is was
|
||||
// modified back in time. Roll back dimensions when restoring
|
||||
// default src.
|
||||
else if ( srcChanged ) {
|
||||
// Re-enable width and height fields.
|
||||
toggleDimensions( true );
|
||||
|
||||
// Restore width field with cached width.
|
||||
widthField.setValue( domWidth );
|
||||
|
||||
// Restore height field with cached height.
|
||||
heightField.setValue( domHeight );
|
||||
|
||||
// Src equals default one back again.
|
||||
srcChanged = false;
|
||||
}
|
||||
|
||||
// Value is the same as in widget data and it hadn't
|
||||
// been modified.
|
||||
else {
|
||||
// Re-enable width and height fields.
|
||||
toggleDimensions( true );
|
||||
}
|
||||
},
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.src );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'src', this.getValue() );
|
||||
},
|
||||
validate: CKEDITOR.dialog.validate.notEmpty( lang.urlMissing )
|
||||
},
|
||||
{
|
||||
id: 'alt',
|
||||
type: 'text',
|
||||
label: lang.alt,
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.alt );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'alt', this.getValue() );
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'hbox',
|
||||
widths: [ '25%', '25%', '50%' ],
|
||||
requiredContent: 'img[width,height]',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
width: '45px',
|
||||
id: 'width',
|
||||
label: commonLang.width,
|
||||
validate: validateDimension,
|
||||
onKeyUp: onChangeDimension,
|
||||
onLoad: function() {
|
||||
widthField = this;
|
||||
},
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.width );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'width', this.getValue() );
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
id: 'height',
|
||||
width: '45px',
|
||||
label: commonLang.height,
|
||||
validate: validateDimension,
|
||||
onKeyUp: onChangeDimension,
|
||||
onLoad: function() {
|
||||
heightField = this;
|
||||
},
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.height );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'height', this.getValue() );
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'lock',
|
||||
type: 'html',
|
||||
style: lockResetStyle,
|
||||
onLoad: onLoadLockReset,
|
||||
html: lockResetHtml
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'hbox',
|
||||
id: 'alignment',
|
||||
children: [
|
||||
{
|
||||
id: 'align',
|
||||
type: 'radio',
|
||||
items: [
|
||||
[ 'None', 'none' ],
|
||||
[ 'Left', 'left' ],
|
||||
[ 'Center', 'center' ],
|
||||
[ 'Right', 'right' ] ],
|
||||
label: commonLang.align,
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.align );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'align', this.getValue() );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'hasCaption',
|
||||
type: 'checkbox',
|
||||
label: lang.captioned,
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.hasCaption );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'hasCaption', this.getValue() );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 756 B |
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'image2', 'en', {
|
||||
alt: 'Alternative Text', // Inherit from image plugin.
|
||||
captioned: 'Captioned image', // NEW property.
|
||||
lockRatio: 'Lock Ratio', // Inherit from image plugin.
|
||||
menu: 'Image Properties', // Inherit from image plugin.
|
||||
resetSize: 'Reset Size', // Inherit from image plugin.
|
||||
resizer: 'Click and drag to resize', // NEW property.
|
||||
title: 'Image Properties', // Inherit from image plugin.
|
||||
urlMissing: 'Image source URL is missing.' // Inherit from image plugin.
|
||||
} );
|
||||
@@ -0,0 +1,940 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
|
||||
var template =
|
||||
'<figure class="caption">' +
|
||||
'<img alt="" src="" />' +
|
||||
'<figcaption>Caption</figcaption>' +
|
||||
'</figure>',
|
||||
templateInline = '<img alt="" src="" />';
|
||||
|
||||
CKEDITOR.plugins.add( 'image2', {
|
||||
lang: 'en', // %REMOVE_LINE_CORE%
|
||||
requires: 'widget,dialog',
|
||||
icons: 'image2',
|
||||
hidpi: true,
|
||||
|
||||
onLoad: function( editor ) {
|
||||
CKEDITOR.addCss( '.cke_image2_resizer{' +
|
||||
'display:none;' +
|
||||
'position:absolute;' +
|
||||
'bottom:2px;' +
|
||||
'width: 0px;' +
|
||||
'height: 0px;' +
|
||||
'border-style:solid;' +
|
||||
// Bottom-right corner style of the resizer.
|
||||
'right:2px;' +
|
||||
'border-width:0 0 10px 10px;' +
|
||||
'border-color:transparent transparent #ccc transparent;' +
|
||||
CKEDITOR.tools.cssVendorPrefix( 'box-shadow', '1px 1px 0px #777', true ) + ';' +
|
||||
'cursor:se-resize;' +
|
||||
'}' +
|
||||
'.cke_image2_resizer_wrapper{' +
|
||||
'position:relative;' +
|
||||
'display:inline-block;' +
|
||||
'line-height:0;' +
|
||||
'}' +
|
||||
// Bottom-left corner style of the resizer.
|
||||
'.cke_image2_resizer.cke_image2_resizer_left{' +
|
||||
'right:auto;' +
|
||||
'left:2px;' +
|
||||
'border-width:10px 0 0 10px;' +
|
||||
'border-color:transparent transparent transparent #ccc;' +
|
||||
CKEDITOR.tools.cssVendorPrefix( 'box-shadow', '-1px 1px 0px #777', true ) + ';' +
|
||||
'cursor:sw-resize;' +
|
||||
'}' +
|
||||
'.cke_widget_wrapper:hover .cke_image2_resizer{display:block;}' );
|
||||
},
|
||||
|
||||
init: function( editor ) {
|
||||
// Register the inline widget.
|
||||
editor.widgets.add( 'image2inline', image2inline );
|
||||
|
||||
// Register the block widget.
|
||||
editor.widgets.add( 'image2block', image2block );
|
||||
|
||||
// Add the command for this plugin.
|
||||
editor.addCommand( 'image2', {
|
||||
exec: function() {
|
||||
var focused = getFocusedWidget( editor );
|
||||
|
||||
if ( focused )
|
||||
focused.edit();
|
||||
else
|
||||
editor.execCommand( 'image2inline' );
|
||||
}
|
||||
} );
|
||||
|
||||
// Add toolbar button for this plugin.
|
||||
editor.ui.addButton && editor.ui.addButton( 'image2', {
|
||||
label: editor.lang.common.image,
|
||||
command: 'image2',
|
||||
toolbar: 'insert,10'
|
||||
} );
|
||||
|
||||
// Integrate the plugin with context menus.
|
||||
if ( editor.contextMenu ) {
|
||||
editor.addMenuGroup( 'image2', 10 );
|
||||
|
||||
// Define a menu item for the plguin.
|
||||
editor.addMenuItem( 'image2', {
|
||||
label: editor.lang.image2.menu,
|
||||
command: 'image2',
|
||||
group: 'image2'
|
||||
} );
|
||||
|
||||
// Show the menu item in the context menu when a widget
|
||||
// is focused.
|
||||
editor.contextMenu.addListener( function() {
|
||||
var focused = getFocusedWidget( editor );
|
||||
|
||||
if ( focused )
|
||||
return { image2: CKEDITOR.TRISTATE_OFF };
|
||||
|
||||
return null;
|
||||
} );
|
||||
}
|
||||
|
||||
// Add the dialog associated with both widgets.
|
||||
CKEDITOR.dialog.add( 'image2', this.path + 'dialogs/image2.js' );
|
||||
},
|
||||
|
||||
afterInit: function( editor ) {
|
||||
var align = { left:1,right:1,center:1,block:1 },
|
||||
integrate = alignCommandIntegrator( editor );
|
||||
|
||||
for ( var value in align )
|
||||
integrate( value );
|
||||
}
|
||||
} );
|
||||
|
||||
// Default definition shared across widgets.
|
||||
var image2 = {
|
||||
// This widget converts style-driven dimensions to attributes.
|
||||
contentTransformations: [
|
||||
[ 'img[width]: sizeToAttribute' ]
|
||||
],
|
||||
|
||||
data: function() {
|
||||
var widget = this,
|
||||
editor = widget.editor,
|
||||
oldState = widget.oldData,
|
||||
newState = widget.data;
|
||||
|
||||
// Convert the internal form of the widget
|
||||
// from the old state to the new one.
|
||||
widget.shiftState( {
|
||||
element: widget.element,
|
||||
oldState: oldState,
|
||||
newState: newState,
|
||||
|
||||
// Destroy the widget.
|
||||
destroy: function() {
|
||||
if ( this.destroyed )
|
||||
return;
|
||||
|
||||
editor.widgets.destroy( widget );
|
||||
|
||||
// Mark widget was destroyed.
|
||||
this.destroyed = true;
|
||||
},
|
||||
|
||||
init: function( element ) {
|
||||
// Create a new widget. This widget will be either captioned
|
||||
// non-captioned, block or inline according to what is the
|
||||
// new state of the widget.
|
||||
if ( this.destroyed ) {
|
||||
var name = 'image2' + ( newState.hasCaption || newState.align == 'center' ? 'block' : 'inline' );
|
||||
widget = editor.widgets.initOn( element, name, widget.data );
|
||||
}
|
||||
|
||||
// If now widget was destroyed just update wrapper's alignment.
|
||||
// According to the new state.
|
||||
else
|
||||
setWrapperAlign( widget );
|
||||
}
|
||||
} );
|
||||
|
||||
// Get the <img> from the widget. As widget may have been
|
||||
// re-initialized, this may be a totally different <img>.
|
||||
var image = widget.parts.image;
|
||||
|
||||
image.setAttributes( {
|
||||
src: widget.data.src,
|
||||
|
||||
// This internal is required by the editor.
|
||||
'data-cke-saved-src': widget.data.src,
|
||||
|
||||
alt: widget.data.alt
|
||||
} );
|
||||
|
||||
// Set dimensions of the image according to gathered data.
|
||||
setDimensions( widget );
|
||||
|
||||
// Cache current data.
|
||||
widget.oldData = CKEDITOR.tools.extend( {}, widget.data );
|
||||
},
|
||||
|
||||
// The name of this widget's dialog.
|
||||
dialog: 'image2',
|
||||
|
||||
// Initialization of this widget.
|
||||
init: function() {
|
||||
var image = this.parts.image,
|
||||
data = {
|
||||
// Check whether widget has caption.
|
||||
hasCaption: !!this.parts.caption,
|
||||
|
||||
// Read initial image SRC attribute.
|
||||
src: image.getAttribute( 'src' ),
|
||||
|
||||
// Read initial image ALT attribute.
|
||||
alt: image.getAttribute( 'alt' ) || '',
|
||||
|
||||
// Read initial width from either attribute or style.
|
||||
width: image.getAttribute( 'width' ) || '',
|
||||
|
||||
// Read initial height from either attribute or style.
|
||||
height: image.getAttribute( 'height' ) || ''
|
||||
};
|
||||
|
||||
// If element was marked as centered when upcasting, update
|
||||
// the alignment both visually and in widget data.
|
||||
if ( this.element.data( 'cke-centered' ) ) {
|
||||
this.element.data( 'cke-centered', false );
|
||||
data.align = 'center';
|
||||
}
|
||||
|
||||
// Otherwise, read initial float style from figure/image and
|
||||
// then remove it. This style will be set on wrapper in #data listener.
|
||||
else {
|
||||
data.align = this.element.getStyle( 'float' ) || image.getStyle( 'float' ) || 'none';
|
||||
this.element.removeStyle( 'float' );
|
||||
image.removeStyle( 'float' );
|
||||
}
|
||||
|
||||
// Get rid of extra vertical space when there's no caption.
|
||||
// It will improve the look of the resizer.
|
||||
if ( !data.hasCaption )
|
||||
this.wrapper.setStyle( 'line-height', '0' );
|
||||
|
||||
// Set collected data.
|
||||
this.setData( data );
|
||||
|
||||
// Setup dynamic image resizing with mouse.
|
||||
setupResizer( this );
|
||||
|
||||
// Create shift stater for this widget.
|
||||
this.shiftState = CKEDITOR.plugins.image2.stateShifter( this.editor );
|
||||
},
|
||||
|
||||
// Widget downcasting.
|
||||
downcast: downcastWidgetElement
|
||||
},
|
||||
|
||||
image2inline = CKEDITOR.tools.extend( {
|
||||
// Widget-specific rules for Allowed Content Filter.
|
||||
allowedContent: {
|
||||
// This widget needs <img>.
|
||||
img: {
|
||||
attributes: '!src,alt,width,height',
|
||||
styles: 'float'
|
||||
}
|
||||
},
|
||||
|
||||
// This widget is inline.
|
||||
inline: true,
|
||||
|
||||
// Parts of this widget.
|
||||
parts: { image: 'img' },
|
||||
|
||||
// Template of the widget: plain image.
|
||||
template: templateInline,
|
||||
|
||||
// Widget upcasting.
|
||||
upcast: createUpcastFunction()
|
||||
}, image2 ),
|
||||
|
||||
image2block = CKEDITOR.tools.extend( {
|
||||
// Widget-specific rules for Allowed Content Filter.
|
||||
allowedContent: {
|
||||
// This widget needs <figcaption>.
|
||||
figcaption: true,
|
||||
|
||||
// This widget needs <figure>.
|
||||
figure: {
|
||||
classes: '!caption',
|
||||
styles: 'float,display'
|
||||
},
|
||||
|
||||
// This widget needs <img>.
|
||||
img: {
|
||||
attributes: '!src,alt,width,height'
|
||||
},
|
||||
|
||||
// This widget may need <div> centering wrapper.
|
||||
div: {
|
||||
match: isCenterWrapper,
|
||||
styles: 'text-align'
|
||||
},
|
||||
|
||||
// This widget may need <p> centering wrapper.
|
||||
p: {
|
||||
match: isCenterWrapper,
|
||||
styles: 'text-align'
|
||||
}
|
||||
},
|
||||
|
||||
// This widget has an editable caption.
|
||||
editables: {
|
||||
caption: {
|
||||
selector: 'figcaption',
|
||||
allowedContent: 'br em strong sub sup u; a[!href]'
|
||||
}
|
||||
},
|
||||
|
||||
// Parts of this widget: image and caption.
|
||||
parts: {
|
||||
image: 'img',
|
||||
caption: 'figcaption'
|
||||
},
|
||||
|
||||
// Template of the widget: figure with image and caption.
|
||||
template: template,
|
||||
|
||||
// Widget upcasting.
|
||||
upcast: createUpcastFunction( true )
|
||||
}, image2 );
|
||||
|
||||
CKEDITOR.plugins.image2 = {
|
||||
stateShifter: function( editor ) {
|
||||
// Tag name used for centering non-captioned widgets.
|
||||
var centerElement = editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div',
|
||||
|
||||
// The order that stateActions get executed. It matters!
|
||||
shiftables = [ 'hasCaption', 'align' ],
|
||||
|
||||
editable = editor.editable(),
|
||||
|
||||
// Atomic procedures, one per state variable.
|
||||
stateActions = {
|
||||
align: function( data, oldValue, newValue ) {
|
||||
var hasCaptionAfter = data.newState.hasCaption,
|
||||
element = data.element;
|
||||
|
||||
// Alignment changed.
|
||||
if ( changed( data, 'align' ) ) {
|
||||
// No caption in the new state.
|
||||
if ( !hasCaptionAfter ) {
|
||||
// Changed to "center" (non-captioned).
|
||||
if ( newValue == 'center' ) {
|
||||
data.destroy();
|
||||
data.element = wrapInCentering( element );
|
||||
}
|
||||
|
||||
// Changed to "non-center" from "center" while caption removed.
|
||||
if ( !changed( data, 'hasCaption' ) && oldValue == 'center' && newValue != 'center' ) {
|
||||
data.destroy();
|
||||
data.element = unwrapFromCentering( element );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Alignment remains and "center" removed caption.
|
||||
else if ( newValue == 'center' && changed( data, 'hasCaption' ) && !hasCaptionAfter ) {
|
||||
data.destroy();
|
||||
data.element = wrapInCentering( element );
|
||||
}
|
||||
|
||||
// Finally set display for figure.
|
||||
if ( element.is( 'figure' ) ) {
|
||||
if ( newValue == 'center' )
|
||||
element.setStyle( 'display', 'inline-block' );
|
||||
else
|
||||
element.removeStyle( 'display' );
|
||||
}
|
||||
},
|
||||
hasCaption: function( data, oldValue, newValue ) {
|
||||
// This action is for real state change only.
|
||||
if ( !changed( data, 'hasCaption' ) )
|
||||
return;
|
||||
|
||||
var element = data.element,
|
||||
oldState = data.oldState,
|
||||
newState = data.newState,
|
||||
img;
|
||||
|
||||
// Switching hasCaption always destroys the widget.
|
||||
data.destroy();
|
||||
|
||||
// There was no caption, but the caption is to be added.
|
||||
if ( newValue ) {
|
||||
// Get <img> from element. As element may be either
|
||||
// <img> or centering <p>, consider it now.
|
||||
img = element.findOne( 'img' ) || element;
|
||||
|
||||
// Create new <figure> from widget template.
|
||||
var figure = CKEDITOR.dom.element.createFromHtml( template, editor.document );
|
||||
|
||||
// Replace element with <figure>.
|
||||
replaceSafely( figure, element );
|
||||
|
||||
// Use old <img> instead of the one from the template,
|
||||
// so we won't lose additional attributes.
|
||||
img.replace( figure.findOne( 'img' ) );
|
||||
|
||||
// Update widget's element.
|
||||
data.element = figure;
|
||||
}
|
||||
|
||||
// The caption was present, but now it's to be removed.
|
||||
else {
|
||||
// Unwrap <img> from figure.
|
||||
img = element.findOne( 'img' );
|
||||
|
||||
// Replace <figure> with <img>.
|
||||
img.replace( element );
|
||||
|
||||
// Update widget's element.
|
||||
data.element = img;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function getValue( state, name ) {
|
||||
return state && state[ name ] !== undefined ? state[ name ] : null;
|
||||
}
|
||||
|
||||
function changed( data, name ) {
|
||||
if ( !data.oldState )
|
||||
return false;
|
||||
else
|
||||
return data.oldState[ name ] !== data.newState[ name ];
|
||||
}
|
||||
|
||||
function wrapInCentering( element ) {
|
||||
// When widget gets centered. Wrapper must be created.
|
||||
// Create new <p|div> with text-align:center.
|
||||
var center = editor.document.createElement( centerElement, {
|
||||
// Centering wrapper is.. centering.
|
||||
styles: { 'text-align': 'center' }
|
||||
} );
|
||||
|
||||
// Replace element with centering wrapper.
|
||||
replaceSafely( center, element );
|
||||
|
||||
// Append element into centering wrapper.
|
||||
element.move( center );
|
||||
|
||||
return center;
|
||||
}
|
||||
|
||||
function unwrapFromCentering( element ) {
|
||||
var img = element.findOne( 'img' );
|
||||
|
||||
img.replace( element );
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
function replaceSafely( replacing, replaced ) {
|
||||
if ( replaced.getParent() ) {
|
||||
// Create a range that corresponds with old element's position.
|
||||
var range = editor.createRange();
|
||||
|
||||
// Move the range before old element.
|
||||
range.moveToPosition( replaced, CKEDITOR.POSITION_BEFORE_START );
|
||||
|
||||
// Insert element at range position.
|
||||
editable.insertElementIntoRange( replacing, range );
|
||||
|
||||
// Remove old element.
|
||||
replaced.remove();
|
||||
}
|
||||
else
|
||||
replacing.replace( replaced );
|
||||
}
|
||||
|
||||
return function( data ) {
|
||||
var oldState = data.oldState,
|
||||
newState = data.newState,
|
||||
name;
|
||||
|
||||
// Iterate over possible state variables.
|
||||
for ( var i = 0; i < shiftables.length; i++ ) {
|
||||
name = shiftables[ i ];
|
||||
|
||||
stateActions[ name ]( data,
|
||||
oldState ? oldState[ name ] : null,
|
||||
newState[ name ] );
|
||||
}
|
||||
|
||||
data.init( data.element );
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
function setWrapperAlign( widget ) {
|
||||
var wrapper = widget.wrapper,
|
||||
align = widget.data.align;
|
||||
|
||||
if ( align == 'center' ) {
|
||||
if ( !widget.inline )
|
||||
wrapper.setStyle( 'text-align', 'center' );
|
||||
|
||||
wrapper.removeStyle( 'float' );
|
||||
} else {
|
||||
if ( !widget.inline )
|
||||
wrapper.removeStyle( 'text-align' );
|
||||
|
||||
if ( align == 'none' )
|
||||
wrapper.removeStyle( 'float' );
|
||||
else
|
||||
wrapper.setStyle( 'float', align );
|
||||
}
|
||||
}
|
||||
|
||||
// Creates widgets from all <img> and <figure class="caption">.
|
||||
//
|
||||
// @param {CKEDITOR.htmlParser.element} el
|
||||
function createUpcastFunction( isBlock ) {
|
||||
var regexPercent = /^\s*(\d+\%)\s*$/i,
|
||||
dimensions = { width:1,height:1 };
|
||||
|
||||
function upcastElement( el, isBlock, isCenter ) {
|
||||
var name = el.name,
|
||||
image;
|
||||
|
||||
// Block widget to be upcasted.
|
||||
if ( isBlock ) {
|
||||
// If a center wrapper is found.
|
||||
if ( isCenter ) {
|
||||
// So the element is:
|
||||
// <div style="text-align:center"><figure></figure></div>.
|
||||
// Centering is done by widget.wrapper in such case. Hence, replace
|
||||
// centering wrapper with figure.
|
||||
// The other case is:
|
||||
// <p style="text-align:center"><img></p>.
|
||||
// Then <p> takes charge of <figure> and nothing is to be changed.
|
||||
if ( name == 'div' ) {
|
||||
var figure = el.getFirst( 'figure' );
|
||||
el.replaceWith( figure );
|
||||
el = figure;
|
||||
}
|
||||
|
||||
// Mark the element as centered, so widget.data.align
|
||||
// can be correctly filled on init.
|
||||
el.attributes[ 'data-cke-centered' ] = true;
|
||||
|
||||
image = el.getFirst( 'img' );
|
||||
}
|
||||
|
||||
// No center wrapper has been found.
|
||||
else if ( name == 'figure' && el.hasClass( 'caption' ) )
|
||||
image = el.getFirst( 'img' );
|
||||
}
|
||||
|
||||
// Inline widget from plain img.
|
||||
else if ( name == 'img' )
|
||||
image = el;
|
||||
|
||||
if ( !image )
|
||||
return;
|
||||
|
||||
// If there's an image, then cool, we got a widget.
|
||||
// Now just remove dimension attributes expressed with %.
|
||||
for ( var d in dimensions ) {
|
||||
var dimension = image.attributes[ d ];
|
||||
|
||||
if ( dimension && dimension.match( regexPercent ) )
|
||||
delete image.attributes[ d ];
|
||||
}
|
||||
|
||||
return el;
|
||||
}
|
||||
|
||||
return isBlock ?
|
||||
function( el ) {
|
||||
return upcastElement( el, true, isCenterWrapper( el ) );
|
||||
}
|
||||
:
|
||||
function( el ) {
|
||||
// Basically upcast the element if there is no special
|
||||
// wrapper around.
|
||||
return upcastElement( el );
|
||||
};
|
||||
}
|
||||
|
||||
// Transforms the widget to the external format according to
|
||||
// the current configuration.
|
||||
//
|
||||
// @param {CKEDITOR.htmlParser.element} el
|
||||
function downcastWidgetElement( el ) {
|
||||
var attrs = el.attributes,
|
||||
align = this.data.align;
|
||||
|
||||
// De-wrap the image from resize handle wrapper.
|
||||
// Only block widgets have one.
|
||||
if ( !this.inline ) {
|
||||
var resizeWrapper = el.getFirst( 'span' ),
|
||||
img = resizeWrapper.getFirst( 'img' );
|
||||
|
||||
resizeWrapper.replaceWith( img );
|
||||
}
|
||||
|
||||
if ( align && align != 'none' ) {
|
||||
// Parse element styles. Styles will be extended.
|
||||
var styles = CKEDITOR.tools.parseCssText( attrs.style || '' );
|
||||
|
||||
// If centering, wrap downcasted element.
|
||||
// Wrappers for <img> and <figure> are <p> and <div>, respectively.
|
||||
if ( align == 'center' && el.name != 'p' ) {
|
||||
var name = el.name == 'img' ? 'p' : 'div';
|
||||
|
||||
el = el.wrapWith( new CKEDITOR.htmlParser.element( name, {
|
||||
'style': 'text-align:center'
|
||||
} ) );
|
||||
}
|
||||
|
||||
// If left/right, add float style to the downcasted element.
|
||||
else if ( align in { left:1,right:1 } )
|
||||
styles[ 'float' ] = align;
|
||||
|
||||
// Update element styles.
|
||||
if ( !CKEDITOR.tools.isEmpty( styles ) )
|
||||
attrs.style = CKEDITOR.tools.writeCssText( styles );
|
||||
}
|
||||
|
||||
return el;
|
||||
}
|
||||
|
||||
function isCenterWrapper( el ) {
|
||||
// Wrapper must be either <div> or <p>.
|
||||
if ( !( el.name in { div:1,p:1 } ) )
|
||||
return false;
|
||||
|
||||
var children = el.children;
|
||||
|
||||
// Centering wrapper can have only one child.
|
||||
if ( children.length !== 1 )
|
||||
return false;
|
||||
|
||||
var styles = CKEDITOR.tools.parseCssText( el.attributes.style || '' );
|
||||
|
||||
// Centering wrapper got to be... centering.
|
||||
if ( !styles[ 'text-align' ] || styles[ 'text-align' ] != 'center' )
|
||||
return false;
|
||||
|
||||
var child = children[ 0 ],
|
||||
childName = child.name;
|
||||
|
||||
// The only child of centering wrapper can be <figure> with
|
||||
// class="caption" or plain <img>.
|
||||
if ( childName == 'img' || ( childName == 'figure' && child.hasClass( 'caption' ) ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Sets width and height of the widget image according to
|
||||
// current widget data.
|
||||
//
|
||||
// @param {CKEDITOR.plugins.widget} widget
|
||||
function setDimensions( widget ) {
|
||||
var dimensions = CKEDITOR.tools.extend( {}, widget.data, false, { width:1,height:1 } ),
|
||||
image = widget.parts.image;
|
||||
|
||||
for ( var d in dimensions ) {
|
||||
if ( dimensions[ d ] )
|
||||
image.setAttribute( d, dimensions[ d ] );
|
||||
else
|
||||
image.removeAttribute( d );
|
||||
}
|
||||
}
|
||||
|
||||
// Defines all features related to drag-driven image resizing.
|
||||
// @param {CKEDITOR.plugins.widget} widget
|
||||
function setupResizer( widget ) {
|
||||
var editor = widget.editor,
|
||||
doc = editor.document,
|
||||
resizer = doc.createElement( 'span' );
|
||||
|
||||
resizer.addClass( 'cke_image2_resizer' );
|
||||
resizer.setAttribute( 'title', editor.lang.image2.resizer );
|
||||
resizer.append( new CKEDITOR.dom.text( '\u200b', doc ) );
|
||||
|
||||
// Inline widgets don't need a resizer wrapper as an image spans the entire widget.
|
||||
if ( !widget.inline ) {
|
||||
var oldResizeWrapper = widget.element.getFirst(),
|
||||
resizeWrapper = doc.createElement( 'span' );
|
||||
|
||||
resizeWrapper.addClass( 'cke_image2_resizer_wrapper' );
|
||||
resizeWrapper.append( widget.parts.image );
|
||||
resizeWrapper.append( resizer );
|
||||
widget.element.append( resizeWrapper, true );
|
||||
|
||||
// Remove the old wrapper which could came from e.g. pasted HTML
|
||||
// and which could be corrupted (e.g. resizer span has been lost).
|
||||
if ( oldResizeWrapper.is( 'span' ) )
|
||||
oldResizeWrapper.remove();
|
||||
} else
|
||||
widget.wrapper.append( resizer );
|
||||
|
||||
// Calculate values of size variables and mouse offsets.
|
||||
// Start observing mousemove.
|
||||
resizer.on( 'mousedown', function( evt ) {
|
||||
var image = widget.parts.image,
|
||||
|
||||
// "factor" can be either 1 or -1. I.e.: For right-aligned images, we need to
|
||||
// subtract the difference to get proper width, etc. Without "factor",
|
||||
// resizer starts working the opposite way.
|
||||
factor = widget.data.align == 'right' ? -1 : 1,
|
||||
|
||||
// The x-coordinate of the mouse relative to the screen
|
||||
// when button gets pressed.
|
||||
startX = evt.data.$.screenX,
|
||||
startY = evt.data.$.screenY,
|
||||
|
||||
// The initial dimensions and aspect ratio of the image.
|
||||
startWidth = image.$.clientWidth,
|
||||
startHeight = image.$.clientHeight,
|
||||
ratio = startWidth / startHeight,
|
||||
|
||||
moveListeners = [],
|
||||
|
||||
nativeEvt, newWidth, newHeight, updateData,
|
||||
moveDiffX, moveDiffY, moveRatio;
|
||||
|
||||
// Save the undo snapshot first: before resizing.
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
// Mousemove listeners are removed on mouseup.
|
||||
attachToDocuments( 'mousemove', onMouseMove, moveListeners );
|
||||
|
||||
// Clean up the mousemove listener. Update widget data if valid.
|
||||
attachToDocuments( 'mouseup', onMouseUp );
|
||||
|
||||
// Attaches an event to a global document if inline editor.
|
||||
// Additionally, if framed, also attaches the same event to iframe's document.
|
||||
function attachToDocuments( name, callback, collection ) {
|
||||
var globalDoc = CKEDITOR.document,
|
||||
listeners = [];
|
||||
|
||||
if ( !doc.equals( globalDoc ) )
|
||||
listeners.push( globalDoc.on( name, callback ) );
|
||||
|
||||
listeners.push( doc.on( name, callback ) );
|
||||
|
||||
if ( collection ) {
|
||||
for ( var i = listeners.length; i--; )
|
||||
collection.push( listeners.pop() );
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate with first, and then adjust height, preserving ratio.
|
||||
function adjustToX() {
|
||||
newWidth = startWidth + factor * moveDiffX;
|
||||
newHeight = 0 | newWidth / ratio;
|
||||
}
|
||||
|
||||
// Calculate height first, and then adjust width, preserving ratio.
|
||||
function adjustToY() {
|
||||
newHeight = startHeight - moveDiffY;
|
||||
newWidth = 0 | newHeight * ratio;
|
||||
}
|
||||
|
||||
// This is how variables refer to the geometry.
|
||||
// Note: x corresponds to moveOffset, this is the position of mouse
|
||||
// Note: o corresponds to [startX, startY].
|
||||
//
|
||||
// +--------------+--------------+
|
||||
// | | |
|
||||
// | I | II |
|
||||
// | | |
|
||||
// +------------- o -------------+ _ _ _
|
||||
// | | | ^
|
||||
// | VI | III | | moveDiffY
|
||||
// | | x _ _ _ _ _ v
|
||||
// +--------------+---------|----+
|
||||
// | |
|
||||
// <------->
|
||||
// moveDiffX
|
||||
function onMouseMove( evt ) {
|
||||
nativeEvt = evt.data.$;
|
||||
|
||||
// This is how far the mouse is from the point the button was pressed.
|
||||
moveDiffX = nativeEvt.screenX - startX;
|
||||
moveDiffY = startY - nativeEvt.screenY;
|
||||
|
||||
// This is the aspect ratio of the move difference.
|
||||
moveRatio = Math.abs( moveDiffX / moveDiffY );
|
||||
|
||||
// Left, center or none-aligned widget.
|
||||
if ( factor == 1 ) {
|
||||
if ( moveDiffX <= 0 ) {
|
||||
// Case: IV.
|
||||
if ( moveDiffY <= 0 )
|
||||
adjustToX();
|
||||
|
||||
// Case: I.
|
||||
else {
|
||||
if ( moveRatio >= ratio )
|
||||
adjustToX();
|
||||
else
|
||||
adjustToY();
|
||||
}
|
||||
} else {
|
||||
// Case: III.
|
||||
if ( moveDiffY <= 0 ) {
|
||||
if ( moveRatio >= ratio )
|
||||
adjustToY();
|
||||
else
|
||||
adjustToX();
|
||||
}
|
||||
|
||||
// Case: II.
|
||||
else
|
||||
adjustToY();
|
||||
}
|
||||
}
|
||||
|
||||
// Right-aligned widget. It mirrors behaviours, so I becomes II,
|
||||
// IV becomes III and vice-versa.
|
||||
else {
|
||||
if ( moveDiffX <= 0 ) {
|
||||
// Case: IV.
|
||||
if ( moveDiffY <= 0 ) {
|
||||
if ( moveRatio >= ratio )
|
||||
adjustToY();
|
||||
else
|
||||
adjustToX();
|
||||
}
|
||||
|
||||
// Case: I.
|
||||
else
|
||||
adjustToY();
|
||||
} else {
|
||||
// Case: III.
|
||||
if ( moveDiffY <= 0 )
|
||||
adjustToX();
|
||||
|
||||
// Case: II.
|
||||
else {
|
||||
if ( moveRatio >= ratio )
|
||||
adjustToX();
|
||||
else
|
||||
adjustToY();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't update attributes if less than 10.
|
||||
// This is to prevent images to visually disappear.
|
||||
if ( newWidth >= 15 && newHeight >= 15 ) {
|
||||
image.setAttributes( { width: newWidth, height: newHeight } );
|
||||
updateData = true;
|
||||
} else
|
||||
updateData = false;
|
||||
}
|
||||
|
||||
function onMouseUp( evt ) {
|
||||
var l;
|
||||
|
||||
while ( ( l = moveListeners.pop() ) )
|
||||
l.removeListener();
|
||||
|
||||
if ( updateData ) {
|
||||
widget.setData( { width: newWidth, height: newHeight } );
|
||||
|
||||
// Save another undo snapshot: after resizing.
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}
|
||||
|
||||
// Don't update data twice or more.
|
||||
updateData = false;
|
||||
}
|
||||
} );
|
||||
|
||||
// Change the position of the widget resizer when data changes.
|
||||
widget.on( 'data', function() {
|
||||
resizer[ widget.data.align == 'right' ? 'addClass' : 'removeClass' ]( 'cke_image2_resizer_left' );
|
||||
} );
|
||||
}
|
||||
|
||||
// Integrates widget alignment setting with justify
|
||||
// plugin's commands (execution and refreshment).
|
||||
// @param {CKEDITOR.editor} editor
|
||||
// @param {String} value 'left', 'right', 'center' or 'block'
|
||||
function alignCommandIntegrator( editor ) {
|
||||
var execCallbacks = [];
|
||||
|
||||
return function( value ) {
|
||||
var command = editor.getCommand( 'justify' + value );
|
||||
|
||||
// Most likely, the justify plugin isn't loaded.
|
||||
if ( !command )
|
||||
return;
|
||||
|
||||
// This command will be manually refreshed along with
|
||||
// other commands after exec.
|
||||
execCallbacks.push( function() {
|
||||
command.refresh( editor, editor.elementPath() );
|
||||
} );
|
||||
|
||||
if ( value in { right:1,left:1,center:1 } ) {
|
||||
command.on( 'exec', function( evt ) {
|
||||
var widget = getFocusedWidget( editor );
|
||||
|
||||
if ( widget ) {
|
||||
widget.setData( 'align', value );
|
||||
|
||||
// Once the widget changed its align, all the align commands
|
||||
// must be refreshed: the event is to be cancelled.
|
||||
for ( var i = execCallbacks.length; i--; )
|
||||
execCallbacks[ i ]();
|
||||
|
||||
evt.cancel();
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
command.on( 'refresh', function( evt ) {
|
||||
var widget = getFocusedWidget( editor ),
|
||||
allowed = { right:1,left:1,center:1 };
|
||||
|
||||
if ( !widget )
|
||||
return;
|
||||
|
||||
this.setState(
|
||||
( widget.data.align == value ) ?
|
||||
CKEDITOR.TRISTATE_ON
|
||||
:
|
||||
( value in allowed ) ?
|
||||
CKEDITOR.TRISTATE_OFF
|
||||
:
|
||||
CKEDITOR.TRISTATE_DISABLED );
|
||||
|
||||
evt.cancel();
|
||||
} );
|
||||
};
|
||||
}
|
||||
|
||||
// Returns the focused widget, if of the type specific for this plugin.
|
||||
// If no widget is focused, `null` is returned.
|
||||
// @param {CKEDITOR.editor}
|
||||
// @returns {CKEDITOR.plugins.widget}
|
||||
function getFocusedWidget( editor ) {
|
||||
var widget = editor.widgets.focused;
|
||||
|
||||
if ( widget && widget.name in { image2inline:1,image2block:1 } )
|
||||
return widget;
|
||||
|
||||
return null;
|
||||
}
|
||||
})();
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'indent', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'indent', 'en', {
|
||||
indent: 'Increase Indent',
|
||||
outdent: 'Decrease Indent'
|
||||
});
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'justify', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'justify', 'en', {
|
||||
block: 'Justify',
|
||||
center: 'Centre',
|
||||
center: 'Center',
|
||||
left: 'Align Left',
|
||||
right: 'Align Right'
|
||||
});
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'link', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'link', 'en', {
|
||||
acccessKey: 'Access Key',
|
||||
advanced: 'Advanced',
|
||||
advisoryContentType: 'Advisory Content Type',
|
||||
@@ -45,7 +45,7 @@ CKEDITOR.plugins.setLang( 'link', 'en-gb', {
|
||||
popupStatusBar: 'Status Bar',
|
||||
popupToolbar: 'Toolbar',
|
||||
popupTop: 'Top Position',
|
||||
rel: 'Relationship', // MISSING
|
||||
rel: 'Relationship',
|
||||
selectAnchor: 'Select an Anchor',
|
||||
styles: 'Style',
|
||||
tabIndex: 'Tab Index',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'list', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'list', 'en', {
|
||||
bulletedlist: 'Insert/Remove Bulleted List',
|
||||
numberedlist: 'Insert/Remove Numbered List'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'liststyle', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'liststyle', 'en', {
|
||||
armenian: 'Armenian numbering',
|
||||
bulletedTitle: 'Bulleted List Properties',
|
||||
circle: 'Circle',
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'magicline', 'en', {
|
||||
title: 'Insert paragraph here'
|
||||
});
|
||||
@@ -1,8 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'maximize', 'en-gb', {
|
||||
maximize: 'Maximise',
|
||||
minimize: 'Minimise'
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'maximize', 'en', {
|
||||
maximize: 'Maximize',
|
||||
minimize: 'Minimize'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'newpage', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'newpage', 'en', {
|
||||
toolbar: 'New Page'
|
||||
});
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'pagebreak', 'en-gb', {
|
||||
alt: 'Page Break', // MISSING
|
||||
CKEDITOR.plugins.setLang( 'pagebreak', 'en', {
|
||||
alt: 'Page Break',
|
||||
toolbar: 'Insert Page Break for Printing'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'pastefromword', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'pastefromword', 'en', {
|
||||
confirmCleanup: 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?',
|
||||
error: 'It was not possible to clean up the pasted data due to an internal error',
|
||||
title: 'Paste from Word',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'pastetext', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'pastetext', 'en', {
|
||||
button: 'Paste as plain text',
|
||||
title: 'Paste as Plain Text'
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'placeholder', 'en', {
|
||||
title: 'Placeholder Properties',
|
||||
toolbar: 'Create Placeholder',
|
||||
text: 'Placeholder Text',
|
||||
edit: 'Edit Placeholder',
|
||||
textMissing: 'The placeholder must contain text.'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'preview', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'preview', 'en', {
|
||||
preview: 'Preview'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'print', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'print', 'en', {
|
||||
toolbar: 'Print'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'removeformat', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'removeformat', 'en', {
|
||||
toolbar: 'Remove Format'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'save', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'save', 'en', {
|
||||
toolbar: 'Save'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'selectall', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'selectall', 'en', {
|
||||
toolbar: 'Select All'
|
||||
});
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'showblocks', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'showblocks', 'en', {
|
||||
toolbar: 'Show Blocks'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'smiley', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'smiley', 'en', {
|
||||
options: 'Smiley Options',
|
||||
title: 'Insert a Smiley',
|
||||
toolbar: 'Smiley'
|
||||
@@ -40,20 +40,20 @@ CKEDITOR.plugins.add( 'smiley', {
|
||||
*
|
||||
* // This is actually the default value.
|
||||
* config.smiley_images = [
|
||||
* 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tongue_smile.gif',
|
||||
* 'embarrassed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
|
||||
* 'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
|
||||
* 'broken_heart.gif','kiss.gif','envelope.gif'
|
||||
* 'regular_smile.png','sad_smile.png','wink_smile.png','teeth_smile.png','confused_smile.png','tongue_smile.png',
|
||||
* 'embarrassed_smile.png','omg_smile.png','whatchutalkingabout_smile.png','angry_smile.png','angel_smile.png','shades_smile.png',
|
||||
* 'devil_smile.png','cry_smile.png','lightbulb.png','thumbs_down.png','thumbs_up.png','heart.png',
|
||||
* 'broken_heart.png','kiss.png','envelope.png'
|
||||
* ];
|
||||
*
|
||||
* @cfg
|
||||
* @member CKEDITOR.config
|
||||
*/
|
||||
CKEDITOR.config.smiley_images = [
|
||||
'regular_smile.gif', 'sad_smile.gif', 'wink_smile.gif', 'teeth_smile.gif', 'confused_smile.gif', 'tongue_smile.gif',
|
||||
'embarrassed_smile.gif', 'omg_smile.gif', 'whatchutalkingabout_smile.gif', 'angry_smile.gif', 'angel_smile.gif', 'shades_smile.gif',
|
||||
'devil_smile.gif', 'cry_smile.gif', 'lightbulb.gif', 'thumbs_down.gif', 'thumbs_up.gif', 'heart.gif',
|
||||
'broken_heart.gif', 'kiss.gif', 'envelope.gif' ];
|
||||
'regular_smile.png', 'sad_smile.png', 'wink_smile.png', 'teeth_smile.png', 'confused_smile.png', 'tongue_smile.png',
|
||||
'embarrassed_smile.png', 'omg_smile.png', 'whatchutalkingabout_smile.png', 'angry_smile.png', 'angel_smile.png', 'shades_smile.png',
|
||||
'devil_smile.png', 'cry_smile.png', 'lightbulb.png', 'thumbs_down.png', 'thumbs_up.png', 'heart.png',
|
||||
'broken_heart.png', 'kiss.png', 'envelope.png' ];
|
||||
|
||||
/**
|
||||
* The description to be used for each of the smileys defined in the
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'sourcearea', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'sourcearea', 'en', {
|
||||
toolbar: 'Source'
|
||||
});
|
||||
+1
-1
@@ -3,7 +3,7 @@ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'sourcedialog', 'en', {
|
||||
toolbar: 'Source',
|
||||
title: 'Source'
|
||||
});
|
||||
@@ -0,0 +1,125 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'specialchar', 'en', {
|
||||
euro: 'Euro sign',
|
||||
lsquo: 'Left single quotation mark',
|
||||
rsquo: 'Right single quotation mark',
|
||||
ldquo: 'Left double quotation mark',
|
||||
rdquo: 'Right double quotation mark',
|
||||
ndash: 'En dash',
|
||||
mdash: 'Em dash',
|
||||
iexcl: 'Inverted exclamation mark',
|
||||
cent: 'Cent sign',
|
||||
pound: 'Pound sign',
|
||||
curren: 'Currency sign',
|
||||
yen: 'Yen sign',
|
||||
brvbar: 'Broken bar',
|
||||
sect: 'Section sign',
|
||||
uml: 'Diaeresis',
|
||||
copy: 'Copyright sign',
|
||||
ordf: 'Feminine ordinal indicator',
|
||||
laquo: 'Left-pointing double angle quotation mark',
|
||||
not: 'Not sign',
|
||||
reg: 'Registered sign',
|
||||
macr: 'Macron',
|
||||
deg: 'Degree sign',
|
||||
sup2: 'Superscript two',
|
||||
sup3: 'Superscript three',
|
||||
acute: 'Acute accent',
|
||||
micro: 'Micro sign',
|
||||
para: 'Pilcrow sign',
|
||||
middot: 'Middle dot',
|
||||
cedil: 'Cedilla',
|
||||
sup1: 'Superscript one',
|
||||
ordm: 'Masculine ordinal indicator',
|
||||
raquo: 'Right-pointing double angle quotation mark',
|
||||
frac14: 'Vulgar fraction one quarter',
|
||||
frac12: 'Vulgar fraction one half',
|
||||
frac34: 'Vulgar fraction three quarters',
|
||||
iquest: 'Inverted question mark',
|
||||
Agrave: 'Latin capital letter A with grave accent',
|
||||
Aacute: 'Latin capital letter A with acute accent',
|
||||
Acirc: 'Latin capital letter A with circumflex',
|
||||
Atilde: 'Latin capital letter A with tilde',
|
||||
Auml: 'Latin capital letter A with diaeresis',
|
||||
Aring: 'Latin capital letter A with ring above',
|
||||
AElig: 'Latin Capital letter Æ',
|
||||
Ccedil: 'Latin capital letter C with cedilla',
|
||||
Egrave: 'Latin capital letter E with grave accent',
|
||||
Eacute: 'Latin capital letter E with acute accent',
|
||||
Ecirc: 'Latin capital letter E with circumflex',
|
||||
Euml: 'Latin capital letter E with diaeresis',
|
||||
Igrave: 'Latin capital letter I with grave accent',
|
||||
Iacute: 'Latin capital letter I with acute accent',
|
||||
Icirc: 'Latin capital letter I with circumflex',
|
||||
Iuml: 'Latin capital letter I with diaeresis',
|
||||
ETH: 'Latin capital letter Eth',
|
||||
Ntilde: 'Latin capital letter N with tilde',
|
||||
Ograve: 'Latin capital letter O with grave accent',
|
||||
Oacute: 'Latin capital letter O with acute accent',
|
||||
Ocirc: 'Latin capital letter O with circumflex',
|
||||
Otilde: 'Latin capital letter O with tilde',
|
||||
Ouml: 'Latin capital letter O with diaeresis',
|
||||
times: 'Multiplication sign',
|
||||
Oslash: 'Latin capital letter O with stroke',
|
||||
Ugrave: 'Latin capital letter U with grave accent',
|
||||
Uacute: 'Latin capital letter U with acute accent',
|
||||
Ucirc: 'Latin capital letter U with circumflex',
|
||||
Uuml: 'Latin capital letter U with diaeresis',
|
||||
Yacute: 'Latin capital letter Y with acute accent',
|
||||
THORN: 'Latin capital letter Thorn',
|
||||
szlig: 'Latin small letter sharp s',
|
||||
agrave: 'Latin small letter a with grave accent',
|
||||
aacute: 'Latin small letter a with acute accent',
|
||||
acirc: 'Latin small letter a with circumflex',
|
||||
atilde: 'Latin small letter a with tilde',
|
||||
auml: 'Latin small letter a with diaeresis',
|
||||
aring: 'Latin small letter a with ring above',
|
||||
aelig: 'Latin small letter æ',
|
||||
ccedil: 'Latin small letter c with cedilla',
|
||||
egrave: 'Latin small letter e with grave accent',
|
||||
eacute: 'Latin small letter e with acute accent',
|
||||
ecirc: 'Latin small letter e with circumflex',
|
||||
euml: 'Latin small letter e with diaeresis',
|
||||
igrave: 'Latin small letter i with grave accent',
|
||||
iacute: 'Latin small letter i with acute accent',
|
||||
icirc: 'Latin small letter i with circumflex',
|
||||
iuml: 'Latin small letter i with diaeresis',
|
||||
eth: 'Latin small letter eth',
|
||||
ntilde: 'Latin small letter n with tilde',
|
||||
ograve: 'Latin small letter o with grave accent',
|
||||
oacute: 'Latin small letter o with acute accent',
|
||||
ocirc: 'Latin small letter o with circumflex',
|
||||
otilde: 'Latin small letter o with tilde',
|
||||
ouml: 'Latin small letter o with diaeresis',
|
||||
divide: 'Division sign',
|
||||
oslash: 'Latin small letter o with stroke',
|
||||
ugrave: 'Latin small letter u with grave accent',
|
||||
uacute: 'Latin small letter u with acute accent',
|
||||
ucirc: 'Latin small letter u with circumflex',
|
||||
uuml: 'Latin small letter u with diaeresis',
|
||||
yacute: 'Latin small letter y with acute accent',
|
||||
thorn: 'Latin small letter thorn',
|
||||
yuml: 'Latin small letter y with diaeresis',
|
||||
OElig: 'Latin capital ligature OE',
|
||||
oelig: 'Latin small ligature oe',
|
||||
'372': 'Latin capital letter W with circumflex',
|
||||
'374': 'Latin capital letter Y with circumflex',
|
||||
'373': 'Latin small letter w with circumflex',
|
||||
'375': 'Latin small letter y with circumflex',
|
||||
sbquo: 'Single low-9 quotation mark',
|
||||
'8219': 'Single high-reversed-9 quotation mark',
|
||||
bdquo: 'Double low-9 quotation mark',
|
||||
hellip: 'Horizontal ellipsis',
|
||||
trade: 'Trade mark sign',
|
||||
'9658': 'Black right-pointing pointer',
|
||||
bull: 'Bullet',
|
||||
rarr: 'Rightwards arrow',
|
||||
rArr: 'Rightwards double arrow',
|
||||
hArr: 'Left right double arrow',
|
||||
diams: 'Black diamond suit',
|
||||
asymp: 'Almost equal to'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'specialchar', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'specialchar', 'en', {
|
||||
options: 'Special Character Options',
|
||||
title: 'Select Special Character',
|
||||
toolbar: 'Insert Special Character'
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'en', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Formatting Styles',
|
||||
panelTitle1: 'Block Styles',
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'table', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'table', 'en', {
|
||||
border: 'Border size',
|
||||
caption: 'Caption',
|
||||
cell: {
|
||||
@@ -51,8 +51,8 @@ CKEDITOR.plugins.setLang( 'table', 'en-gb', {
|
||||
headersNone: 'None',
|
||||
headersRow: 'First Row',
|
||||
invalidBorder: 'Border size must be a number.',
|
||||
invalidCellPadding: 'Cell padding must be a number.',
|
||||
invalidCellSpacing: 'Cell spacing must be a number.',
|
||||
invalidCellPadding: 'Cell padding must be a positive number.',
|
||||
invalidCellSpacing: 'Cell spacing must be a positive number.',
|
||||
invalidCols: 'Number of columns must be a number greater than 0.',
|
||||
invalidHeight: 'Table height must be a number.',
|
||||
invalidRows: 'Number of rows must be a number greater than 0.',
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'templates', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'templates', 'en', {
|
||||
button: 'Templates',
|
||||
emptyListMsg: '(No templates defined)',
|
||||
insertOption: 'Replace actual contents',
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'toolbar', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'toolbar', 'en', {
|
||||
toolbarCollapse: 'Collapse Toolbar',
|
||||
toolbarExpand: 'Expand Toolbar',
|
||||
toolbarGroups: {
|
||||
@@ -18,5 +18,5 @@ CKEDITOR.plugins.setLang( 'toolbar', 'en-gb', {
|
||||
colors: 'Colors',
|
||||
tools: 'Tools'
|
||||
},
|
||||
toolbars: 'Editor toolbars' // MISSING
|
||||
toolbars: 'Editor toolbars'
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'uicolor', 'en', {
|
||||
title: 'UI Color Picker',
|
||||
preview: 'Live preview',
|
||||
config: 'Paste this string into your config.js file',
|
||||
predefined: 'Predefined color sets'
|
||||
});
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'undo', 'en-gb', {
|
||||
CKEDITOR.plugins.setLang( 'undo', 'en', {
|
||||
redo: 'Redo',
|
||||
undo: 'Undo'
|
||||
});
|
||||
@@ -614,6 +614,9 @@
|
||||
if ( !that.fire( 'dialog', dialog ) )
|
||||
return;
|
||||
|
||||
// Make widget accessible beyond setup and commit.
|
||||
dialog._.widget = that;
|
||||
|
||||
showListener = dialog.on( 'show', function() {
|
||||
dialog.setupContent( that );
|
||||
} );
|
||||
@@ -826,7 +829,7 @@
|
||||
|
||||
NestedEditable.prototype = CKEDITOR.tools.extend( CKEDITOR.tools.prototypedCopy( CKEDITOR.dom.element.prototype ), {
|
||||
setData: function( data ) {
|
||||
var data = this.editor.dataProcessor.toHtml( data, {
|
||||
data = this.editor.dataProcessor.toHtml( data, {
|
||||
context: this.getName(),
|
||||
filter: this.filter,
|
||||
enterMode: this.filter ? this.filter.getAllowedEnterMode() : this.editor.enterMode
|
||||
|
||||
@@ -331,6 +331,8 @@
|
||||
'tab', 'table', 'templates', 'toolbar', 'undo', 'wysiwygarea'
|
||||
];
|
||||
return {
|
||||
// FIXME
|
||||
language: 'en',
|
||||
// Disable auto-generated titles
|
||||
// FIXME: accessibility, need to generate user-sensible title, used for @title and @aria-label
|
||||
title: false,
|
||||
|
||||
Reference in New Issue
Block a user