Ticket #8893: 8893_1.patch

File 8893_1.patch, 2.5 KB (added by Jakub Ś, 8 years ago)
  • _source/plugins/pastefromword/plugin.js

     
    8383                                                         {
    8484                                                                data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor );
    8585                                                        }
    86                                                 });
     86                                                }, editor);
    8787
    8888                                        // The cleanup rules are to be loaded, we should just cancel
    8989                                        // this event.
     
    9292                        }, this );
    9393                },
    9494
    95                 loadFilterRules : function( callback )
     95                loadFilterRules : function( callback, editor )
    9696                {
    9797
    9898                        var isLoaded = CKEDITOR.cleanWord;
     
    100100                        if ( isLoaded )
    101101                                callback();
    102102                        else
    103                         {
     103                        {                               
    104104                                var filterFilePath = CKEDITOR.getUrl(
    105                                                 CKEDITOR.config.pasteFromWordCleanupFile
     105                                                editor.config.pasteFromWordCleanupFile
    106106                                                || ( this.path + 'filter/default.js' ) );
    107107
    108108                                // Load with busy indicator.
     
    129129
    130130/**
    131131 * The file that provides the MS Word cleanup function for pasting operations.
     132 * Path to file can be either full (includes CKEditor installation folder),
     133 * relative to CKEditor installation folder or an absolute URL.
    132134 * Note: This is a global configuration shared by all editor instances present
    133135 * in the page.
    134136 * @name CKEDITOR.config.pasteFromWordCleanupFile
    135137 * @since 3.1
    136138 * @type String
    137  * @default 'default'
     139 * @default <plugin path> + 'filter/default.js'
    138140 * @example
    139  * // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file).
    140  * CKEDITOR.config.pasteFromWordCleanupFile = 'custom';
     141 * // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file) using path relative to CKEditor installation folder.
     142 * CKEDITOR.config.pasteFromWordCleanupFile = 'plugins/pastefromword/filter/custom.js';
     143 *
     144 * // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file) using full path (including CKEditor installation  folder).
     145 * CKEDITOR.config.pasteFromWordCleanupFile = '/ckeditor/plugins/pastefromword/filter/custom.js';
     146 *
     147 * // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file) using full URL.
     148 * CKEDITOR.config.pasteFromWordCleanupFile = 'http://my.example.com/ckeditor/plugins/pastefromword/filter/custom.js';
     149 *
     150 * // Load custom.js file from 'customFilerts' folder (located in server's root) using full URL.
     151 * CKEDITOR.config.pasteFromWordCleanupFile = 'http://my.example.com/customFilerts/custom.js';
    141152 */
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy