N°2271: Upgrade CKEditor to v4.11.4

This commit is contained in:
Stephen Abello
2019-06-24 15:52:26 +02:00
parent e68340273b
commit 71f5d29cba
223 changed files with 3202 additions and 2607 deletions

View File

@@ -1,6 +1,6 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
@@ -14,7 +14,7 @@
CKEDITOR.plugins.add( 'codesnippet', {
requires: 'widget,dialog',
lang: 'ar,az,bg,ca,cs,da,de,de-ch,el,en,en-gb,eo,es,es-mx,et,eu,fa,fi,fr,fr-ca,gl,he,hr,hu,id,it,ja,km,ko,ku,lt,lv,nb,nl,no,oc,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
lang: 'ar,az,bg,ca,cs,da,de,de-ch,el,en,en-au,en-gb,eo,es,es-mx,et,eu,fa,fi,fr,fr-ca,gl,he,hr,hu,id,it,ja,km,ko,ku,lt,lv,nb,nl,no,oc,pl,pt,pt-br,ro,ru,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
icons: 'codesnippet', // %REMOVE_LINE_CORE%
hidpi: true, // %REMOVE_LINE_CORE%
@@ -46,6 +46,11 @@
editor._.codesnippet.langsRegex = new RegExp( '(?:^|\\s)language-(' +
CKEDITOR.tools.objectKeys( langs ).join( '|' ) + ')(?:\\s|$)' );
};
editor.once( 'pluginsLoaded', function() {
// Remove the method once it cannot be used, because it leaks the editor reference (#589).
this.setHighlighter = null;
}, this );
},
onLoad: function() {
@@ -130,7 +135,7 @@
/**
* Global helpers and classes of the Code Snippet plugin.
*
* For more information see the [Code Snippet Guide](#!/guide/dev_codesnippet).
* For more information see the {@glink guide/dev_codesnippet Code Snippet Guide}.
*
* @class
* @singleton
@@ -242,7 +247,7 @@
* }
*
* More information on how to change the list of languages is available
* in the [Code Snippet documentation](#!/guide/dev_codesnippet-section-changing-languages-list).
* in the {@glink guide/dev_codesnippet#changing-supported-languages Code Snippet documentation}.
*
* @property {Object} languages
*/
@@ -357,7 +362,7 @@
if ( childrenArray.length != 1 || ( code = childrenArray[ 0 ] ).name != 'code' )
return;
// Upcast <code> with text only: http://dev.ckeditor.com/ticket/11926#comment:4
// Upcast <code> with text only: https://dev.ckeditor.com/ticket/11926#comment:4
if ( code.children.length != 1 || code.children[ 0 ].type != CKEDITOR.NODE_TEXT )
return;
@@ -367,7 +372,7 @@
if ( matchResult )
data.lang = matchResult[ 1 ];
// Use textarea to decode HTML entities (http://dev.ckeditor.com/ticket/11926).
// Use textarea to decode HTML entities (https://dev.ckeditor.com/ticket/11926).
textarea.setHtml( code.getHtml() );
data.code = textarea.getValue();
@@ -430,8 +435,8 @@
* highlighter (the default is [highlight.js](http://highlightjs.org)).
* See {@link CKEDITOR.plugins.codesnippet.highlighter} to read more.
*
* Read more in the [documentation](#!/guide/dev_codesnippet)
* and see the [SDK sample](http://sdk.ckeditor.com/samples/codesnippet.html).
* Read more in the {@glink guide/dev_codesnippet documentation}
* and see the {@glink examples/codesnippet example}.
*
* @since 4.4
* @cfg {String} [codeSnippet_codeClass='hljs']
@@ -447,7 +452,7 @@ CKEDITOR.config.codeSnippet_codeClass = 'hljs';
* you may need to refer to external documentation to set `config.codeSnippet_languages` properly.
*
* Read more in the [documentation](#!/guide/dev_codesnippet-section-changing-supported-languages)
* and see the [SDK sample](http://sdk.ckeditor.com/samples/codesnippet.html).
* and see the {@glink examples/codesnippet example}.
*
* // Restricts languages to JavaScript and PHP.
* config.codeSnippet_languages = {
@@ -467,7 +472,7 @@ CKEDITOR.config.codeSnippet_codeClass = 'hljs';
* ([highlight.js](http://highlightjs.org/static/test.html)).
*
* Read more in the [documentation](#!/guide/dev_codesnippet-section-changing-highlighter-theme)
* and see the [SDK sample](http://sdk.ckeditor.com/samples/codesnippet.html).
* and see the {@glink examples/codesnippet example}.
*
* // Changes the theme to "pojoaque".
* config.codeSnippet_theme = 'pojoaque';