SalesSystemOnline/ckeditor_3.6/ckeditor/_source/plugins/fakeobjects/plugin.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
var htmlFilterRules =
{
elements :
{
$ : function( element )
{
var attributes = element.attributes,
realHtml = attributes && attributes[ 'data-cke-realelement' ],
realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ),
realElement = realFragment && realFragment.children[ 0 ];
// If we have width/height in the element, we must move it into
// the real element.
if ( realElement && element.attributes[ 'data-cke-resizable' ] )
{
var style = element.attributes.style;
if ( style )
{
// Get the width from the style.
var match = /(?:^|\s)width\s*:\s*(\d+)/i.exec( style ),
width = match && match[1];
// Get the height from the style.
match = /(?:^|\s)height\s*:\s*(\d+)/i.exec( style );
var height = match && match[1];
if ( width )
realElement.attributes.width = width;
if ( height )
realElement.attributes.height = height;
}
}
return realElement;
}
}
};
CKEDITOR.plugins.add( 'fakeobjects',
{
requires : [ 'htmlwriter' ],
afterInit : function( editor )
{
var dataProcessor = editor.dataProcessor,
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
if ( htmlFilter )
htmlFilter.addRules( htmlFilterRules );
}
});
后面还有 66 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。