summaryrefslogtreecommitdiff
path: root/_source/plugins/split
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2013-07-15 14:22:23 +0100
committerlsces <lester@lsces.co.uk>2013-07-15 14:22:23 +0100
commit6d4c4f12d15ae68d912972921997a8c5180c9aea (patch)
tree104274447272d09617c483cf6b0ee79559c9fe6f /_source/plugins/split
parentde6d09676a9527919813a4474cc28af554a35fe1 (diff)
downloadckeditor-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')
-rw-r--r--_source/plugins/split/images/split.gifbin54 -> 0 bytes
-rw-r--r--_source/plugins/split/plugin.js107
2 files changed, 0 insertions, 107 deletions
diff --git a/_source/plugins/split/images/split.gif b/_source/plugins/split/images/split.gif
deleted file mode 100644
index 8d1cffd..0000000
--- a/_source/plugins/split/images/split.gif
+++ /dev/null
Binary files differ
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;">&nbsp;</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' );
- }
-};