????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.139.64.42 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.biminfo.se/vatternkajak.se/ckeditor/_source/plugins/pastefromword/ |
Upload File : |
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.plugins.add( 'pastefromword', { init : function( editor ) { // Flag indicate this command is actually been asked instead of a generic // pasting. var forceFromWord = 0; var resetFromWord = function() { setTimeout( function() { forceFromWord = 0; }, 0 ); }; // Features bring by this command beside the normal process: // 1. No more bothering of user about the clean-up. // 2. Perform the clean-up even if content is not from MS-Word. // (e.g. from a MS-Word similar application.) editor.addCommand( 'pastefromword', { canUndo : false, exec : function() { forceFromWord = 1; if ( editor.execCommand( 'paste' ) === false ) { editor.on( 'dialogHide', function ( evt ) { evt.removeListener(); resetFromWord(); }); } else resetFromWord(); } }); // Register the toolbar button. editor.ui.addButton( 'PasteFromWord', { label : editor.lang.pastefromword.toolbar, command : 'pastefromword' }); editor.on( 'pasteState', function( evt ) { editor.getCommand( 'pastefromword' ).setState( evt.data ); }); editor.on( 'paste', function( evt ) { var data = evt.data, mswordHtml; // MS-WORD format sniffing. if ( ( mswordHtml = data[ 'html' ] ) && ( forceFromWord || ( /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/ ).test( mswordHtml ) ) ) { var isLazyLoad = this.loadFilterRules( function() { // Event continuation with the original data. if ( isLazyLoad ) editor.fire( 'paste', data ); else if ( !editor.config.pasteFromWordPromptCleanup || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) { data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor ); } }); // The cleanup rules are to be loaded, we should just cancel // this event. isLazyLoad && evt.cancel(); } }, this ); }, loadFilterRules : function( callback ) { var isLoaded = CKEDITOR.cleanWord; if ( isLoaded ) callback(); else { var filterFilePath = CKEDITOR.getUrl( CKEDITOR.config.pasteFromWordCleanupFile || ( this.path + 'filter/default.js' ) ); // Load with busy indicator. CKEDITOR.scriptLoader.load( filterFilePath, callback, null, true ); } return !isLoaded; }, requires : [ 'clipboard' ] }); })(); /** * Whether to prompt the user about the clean up of content being pasted from * MS Word. * @name CKEDITOR.config.pasteFromWordPromptCleanup * @since 3.1 * @type Boolean * @default undefined * @example * config.pasteFromWordPromptCleanup = true; */ /** * The file that provides the MS Word cleanup function for pasting operations. * Note: This is a global configuration shared by all editor instances present * in the page. * @name CKEDITOR.config.pasteFromWordCleanupFile * @since 3.1 * @type String * @default 'default' * @example * // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file). * CKEDITOR.config.pasteFromWordCleanupFile = 'custom'; */