X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fludivine-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fplugins%2Ffakeobjects%2Fplugin.js;fp=sources%2Fplugins%2Ffakeobjects%2Fplugin.js;h=b1a8e0ce6ba506ad04816660923071dd5b3f2516;hp=d35698bfc65bba43e8c54f0c55fa343bc08fc3ea;hb=1794320dcfdfcd19572fb1676294f9853a6bbc20;hpb=7183f6a6a21ad9124e70c997e0168459f377a9f2 diff --git a/sources/plugins/fakeobjects/plugin.js b/sources/plugins/fakeobjects/plugin.js index d35698b..b1a8e0c 100644 --- a/sources/plugins/fakeobjects/plugin.js +++ b/sources/plugins/fakeobjects/plugin.js @@ -53,7 +53,7 @@ CKEDITOR.plugins.add( 'fakeobjects', { // jscs:disable maximumLineLength - lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% // jscs:enable maximumLineLength init: function( editor ) { @@ -75,8 +75,15 @@ } ); /** + * Creates fake {@link CKEDITOR.dom.element} based on real element. + * Fake element is an img with special attributes, which keep real element properties. + * * @member CKEDITOR.editor - * @todo + * @param {CKEDITOR.dom.element} realElement Real element to transform. + * @param {String} className Class name which will be used as class of fake element. + * @param {String} realElementType Stores type of fake element. + * @param {Boolean} isResizable Keeps information if element is resizable. + * @returns {CKEDITOR.dom.element} Fake element. */ CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable ) { var lang = this.lang.fakeobjects, @@ -91,7 +98,7 @@ align: realElement.getAttribute( 'align' ) || '' }; - // Do not set "src" on high-contrast so the alt text is displayed. (#8945) + // Do not set "src" on high-contrast so the alt text is displayed. (http://dev.ckeditor.com/ticket/8945) if ( !CKEDITOR.env.hc ) attributes.src = CKEDITOR.tools.transparentImageData; @@ -115,8 +122,14 @@ }; /** + * Creates fake {@link CKEDITOR.htmlParser.element} based on real element. + * * @member CKEDITOR.editor - * @todo + * @param {CKEDITOR.dom.element} realElement Real element to transform. + * @param {String} className Class name which will be used as class of fake element. + * @param {String} realElementType Store type of fake element. + * @param {Boolean} isResizable Keep information if element is resizable. + * @returns {CKEDITOR.htmlParser.element} Fake htmlParser element. */ CKEDITOR.editor.prototype.createFakeParserElement = function( realElement, className, realElementType, isResizable ) { var lang = this.lang.fakeobjects, @@ -136,7 +149,7 @@ align: realElement.attributes.align || '' }; - // Do not set "src" on high-contrast so the alt text is displayed. (#8945) + // Do not set "src" on high-contrast so the alt text is displayed. (http://dev.ckeditor.com/ticket/8945) if ( !CKEDITOR.env.hc ) attributes.src = CKEDITOR.tools.transparentImageData; @@ -160,8 +173,11 @@ }; /** + * Creates {@link CKEDITOR.dom.element} from fake element. + * * @member CKEDITOR.editor - * @todo + * @param {CKEDITOR.dom.element} fakeElement Fake element to transform. + * @returns {CKEDITOR.dom.element/null} Returns real element or `null` if transformed element wasn't fake. */ CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement ) { if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT )