diff options
| author | Daniel Sutcliffe <dansut@users.sourceforge.net> | 2010-02-02 20:06:13 +0000 |
|---|---|---|
| committer | Daniel Sutcliffe <dansut@users.sourceforge.net> | 2010-02-02 20:06:13 +0000 |
| commit | 3863844d32b3fb04b6499dffe5d49ed893056026 (patch) | |
| tree | 6eb15725d4f15d93bb9e0e241e3d0cadf0e2dc9b /plugins/removeformat | |
| parent | b1de4b213ba60402d6d13a2a6892d5a422c4f8e4 (diff) | |
| download | ckeditor-3863844d32b3fb04b6499dffe5d49ed893056026.tar.gz ckeditor-3863844d32b3fb04b6499dffe5d49ed893056026.tar.bz2 ckeditor-3863844d32b3fb04b6499dffe5d49ed893056026.zip | |
Attempt to make some old ckeditor stuff disappear
Diffstat (limited to 'plugins/removeformat')
| -rw-r--r-- | plugins/removeformat/plugin.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/plugins/removeformat/plugin.js b/plugins/removeformat/plugin.js deleted file mode 100644 index 3b2f9b6..0000000 --- a/plugins/removeformat/plugin.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -CKEDITOR.plugins.add('removeformat',{requires:['selection'],init:function(a){a.addCommand('removeFormat',CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton('RemoveFormat',{label:a.lang.removeFormat,command:'removeFormat'});}});CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){var b=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp('^(?:'+a.config.removeFormatTags.replace(/,/g,'|')+')$','i')),c=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(',')),d=a.getSelection().getRanges();for(var e=0,f;f=d[e];e++){if(f.collapsed)continue;f.enlarge(CKEDITOR.ENLARGE_ELEMENT);var g=f.createBookmark(),h=g.startNode,i=g.endNode,j=function(m){var n=new CKEDITOR.dom.elementPath(m),o=n.elements;for(var p=1,q;q=o[p];p++){if(q.equals(n.block)||q.equals(n.blockLimit))break;if(b.test(q.getName()))m.breakParent(q);}};j(h);j(i);var k=h.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT);while(k){if(k.equals(i))break;var l=k.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);if(k.getName()!='img'||!k.getAttribute('_cke_protected_html'))if(b.test(k.getName()))k.remove(true);else k.removeAttributes(c);k=l;}f.moveToBookmark(g);}a.getSelection().selectRanges(d);}}}};CKEDITOR.config.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';CKEDITOR.config.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign'; |
