Dotclear


Ignore:
Timestamp:
11/18/16 18:11:18 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Update CKEditor from 4.5.11 to 4.6.0, update dotclear skin (copy of new 4.6 default skin)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/js/ckeditor/ckeditor.js

    r3339 r3410  
    4747               // for each release and generated by the releaser. 
    4848               // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) 
    49                timestamp: 'G889', 
     49               timestamp: 'GAIF', 
    5050 
    5151               /** 
     
    5454                *        alert( CKEDITOR.version ); // e.g. 'CKEditor 3.4.1' 
    5555                */ 
    56                version: '4.5.11', 
     56               version: '4.6.0', 
    5757 
    5858               /** 
     
    26562656               } 
    26572657               return false; 
     2658          }, 
     2659 
     2660          /** 
     2661           * Converts a keystroke to its string representation. Returns an object with two fields: 
     2662           * 
     2663           * * `display` &ndash; A string that should be used for visible labels. 
     2664           * For Mac devices it uses `⌥` for `ALT`, `⇧` for `SHIFT` and `⌘` for `COMMAND`. 
     2665           * * `aria` &ndash; A string that should be used for ARIA descriptions. 
     2666           * It does not use special characters such as `⌥`, `⇧` or `⌘`. 
     2667           * 
     2668           *        var lang = editor.lang.common.keyboard; 
     2669           *        var shortcut = CKEDITOR.tools.keystrokeToString( lang, CKEDITOR.CTRL + 88 ); 
     2670           *        console.log( shortcut.display ); // 'CTRL + X', on Mac '⌘ + X'. 
     2671           *        console.log( shortcut.aria ); // 'CTRL + X', on Mac 'COMMAND + X'. 
     2672           * 
     2673           * @since 4.6.0 
     2674           * @param {Object} lang A language object with the key name translation. 
     2675           * @param {Number} keystroke The keystroke to convert. 
     2676           * @returns {{display: String, aria: String}} 
     2677           */ 
     2678          keystrokeToString: function( lang, keystroke ) { 
     2679               var special = keystroke & 0xFF0000, 
     2680                    key = keystroke & 0x00FFFF, 
     2681                    isMac = CKEDITOR.env.mac, 
     2682                    CTRL = 17, 
     2683                    CMD = 224, 
     2684                    ALT = 18, 
     2685                    SHIFT = 16, 
     2686                    display = [], 
     2687                    aria = []; 
     2688 
     2689 
     2690               if ( special & CKEDITOR.CTRL ) { 
     2691                    display.push( isMac ? '⌘' : lang[ CTRL ] ); 
     2692                    aria.push( isMac ? lang[ CMD ] : lang[ CTRL ] ); 
     2693               } 
     2694 
     2695               if ( special & CKEDITOR.ALT ) { 
     2696                    display.push( isMac ? '⌥' : lang[ ALT ] ); 
     2697                    aria.push( lang[ ALT ] ); 
     2698               } 
     2699 
     2700               if ( special & CKEDITOR.SHIFT ) { 
     2701                    display.push( isMac ? '⇧' : lang[ SHIFT ] ); 
     2702                    aria.push( lang[ SHIFT ] ); 
     2703               } 
     2704 
     2705               if ( key ) { 
     2706                    if ( lang[ key ] ) { 
     2707                         display.push( lang[ key ] ); 
     2708                         aria.push( lang[ key ] ); 
     2709                    } else { 
     2710                         display.push( String.fromCharCode( key ) ); 
     2711                         aria.push( String.fromCharCode( key ) ); 
     2712                    } 
     2713               } 
     2714 
     2715               return { 
     2716                    display: display.join( '+' ), 
     2717                    aria: aria.join( '+' ) 
     2718               }; 
    26582719          }, 
    26592720 
     
    1064910710          /** 
    1065010711           * Looks for elements matching the `query` selector within a range. 
    10651            *  
     10712           * 
    1065210713           * @since 4.5.11 
    1065310714           * @private 
     
    1077010831CKEDITOR.POSITION_AFTER_END = 4; 
    1077110832 
     10833/** 
     10834 * @readonly 
     10835 * @member CKEDITOR 
     10836 * @property {Number} [=1] 
     10837 */ 
    1077210838CKEDITOR.ENLARGE_ELEMENT = 1; 
     10839 
     10840/** 
     10841 * @readonly 
     10842 * @member CKEDITOR 
     10843 * @property {Number} [=2] 
     10844 */ 
    1077310845CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2; 
     10846 
     10847/** 
     10848 * @readonly 
     10849 * @member CKEDITOR 
     10850 * @property {Number} [=3] 
     10851 */ 
    1077410852CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3; 
     10853 
     10854/** 
     10855 * @readonly 
     10856 * @member CKEDITOR 
     10857 * @property {Number} [=4] 
     10858 */ 
    1077510859CKEDITOR.ENLARGE_INLINE = 4; 
    1077610860 
     
    1417914263           * 
    1418014264           * @param {CKEDITOR.htmlParser.element} element 
    14181            * @param {String} styleName Name of the style that will be converted. 
    14182            * @param {String} [attrName=styleName] Name of the attribute into which the style will be converted. 
     14265           * @param {String} styleName The name of the style that will be converted. 
     14266           * @param {String} [attrName=styleName] The name of the attribute into which the style will be converted. 
    1418314267           */ 
    1418414268          lengthToAttribute: function( element, styleName, attrName ) { 
     
    1420014284 
    1420114285          /** 
    14202            * Converts the `align` attribute to the `float` style if not set. Attribute 
     14286           * Converts the `align` attribute to the `float` style if not set. The attribute 
    1420314287           * is always removed. 
    1420414288           * 
     
    1421814302          /** 
    1421914303           * Converts the `float` style to the `align` attribute if not set. 
    14220            * Style is always removed. 
     14304           * The style is always removed. 
    1422114305           * 
    1422214306           * @param {CKEDITOR.htmlParser.element} element 
     
    1423414318 
    1423514319          /** 
     14320           * Converts the shorthand form of the `border` style to seperate styles. 
     14321           * 
     14322           * @param {CKEDITOR.htmlParser.element} element 
     14323           */ 
     14324          splitBorderShorthand: function( element ) { 
     14325               if ( !element.styles.border ) { 
     14326                    return; 
     14327               } 
     14328 
     14329               var widths = element.styles.border.match( /([\.\d]+\w+)/g ) || [ '0px' ]; 
     14330               switch ( widths.length ) { 
     14331                    case 1: 
     14332                         element.styles[ 'border-width' ] = widths[0]; 
     14333                         break; 
     14334                    case 2: 
     14335                         mapStyles( [ 0, 1, 0, 1 ] ); 
     14336                         break; 
     14337                    case 3: 
     14338                         mapStyles( [ 0, 1, 2, 1 ] ); 
     14339                         break; 
     14340                    case 4: 
     14341                         mapStyles( [ 0, 1, 2, 3 ] ); 
     14342                         break; 
     14343               } 
     14344 
     14345               element.styles[ 'border-style' ] = element.styles[ 'border-style' ] || 
     14346                    ( element.styles.border.match( /(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit)/ ) || [] )[ 0 ]; 
     14347               if ( !element.styles[ 'border-style' ] ) 
     14348                    delete element.styles[ 'border-style' ]; 
     14349 
     14350               delete element.styles.border; 
     14351 
     14352               function mapStyles( map ) { 
     14353                    element.styles['border-top-width'] = widths[ map[0] ]; 
     14354                    element.styles['border-right-width'] = widths[ map[1] ]; 
     14355                    element.styles['border-bottom-width'] = widths[ map[2] ]; 
     14356                    element.styles['border-left-width'] = widths[ map[3] ]; 
     14357               } 
     14358          }, 
     14359 
     14360          listTypeToStyle: function( element ) { 
     14361               if ( element.attributes.type ) { 
     14362                    switch ( element.attributes.type ) { 
     14363                         case 'a': 
     14364                              element.styles[ 'list-style-type' ] = 'lower-alpha'; 
     14365                              break; 
     14366                         case 'A': 
     14367                              element.styles[ 'list-style-type' ] = 'upper-alpha'; 
     14368                              break; 
     14369                         case 'i': 
     14370                              element.styles[ 'list-style-type' ] = 'lower-roman'; 
     14371                              break; 
     14372                         case 'I': 
     14373                              element.styles[ 'list-style-type' ] = 'upper-roman'; 
     14374                              break; 
     14375                         case '1': 
     14376                              element.styles[ 'list-style-type' ] = 'decimal'; 
     14377                              break; 
     14378                         default: 
     14379                              element.styles[ 'list-style-type' ] = element.attributes.type; 
     14380                    } 
     14381               } 
     14382          }, 
     14383 
     14384          /** 
     14385           * Converts the shorthand form of the `margin` style to seperate styles. 
     14386           * 
     14387           * @param {CKEDITOR.htmlParser.element} element 
     14388           */ 
     14389          splitMarginShorthand: function( element ) { 
     14390               if ( !element.styles.margin ) { 
     14391                    return; 
     14392               } 
     14393 
     14394               var widths = element.styles.margin.match( /(\-?[\.\d]+\w+)/g ) || [ '0px' ]; 
     14395               switch ( widths.length ) { 
     14396                    case 1: 
     14397                         element.styles.margin = widths[0]; 
     14398                         break; 
     14399                    case 2: 
     14400                         mapStyles( [ 0, 1, 0, 1 ] ); 
     14401                         break; 
     14402                    case 3: 
     14403                         mapStyles( [ 0, 1, 2, 1 ] ); 
     14404                         break; 
     14405                    case 4: 
     14406                         mapStyles( [ 0, 1, 2, 3 ] ); 
     14407                         break; 
     14408               } 
     14409 
     14410               delete element.styles.margin; 
     14411 
     14412               function mapStyles( map ) { 
     14413                    element.styles['margin-top'] = widths[ map[0] ]; 
     14414                    element.styles['margin-right'] = widths[ map[1] ]; 
     14415                    element.styles['margin-bottom'] = widths[ map[2] ]; 
     14416                    element.styles['margin-left'] = widths[ map[3] ]; 
     14417               } 
     14418          }, 
     14419 
     14420          /** 
    1423614421           * Checks whether an element matches a given {@link CKEDITOR.style}. 
    1423714422           * The element can be a "superset" of a style, e.g. it may have 
     
    1424414429 
    1424514430          /** 
    14246            * Transforms element to given form. 
     14431           * Transforms an element to a given form. 
    1424714432           * 
    1424814433           * Form may be a: 
    1424914434           * 
    1425014435           *   * {@link CKEDITOR.style}, 
    14251            *   * string &ndash; the new name of an element. 
     14436           *   * string &ndash; the new name of the element. 
    1425214437           * 
    1425314438           * @param {CKEDITOR.htmlParser.element} el 
     
    1501415199               'en-au': 1, 'en-ca': 1, 'en-gb': 1, en: 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1, 
    1501515200               'fr-ca': 1, fr: 1, gl: 1, gu: 1, he: 1, hi: 1, hr: 1, hu: 1, id: 1, is: 1, it: 1, ja: 1, ka: 1, 
    15016                km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, ms: 1, nb: 1, nl: 1, no: 1, pl: 1, 'pt-br': 1, 
     15201               km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, ms: 1, nb: 1, nl: 1, no: 1, oc: 1, pl: 1, 'pt-br': 1, 
    1501715202               pt: 1, ro: 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, 'sr-latn': 1, sr: 1, sv: 1, th: 1, tr: 1, tt: 1, ug: 1, 
    1501815203               uk: 1, vi: 1, 'zh-cn': 1, zh: 1 
     
    1715917344 
    1716017345          /** 
     17346           * Returns the keystroke that is assigned to a specified {@link CKEDITOR.command}. If no keystroke is assigned, 
     17347           * it returns null. 
     17348           * 
     17349           * @since 4.6.0 
     17350           * @param {CKEDITOR.command} command 
     17351           * @returns {Number} The keystroke assigned to the provided command or null if there is no keystroke. 
     17352           */ 
     17353          getCommandKeystroke: function( command ) { 
     17354               var commandName = command.name, 
     17355                    keystrokes = this.keystrokeHandler.keystrokes, 
     17356                    key; 
     17357 
     17358               // Some commands have a fake keystroke - for example CUT/COPY/PASTE commands are handled natively. 
     17359               if ( command.fakeKeystroke ) { 
     17360                    return command.fakeKeystroke; 
     17361               } 
     17362 
     17363               for ( key in keystrokes ) { 
     17364                    if ( keystrokes.hasOwnProperty( key ) && keystrokes[ key ] == commandName ) { 
     17365                         return key; 
     17366                    } 
     17367               } 
     17368 
     17369               return null; 
     17370          }, 
     17371 
     17372          /** 
    1716117373           * Shorthand for {@link CKEDITOR.filter#addFeature}. 
    1716217374           * 
     
    1764217854 * 
    1764317855 * @event destroy 
     17856 * @param {CKEDITOR.editor} editor This editor instance. 
     17857 */ 
     17858 
     17859/** 
     17860 * Event fired when the {@link #method-destroy} method is called, 
     17861 * but before destroying the editor. 
     17862 * 
     17863 * @event beforeDestroy 
    1764417864 * @param {CKEDITOR.editor} editor This editor instance. 
    1764517865 */ 
     
    2070520925 
    2070620926/** 
    20707  * Object presentation of CSS style declaration text. 
     20927 * Object presentation of the CSS style declaration text. 
    2070820928 * 
    2070920929 * @class 
     
    2106821288           * @since 4.3 
    2106921289           * @param {Number} index Index at which the element will be split &mdash; `0` means the beginning, 
    21070            * `1` after first child node, etc. 
     21290           * `1` after the first child node, etc. 
    2107121291           * @returns {CKEDITOR.htmlParser.element} The new element following this one. 
    2107221292           */ 
     
    2108921309 
    2109021310               return clone; 
     21311          }, 
     21312 
     21313          /** 
     21314           * Searches through the current node children to find nodes matching the `criteria`. 
     21315           * 
     21316           * @param {String/Function} criteria Tag name or evaluator function. 
     21317           * @param {Boolean} [recursive=false] 
     21318           * @returns {CKEDITOR.htmlParser.node[]} 
     21319           */ 
     21320          find: function( criteria, recursive ) { 
     21321               if ( recursive === undefined ) { 
     21322                    recursive = false; 
     21323               } 
     21324 
     21325               var ret = [], 
     21326                    i; 
     21327 
     21328               for  ( i = 0; i < this.children.length; i++ ) { 
     21329                    var curChild = this.children[ i ]; 
     21330 
     21331                    if ( typeof criteria == 'function' && criteria( curChild ) ) { 
     21332                         ret.push( curChild ); 
     21333                    } else if ( typeof criteria == 'string' && curChild.name === criteria ) { 
     21334                         ret.push( curChild ); 
     21335                    } 
     21336 
     21337                    if ( recursive && curChild.find ) { 
     21338                         ret = ret.concat( curChild.find( criteria, recursive ) ); 
     21339                    } 
     21340               } 
     21341 
     21342               return ret; 
    2109121343          }, 
    2109221344 
     
    2339123643      * @method editable 
    2339223644      * @member CKEDITOR.editor 
    23393       * @param {CKEDITOR.dom.element/CKEDITOR.editable} elementOrEditable The 
     23645      * @param {CKEDITOR.dom.element/CKEDITOR.editable} [elementOrEditable] The 
    2339423646      * DOM element to become the editable or a {@link CKEDITOR.editable} object. 
    2339523647      */ 
     
    3464534897 
    3464634898     function showCover( editor ) { 
    34647           var win = CKEDITOR.document.getWindow(); 
    34648           var config = editor.config, 
    34649                backgroundColorStyle = config.dialog_backgroundCoverColor || 'white', 
     34899          var win = CKEDITOR.document.getWindow(), 
     34900               config = editor.config, 
     34901               skinName = ( CKEDITOR.skinName || editor.config.skin ), 
     34902               backgroundColorStyle = config.dialog_backgroundCoverColor || ( skinName == 'moono-lisa' ? 'black' : 'white' ), 
    3465034903               backgroundCoverOpacity = config.dialog_backgroundCoverOpacity, 
    3465134904               baseFloatZIndex = config.baseFloatZIndex, 
     
    3713437387                    canUndo: type == 'cut', // We can't undo copy to clipboard. 
    3713537388                    startDisabled: true, 
     37389                    fakeKeystroke: type == 'cut' ? CKEDITOR.CTRL + 88 /*X*/ :  CKEDITOR.CTRL + 67 /*C*/, 
    3713637390                    exec: function() { 
    3713737391                         // Attempts to execute the Cut and Copy operations. 
     
    3716837422                    canUndo: false, 
    3716937423                    async: true, 
    37170  
     37424                    fakeKeystroke: CKEDITOR.CTRL + 86 /*V*/, 
    3717137425                    exec: function( editor, data ) { 
    3717237426                         var cmd = this, 
     
    3920839462          ' role="button"' + 
    3920939463          ' aria-labelledby="{id}_label"' + 
     39464          ' aria-describedby="{id}_description"' + 
    3921039465          ' aria-haspopup="{hasArrow}"' + 
    3921139466          ' aria-disabled="{ariaDisabled}"'; 
     
    3923139486     template += '>&nbsp;</span>' + 
    3923239487          '<span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span>' + 
     39488          '<span id="{id}_description" class="cke_button_label" aria-hidden="false">{ariaShortcut}</span>' + 
    3923339489          '{arrowHtml}' + 
    3923439490          '</a>'; 
     
    3933339589                    command = this.command, 
    3933439590                    // Get the command name. 
    39335                     clickFn; 
     39591                    clickFn, 
     39592                    keystroke, 
     39593                    shortcut; 
    3933639594 
    3933739595               this._.editor = editor; 
     
    3943439692               } 
    3943539693 
    39436                if ( !command ) 
     39694               if ( !command ) { 
    3943739695                    stateName += 'off'; 
     39696               } else { 
     39697                    keystroke = editor.getCommandKeystroke( command ); 
     39698 
     39699                    if ( keystroke ) { 
     39700                         shortcut = CKEDITOR.tools.keystrokeToString( editor.lang.common.keyboard, keystroke ); 
     39701                    } 
     39702               } 
    3943839703 
    3943939704               var name = this.name || this.command, 
     
    3945439719                    state: stateName, 
    3945539720                    ariaDisabled: stateName == 'disabled' ? 'true' : 'false', 
    39456                     title: this.title, 
     39721                    title: this.title + ( shortcut ? ' (' + shortcut.display + ')' : '' ), 
     39722                    ariaShortcut: shortcut ? editor.lang.common.keyboardShortcut + ' ' + shortcut.aria : '', 
    3945739723                    titleJs: env.gecko && !env.hc ? '' : ( this.title || '' ).replace( "'", '' ), 
    3945839724                    hasArrow: this.hasArrow ? 'true' : 'false', 
     
    4073240998 
    4073340999          if ( !CKEDITOR.env.hc ) { 
    40734                addButton( 'TextColor', 'fore', lang.textColorTitle, 10 ); 
     41000               addButton( 'TextColor', 'fore', lang.textColorTitle, 10, { 
     41001                    contentTransformations: [ 
     41002                         [ 
     41003                              { 
     41004                                   element: 'font', 
     41005                                   check: 'span{color}', 
     41006                                   left: function( element ) { 
     41007                                        return !!element.attributes.color; 
     41008                                   }, 
     41009                                   right: function( element ) { 
     41010                                        element.name = 'span'; 
     41011 
     41012                                        element.attributes.color && ( element.styles.color = element.attributes.color ); 
     41013                                        delete element.attributes.color; 
     41014                                   } 
     41015                              } 
     41016                         ] 
     41017                    ] 
     41018               } ); 
    4073541019               addButton( 'BGColor', 'back', lang.bgColorTitle, 20 ); 
    4073641020          } 
    4073741021 
    40738           function addButton( name, type, title, order ) { 
     41022          function addButton( name, type, title, order, options ) { 
    4073941023               var style = new CKEDITOR.style( config[ 'colorButton_' + type + 'Style' ] ), 
    4074041024                    colorBoxId = CKEDITOR.tools.getNextId() + '_colorBox'; 
     41025 
     41026               options = options || {}; 
    4074141027 
    4074241028               editor.ui.add( name, CKEDITOR.UI_PANELBUTTON, { 
     
    4074841034                    allowedContent: style, 
    4074941035                    requiredContent: style, 
     41036                    contentTransformations: options.contentTransformations, 
    4075041037 
    4075141038                    panel: { 
     
    4125441541                    requiredContent: 'div', 
    4125541542                    contextSensitive: true, 
     41543                    contentTransformations: [ 
     41544                         [ 'div: alignmentToStyle' ] 
     41545                    ], 
    4125641546                    refresh: function( editor, path ) { 
    4125741547                         var context = editor.config.div_wrapTable ? path.root : path.blockLimit; 
     
    4493045220                    }; 
    4493145221 
     45222                    this.contentTransformations = [ 
     45223                         [ 'div: splitMarginShorthand' ], 
     45224                         [ 'h1: splitMarginShorthand' ], 
     45225                         [ 'h2: splitMarginShorthand' ], 
     45226                         [ 'h3: splitMarginShorthand' ], 
     45227                         [ 'h4: splitMarginShorthand' ], 
     45228                         [ 'h5: splitMarginShorthand' ], 
     45229                         [ 'h6: splitMarginShorthand' ], 
     45230                         [ 'ol: splitMarginShorthand' ], 
     45231                         [ 'p: splitMarginShorthand' ], 
     45232                         [ 'pre: splitMarginShorthand' ], 
     45233                         [ 'ul: splitMarginShorthand' ] 
     45234                    ]; 
     45235 
    4493245236                    if ( this.enterBr ) 
    4493345237                         this.allowedContent.div = true; 
     
    4566545969 
    4566645970               if ( CKEDITOR.dialog.isTabEnabled( editor, 'link', 'advanced' ) ) 
    45667                     allowed = allowed.replace( ']', ',accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)' ); 
     45971                    allowed = allowed.replace( ']', ',accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)' ); 
    4566845972               if ( CKEDITOR.dialog.isTabEnabled( editor, 'link', 'target' ) ) 
    4566945973                    allowed = allowed.replace( ']', ',target,onclick]' ); 
     
    4614046444                    } 
    4614146445 
     46446                    var download = element.getAttribute( 'download' ); 
     46447                    if ( download !== null ) { 
     46448                         retval.download = true; 
     46449                    } 
     46450 
    4614246451                    var advanced = {}; 
    4614346452 
     
    4627946588               } 
    4628046589 
     46590               // Force download attribute. 
     46591               if ( data.download ) { 
     46592                    set.download = ''; 
     46593               } 
     46594 
    4628146595               // Advanced attributes. 
    4628246596               if ( data.advanced ) { 
     
    4630046614                    onclick: 1, 
    4630146615                    'data-cke-pa-onclick': 1, 
    46302                     'data-cke-saved-name': 1 
     46616                    'data-cke-saved-name': 1, 
     46617                    'download': 1 
    4630346618               }; 
    4630446619 
     
    4762547940          ' title="{title}"' + 
    4762647941          ' tabindex="-1"' + 
    47627           '_cke_focus=1' + 
     47942          ' _cke_focus=1' + 
    4762847943          ' hidefocus="true"' + 
    4762947944          ' role="{role}"' + 
     47945          ' aria-label="{label}"' + 
     47946          ' aria-describedby="{id}_description"' + 
    4763047947          ' aria-haspopup="{hasPopup}"' + 
    4763147948          ' aria-disabled="{disabled}"' + 
     
    4765147968 
    4765247969     menuItemSource += 
     47970                    //'' + 
    4765347971                    '<span class="cke_menubutton_inner">' + 
    4765447972                         '<span class="cke_menubutton_icon">' + 
     
    4765847976                              '{label}' + 
    4765947977                         '</span>' + 
     47978                         '{shortcutHtml}' + 
    4766047979                         '{arrowHtml}' + 
    4766147980                    '</span>' + 
    47662                '</a></span>'; 
     47981               '</a><span id="{id}_description" class="cke_voice_label" aria-hidden="false">{ariaShortcut}</span></span>'; 
    4766347982 
    4766447983     var menuArrowSource = '<span class="cke_menuarrow">' + 
     
    4766647985               '</span>'; 
    4766747986 
     47987     var menuShortcutSource = '<span class="cke_menubutton_label cke_menubutton_shortcut">' + 
     47988                    '{shortcut}' + 
     47989               '</span>'; 
     47990 
    4766847991     var menuItemTpl = CKEDITOR.addTemplate( 'menuItem', menuItemSource ), 
    47669           menuArrowTpl = CKEDITOR.addTemplate( 'menuArrow', menuArrowSource ); 
     47992          menuArrowTpl = CKEDITOR.addTemplate( 'menuArrow', menuArrowSource ), 
     47993          menuShortcutTpl = CKEDITOR.addTemplate( 'menuShortcut', menuShortcutSource ); 
    4767047994 
    4767147995     /** 
     
    4800248326                    var id = menu.id + String( index ), 
    4800348327                         state = ( typeof this.state == 'undefined' ) ? CKEDITOR.TRISTATE_OFF : this.state, 
    48004                          ariaChecked = ''; 
     48328                         ariaChecked = '', 
     48329                         editor = this.editor, 
     48330                         keystroke, 
     48331                         command, 
     48332                         shortcut; 
    4800548333 
    4800648334                    var stateName = state == CKEDITOR.TRISTATE_ON ? 'on' : state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' : 'off'; 
     
    4801748345                    if ( this.icon && !( /\./ ).test( this.icon ) ) 
    4801848346                         iconName = this.icon; 
     48347 
     48348                    if ( this.command ) { 
     48349                         command = editor.getCommand( this.command ); 
     48350                         keystroke = editor.getCommandKeystroke( command ); 
     48351 
     48352                         if ( keystroke ) { 
     48353                              shortcut = CKEDITOR.tools.keystrokeToString( editor.lang.common.keyboard, keystroke ); 
     48354                         } 
     48355                    } 
    4801948356 
    4802048357                    var params = { 
     
    4802748364                         hasPopup: hasSubMenu ? 'true' : 'false', 
    4802848365                         disabled: state == CKEDITOR.TRISTATE_DISABLED, 
    48029                          title: this.label, 
     48366                         title: this.label + ( shortcut ? ' (' + shortcut.display + ')' : '' ), 
     48367                         ariaShortcut: shortcut ? editor.lang.common.keyboardShortcut + ' ' + shortcut.aria : '', 
    4803048368                         href: 'javascript:void(\'' + ( this.label || '' ).replace( "'" + '' ) + '\')', // jshint ignore:line 
    4803148369                         hoverFn: menu._.itemOverFn, 
     
    4803448372                         index: index, 
    4803548373                         iconStyle: CKEDITOR.skin.getIconStyle( iconName, ( this.editor.lang.dir == 'rtl' ), iconName == this.icon ? null : this.icon, this.iconOffset ), 
     48374                         shortcutHtml: shortcut ? menuShortcutTpl.output( { shortcut: shortcut.display } ) : '', 
    4803648375                         arrowHtml: hasSubMenu ? menuArrowTpl.output( { label: arrowLabel } ) : '', 
    4803748376                         role: this.role ? this.role : 'menuitem', 
     
    4826148600               def = new CKEDITOR.dialogCommand( 'numberedListStyle', { 
    4826248601                    requiredContent: 'ol', 
    48263                     allowedContent: 'ol{list-style-type}[start]' 
     48602                    allowedContent: 'ol{list-style-type}[start]; li{list-style-type}[value]', 
     48603                    contentTransformations: [ 
     48604                         [ 'ol: listTypeToStyle' ] 
     48605                    ] 
    4826448606               } ); 
    4826548607               cmd = editor.addCommand( 'numberedListStyle', def ); 
     
    4826948611               def = new CKEDITOR.dialogCommand( 'bulletedListStyle', { 
    4827048612                    requiredContent: 'ul', 
    48271                     allowedContent: 'ul{list-style-type}' 
     48613                    allowedContent: 'ul{list-style-type}', 
     48614                    contentTransformations: [ 
     48615                         [ 'ul: listTypeToStyle' ] 
     48616                    ] 
    4827248617               } ); 
    4827348618               cmd = editor.addCommand( 'bulletedListStyle', def ); 
     
    5042350768 
    5042450769( function() { 
     50770     /* global confirm */ 
     50771 
    5042550772     CKEDITOR.plugins.add( 'pastefromword', { 
    5042650773          requires: 'clipboard', 
     
    5047450821               } ); 
    5047550822 
    50476                // Features bring by this command beside the normal process: 
     50823               // Features brought by this command beside the normal process: 
    5047750824               // 1. No more bothering of user about the clean-up. 
    50478                // 2. Perform the clean-up even if content is not from MS-Word. 
    50479                // (e.g. from a MS-Word similar application.) 
     50825               // 2. Perform the clean-up even if content is not from Microsoft Word. 
     50826               // (e.g. from a Microsoft Word similar application.) 
    5048050827               // 3. Listen with high priority (3), so clean up is done before content 
    5048150828               // type sniffing (priority = 6). 
    5048250829               editor.on( 'paste', function( evt ) { 
    5048350830                    var data = evt.data, 
    50484                          mswordHtml = data.dataValue; 
    50485  
    50486                     // MS-WORD format sniffing. 
    50487                     if ( mswordHtml && ( forceFromWord || ( /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/ ).test( mswordHtml ) ) ) { 
    50488                          // Do not apply paste filter to data filtered by the Word filter (#13093). 
    50489                          data.dontFilter = true; 
    50490  
    50491                          // If filter rules aren't loaded then cancel 'paste' event, 
    50492                          // load them and when they'll get loaded fire new paste event 
    50493                          // for which data will be filtered in second execution of 
    50494                          // this listener. 
    50495                          var isLazyLoad = loadFilterRules( editor, path, function() { 
    50496                               // Event continuation with the original data. 
    50497                               if ( isLazyLoad ) 
    50498                                    editor.fire( 'paste', data ); 
    50499                               else if ( !editor.config.pasteFromWordPromptCleanup || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) // jshint ignore:line 
    50500                                    data.dataValue = CKEDITOR.cleanWord( mswordHtml, editor ); 
    50501  
    50502                               // Reset forceFromWord. 
    50503                               forceFromWord = 0; 
    50504                          } ); 
    50505  
    50506                          // The cleanup rules are to be loaded, we should just cancel 
    50507                          // this event. 
    50508                          isLazyLoad && evt.cancel(); 
    50509                     } 
     50831                         mswordHtml = data.dataValue, 
     50832                         wordRegexp = /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/, 
     50833                         pfwEvtData = { dataValue: mswordHtml }; 
     50834 
     50835                    if ( !mswordHtml || !( forceFromWord || wordRegexp.test( mswordHtml ) ) ) { 
     50836                         return; 
     50837                    } 
     50838 
     50839                    // PFW might still get prevented, if it's not forced. 
     50840                    if ( editor.fire( 'pasteFromWord', pfwEvtData ) === false && !forceFromWord ) { 
     50841                         return; 
     50842                    } 
     50843 
     50844                    // Do not apply paste filter to data filtered by the Word filter (#13093). 
     50845                    data.dontFilter = true; 
     50846 
     50847                    // If filter rules aren't loaded then cancel 'paste' event, 
     50848                    // load them and when they'll get loaded fire new paste event 
     50849                    // for which data will be filtered in second execution of 
     50850                    // this listener. 
     50851                    var isLazyLoad = loadFilterRules( editor, path, function() { 
     50852                         // Event continuation with the original data. 
     50853                         if ( isLazyLoad ) { 
     50854                              editor.fire( 'paste', data ); 
     50855                         } else if ( !editor.config.pasteFromWordPromptCleanup || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) { 
     50856                              pfwEvtData.dataValue = CKEDITOR.cleanWord( pfwEvtData.dataValue, editor ); 
     50857 
     50858                              editor.fire( 'afterPasteFromWord', pfwEvtData ); 
     50859 
     50860                              data.dataValue = pfwEvtData.dataValue; 
     50861                         } 
     50862 
     50863                         // Reset forceFromWord. 
     50864                         forceFromWord = 0; 
     50865                    } ); 
     50866 
     50867                    // The cleanup rules are to be loaded, we should just cancel 
     50868                    // this event. 
     50869                    isLazyLoad && evt.cancel(); 
    5051050870               }, null, null, 3 ); 
    5051150871          } 
     
    5053550895 
    5053650896/** 
    50537  * Whether to prompt the user about the clean up of content being pasted from MS Word. 
     50897 * Whether to prompt the user about the clean up of content being pasted from Microsoft Word. 
    5053850898 * 
    5053950899 *        config.pasteFromWordPromptCleanup = true; 
     
    5054550905 
    5054650906/** 
    50547  * The file that provides the MS Word cleanup function for pasting operations. 
     50907 * The file that provides the Microsoft Word cleanup function for pasting operations. 
    5054850908 * 
    5054950909 * **Note:** This is a global configuration shared by all editor instances present 
    50550  * in the page. 
    50551  * 
    50552  *        // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file) using path relative to CKEditor installation folder. 
     50910 * on the page. 
     50911 * 
     50912 *        // Load from the 'pastefromword' plugin 'filter' sub folder (custom.js file) using a path relative to the CKEditor installation folder. 
    5055350913 *        CKEDITOR.config.pasteFromWordCleanupFile = 'plugins/pastefromword/filter/custom.js'; 
    5055450914 * 
    50555  *        // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file) using full path (including CKEditor installation folder). 
     50915 *        // Load from the 'pastefromword' plugin 'filter' sub folder (custom.js file) using a full path (including the CKEditor installation folder). 
    5055650916 *        CKEDITOR.config.pasteFromWordCleanupFile = '/ckeditor/plugins/pastefromword/filter/custom.js'; 
    5055750917 * 
    50558  *        // Load custom.js file from 'customFilerts' folder (located in server's root) using full URL. 
    50559  *        CKEDITOR.config.pasteFromWordCleanupFile = 'http://my.example.com/customFilerts/custom.js'; 
     50918 *        // Load custom.js file from the 'customFilters' folder (located in server's root) using the full URL. 
     50919 *        CKEDITOR.config.pasteFromWordCleanupFile = 'http://my.example.com/customFilters/custom.js'; 
    5056050920 * 
    5056150921 * @since 3.1 
     
    5056450924 */ 
    5056550925 
     50926/** 
     50927 * Fired when the pasted content was recognized as Microsoft Word content. 
     50928 * 
     50929 * This event is cancellable. If canceled, it will prevent Paste from Word processing. 
     50930 * 
     50931 * @since 4.6.0 
     50932 * @event pasteFromWord 
     50933 * @param data 
     50934 * @param {String} data.dataValue Pasted content. Changes to this property will affect the pasted content. 
     50935 * @member CKEDITOR.editor 
     50936 */ 
     50937 
     50938/** 
     50939 * Fired after the Paste form Word filters have been applied. 
     50940 * 
     50941 * @since 4.6.0 
     50942 * @event afterPasteFromWord 
     50943 * @param data 
     50944 * @param {String} data.dataValue Pasted content after processing. Changes to this property will affect the pasted content. 
     50945 * @member CKEDITOR.editor 
     50946 */ 
    5056650947/** 
    5056750948 * Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. 
     
    5134851729                         var styleDefinition = stylesDefinitions[ i ]; 
    5134951730 
    51350                          if ( editor.blockless && ( styleDefinition.element in CKEDITOR.dtd.$block ) ) 
     51731                         if ( editor.blockless && ( styleDefinition.element in CKEDITOR.dtd.$block ) || 
     51732                              ( typeof styleDefinition.type == 'string' && !CKEDITOR.style.customHandlers[ styleDefinition.type ] ) ) { 
     51733 
    5135151734                              continue; 
     51735                         } 
    5135251736 
    5135351737                         styleName = styleDefinition.name; 
     
    5183452218               requiredContent: 'table', 
    5183552219               contentTransformations: [ 
    51836                     [ 'table{width}: sizeToStyle', 'table[width]: sizeToAttribute' ] 
     52220                    [ 'table{width}: sizeToStyle', 'table[width]: sizeToAttribute' ], 
     52221                    [ 'td: splitBorderShorthand' ], 
     52222                    [ { 
     52223                         element: 'table', 
     52224                         right: function( element ) { 
     52225                              if ( element.styles ) { 
     52226                                   if ( element.styles.border && element.styles.border.match( /solid/ ) ) { 
     52227                                        element.attributes.border = 1; 
     52228                                   } 
     52229                                   if ( element.styles[ 'border-collapse' ] == 'collapse' ) { 
     52230                                        element.attributes.cellspacing = 0; 
     52231                                   } 
     52232                              } 
     52233                         } 
     52234                    } ] 
    5183752235               ] 
    5183852236          } ) ); 
     
    5258152979               addCmd( 'cellProperties', new CKEDITOR.dialogCommand( 'cellProperties', createDef( { 
    5258252980                    allowedContent: 'td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]', 
    52583                     requiredContent: 'table' 
     52981                    requiredContent: 'table', 
     52982                    contentTransformations: [ 
     52983                         [ { 
     52984                              element: 'td', 
     52985                              left: function( element ) { 
     52986                                   return element.styles.background && element.styles.background.match( /^(#[a-fA-F0-9]{3,6}|rgb\([\d, ]+\)|\w+)$/ ); 
     52987                              }, 
     52988                              right: function( element ) { 
     52989                                   element.styles[ 'background-color' ] = element.styles.background; 
     52990                              } 
     52991                         } ] 
     52992                    ] 
    5258452993               } ) ) ); 
    5258552994               CKEDITOR.dialog.add( 'cellProperties', this.path + 'dialogs/tableCell.js' ); 
     
    5299453403 *        config.templates_files = [ 
    5299553404 *             '/editor_templates/site_default.js', 
    52996  *             'http://www.example.com/user_templates.js 
     53405 *             'http://www.example.com/user_templates.js' 
    5299753406 *        ]; 
    5299853407 * 
     
    5320653615 
    5320753616                    var toolbars = editor.toolbox.toolbars, 
    53208                          toolbar = getToolbarConfig( editor ); 
    53209  
    53210                     for ( var r = 0; r < toolbar.length; r++ ) { 
     53617                         toolbar = getToolbarConfig( editor ), 
     53618                         toolbarLength = toolbar.length; 
     53619 
     53620                    for ( var r = 0; r < toolbarLength; r++ ) { 
    5321153621                         var toolbarId, 
    5321253622                              toolbarObj = 0, 
    5321353623                              toolbarName, 
    5321453624                              row = toolbar[ r ], 
     53625                              lastToolbarInRow = row !== '/' && ( toolbar[ r + 1 ] === '/' || r == toolbarLength - 1 ), 
    5321553626                              items; 
    5321653627 
     
    5326053671 
    5326153672                                        // Output the toolbar opener. 
    53262                                         output.push( '<span id="', toolbarId, '" class="cke_toolbar"', ( toolbarName ? ' aria-labelledby="' + toolbarId + '_label"' : '' ), ' role="toolbar">' ); 
     53673                                        output.push( '<span id="', toolbarId, '" class="cke_toolbar' + ( lastToolbarInRow ? ' cke_toolbar_last"' : '"' ), 
     53674                                             ( toolbarName ? ' aria-labelledby="' + toolbarId + '_label"' : '' ), ' role="toolbar">' ); 
    5326353675 
    5326453676                                        // If a toolbar name is available, send the voice label. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map