diff options
| author | lsces <lester@lsces.co.uk> | 2013-07-15 14:22:23 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2013-07-15 14:22:23 +0100 |
| commit | 6d4c4f12d15ae68d912972921997a8c5180c9aea (patch) | |
| tree | 104274447272d09617c483cf6b0ee79559c9fe6f /_source/plugins/split/plugin.js | |
| parent | de6d09676a9527919813a4474cc28af554a35fe1 (diff) | |
| download | ckeditor-6d4c4f12d15ae68d912972921997a8c5180c9aea.tar.gz ckeditor-6d4c4f12d15ae68d912972921997a8c5180c9aea.tar.bz2 ckeditor-6d4c4f12d15ae68d912972921997a8c5180c9aea.zip | |
Upgrade to CKEditor V4
Directory structure changed so many files removed and replace in a new location
This batch is the delete and add
Diffstat (limited to '_source/plugins/split/plugin.js')
| -rw-r--r-- | _source/plugins/split/plugin.js | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/_source/plugins/split/plugin.js b/_source/plugins/split/plugin.js deleted file mode 100644 index 99acbb1..0000000 --- a/_source/plugins/split/plugin.js +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @file Content Split Marker - */ - -// Register a plugin named "split". -CKEDITOR.plugins.add( 'split', -{ - init : function( editor ) - { - // Register the command. - editor.addCommand( 'split', CKEDITOR.plugins.splitCmd ); - - // Register the toolbar button. - editor.ui.addButton( 'Split', - { - label : editor.lang.split, - command : 'split' - }); - - // Add the style that renders our placeholder. - editor.addCss( - 'img.cke_split' + - '{' + - 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/split.gif' ) + ');' + - 'background-position: center center;' + - 'background-repeat: no-repeat;' + - 'clear: both;' + - 'display: block;' + - 'float: none;' + - 'width:100%;_width:99.9%;' + - 'border-top: #999999 1px dotted;' + - 'border-bottom: #999999 1px dotted;' + - 'height: 5px;' + - 'page-break-after: always;' + - - '}' ); - }, - - afterInit : function( editor ) - { - // Register a filter to displaying placeholders after mode change. - - var dataProcessor = editor.dataProcessor, - dataFilter = dataProcessor && dataProcessor.dataFilter; - - if ( dataFilter ) - { - dataFilter.addRules( - { - elements : - { - div : function( element ) - { - var attributes = element.attributes, - style = attributes && attributes.style, - child = style && element.children.length == 1 && element.children[ 0 ], - childStyle = child && ( child.name == 'span' ) && child.attributes.style; - - if ( childStyle && ( /page-break-after\s*:\s*always/i ).test( style ) && ( /display\s*:\s*none/i ).test( childStyle ) ) - return editor.createFakeParserElement( element, 'cke_split', 'div' ); - } - } - }); - } - }, - - requires : [ 'fakeobjects' ] -}); - -CKEDITOR.plugins.splitCmd = -{ - exec : function( editor ) - { - // Create the element that represents a print break. - var breakObject = CKEDITOR.dom.element.createFromHtml( '<div style="page-break-after: always;"><span style="display: none;"> </span></div>...split...' ); - - // Creates the fake image used for this element. - breakObject = editor.createFakeElement( breakObject, 'cke_split', 'div' ); - - var ranges = editor.getSelection().getRanges(); - - editor.fire( 'saveSnapshot' ); - - for ( var range, i = 0 ; i < ranges.length ; i++ ) - { - range = ranges[ i ]; - - if ( i > 0 ) - breakObject = breakObject.clone( true ); - - range.splitBlock( 'p' ); - range.insertNode( breakObject ); - if ( i == ranges.length - 1 ) - { - range.moveToPosition( breakObject, CKEDITOR.POSITION_AFTER_END ); - range.select(); - } - } - - editor.fire( 'saveSnapshot' ); - } -}; |
