Ticket #2765: 2765_6.patch
File 2765_6.patch, 2.8 KB (added by , 15 years ago) |
---|
-
_source/core/htmlparser/element.js
113 113 { 114 114 var attrib = attribsArray[ i ]; 115 115 // IE's treated expand fields as dom attributes, skip it 116 if ( CKEDITOR.env.ie && attrib === '_cke_expando' )116 if ( CKEDITOR.env.ie && attrib[0] === '_cke_expando' ) 117 117 continue; 118 118 writer.attribute( attrib[0], attrib[1] ); 119 119 } -
_source/plugins/fakeobjects/plugin.js
65 65 66 66 /** 67 67 * Manages element placeholders in WYSIWYG area. 68 * @param {CKEDITOR.editor} 68 69 * @constructor 69 70 * @example 70 71 */ 71 CKEDITOR.plugins.fakeobjects = function( )72 CKEDITOR.plugins.fakeobjects = function(editor) 72 73 { 73 74 this._ = 74 75 { 76 /** 77 * Reference to the belonged editor instance. 78 */ 79 editor: editor, 75 80 objectTypes : [ 76 81 { 77 82 match : function( nodeName, attributes ) … … 309 314 restoreHtml : function( html ) 310 315 { 311 316 var parser = new copyParser(), 312 innerParser = new copyParser(); 317 innerParser = new copyParser(), 318 self = this; 313 319 314 320 innerParser.onTagOpen = function( tagName, attributes, selfClosing ) 315 321 { … … 346 352 innerParser.parse( protectedHtml ); 347 353 protectedHtml = innerParser.output.join( '' ); 348 354 } 355 356 //Format protected html which omit by plugin:wysiwyg 357 var processor =self._.editor.dataProcessor; 358 if(processor) 359 protectedHtml = processor.toDataFormat( protectedHtml ); 349 360 350 361 this.output.push( protectedHtml ); 351 362 return; … … 401 412 { 402 413 init : function( editor, pluginPath ) 403 414 { 404 editor.fakeobjects = new CKEDITOR.plugins.fakeobjects( );415 editor.fakeobjects = new CKEDITOR.plugins.fakeobjects(editor); 405 416 } 406 417 } ); 407 418 })(); -
_source/plugins/htmldataprocessor/plugin.js
25 25 // The source data is already HTML, so just return it as is. 26 26 return data; 27 27 }, 28 29 toDataFormat : function( element ) 28 29 /** 30 * 31 * @param {CKEDITOR.dom.element|String} source 32 */ 33 toDataFormat : function( source ) 30 34 { 31 35 var writer = this.writer, 32 fragment = CKEDITOR.htmlParser.fragment.fromHtml( element.getHtml());36 fragment = CKEDITOR.htmlParser.fragment.fromHtml( source.type?source.getHtml() : source); 33 37 34 38 writer.reset(); 35 39