source: trunk/filemanager/tp/ckeditor/_source/plugins/newpage/plugin.js @ 2000

Revision 2000, 1.0 KB checked in by amuller, 14 years ago (diff)

Ticket #597 - Implementação do módulo gerenciador de arquivos

Line 
1/*
2Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3For 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".
11CKEDITOR.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                                                editor.fire( 'afterCommandExec',
25                                                {
26                                                        name: command.name,
27                                                        command: command
28                                                } );
29                                        } );
30                                        editor.focus();
31                                },
32                                async : true
33                        });
34
35                editor.ui.addButton( 'NewPage',
36                        {
37                                label : editor.lang.newPage,
38                                command : 'newpage'
39                        });
40        }
41});
42/**
43 * The HTML to load in the editor when the "new page" command is executed.
44 * @type String
45 * @default ''
46 * @example
47 * config.newpage_html = '<p>Type your text here.</p>';
48 */
49CKEDITOR.config.newpage_html = '';
Note: See TracBrowser for help on using the repository browser.