| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 /* 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 /** 7 * @file Horizontal Page Break 8 */ 9 10 // Register a plugin named "newpage". 11 CKEDITOR.plugins.add( 'newpage', 12 { 13 init : function( editor ) 14 { 15 editor.addCommand( 'newpage', 16 { 17 modes : { wysiwyg:1, source:1 }, 18 19 exec : function( editor ) 20 { 21 var command = this; 22 editor.setData( editor.config.newpage_html, function() 23 { 24 // Save the undo snapshot after all document changes are affected. (#4889) 25 setTimeout( function () 26 { 27 editor.fire( 'afterCommandExec', 28 { 29 name: command.name, 30 command: command 31 } ); 32 33 }, 200 ); 34 } ); 35 editor.focus(); 36 }, 37 async : true 38 }); 39 40 editor.ui.addButton( 'NewPage', 41 { 42 label : editor.lang.newPage, 43 command : 'newpage' 44 }); 45 } 46 }); 47 /** 48 * The HTML to load in the editor when the "new page" command is executed. 49 * @type String 50 * @default '' 51 * @example 52 * config.newpage_html = '<p>Type your text here.</p>'; 53 */ 54 CKEDITOR.config.newpage_html = '';
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |