X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fsourcearea%2Fplugin.js;fp=_source%2Fplugins%2Fsourcearea%2Fplugin.js;h=54f9d540258ec22fb8a1e35f653a4be5fff21951;hb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;hp=0000000000000000000000000000000000000000;hpb=b93873b6532ee7515fb0d6f8b73176c44fad28f7;p=ckeditor.git diff --git a/_source/plugins/sourcearea/plugin.js b/_source/plugins/sourcearea/plugin.js new file mode 100644 index 0000000..54f9d54 --- /dev/null +++ b/_source/plugins/sourcearea/plugin.js @@ -0,0 +1,185 @@ +/* +Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview The "sourcearea" plugin. It registers the "source" editing + * mode, which displays the raw data being edited in the editor. + */ + +CKEDITOR.plugins.add( 'sourcearea', +{ + requires : [ 'editingblock' ], + + init : function( editor ) + { + var sourcearea = CKEDITOR.plugins.sourcearea; + + editor.on( 'editingBlockReady', function() + { + var textarea, + onResize; + + editor.addMode( 'source', + { + load : function( holderElement, data ) + { + if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) + holderElement.setStyle( 'position', 'relative' ); + + // Create the source area