]>
git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blob - sources/plugins/newpage/plugin.js
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
7 * @fileOverview Horizontal Page Break.
10 // Register a plugin named "newpage".
11 CKEDITOR
.plugins
.add( 'newpage', {
12 // jscs:disable maximumLineLength
13 lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
14 // jscs:enable maximumLineLength
15 icons: 'newpage,newpage-rtl', // %REMOVE_LINE_CORE%
16 hidpi: true, // %REMOVE_LINE_CORE%
17 init: function( editor
) {
18 editor
.addCommand( 'newpage', { modes: { wysiwyg: 1, source: 1 },
20 exec: function( editor
) {
22 editor
.setData( editor
.config
.newpage_html
|| '', function() {
24 // Save the undo snapshot after all document changes are affected. (#4889)
25 setTimeout( function() {
26 editor
.fire( 'afterCommandExec', {
30 editor
.selectionChange();
38 editor
.ui
.addButton
&& editor
.ui
.addButton( 'NewPage', {
39 label: editor
.lang
.newpage
.toolbar
,
41 toolbar: 'document,20'
47 * The HTML to load in the editor when the "new page" command is executed.
49 * config.newpage_html = '<p>Type your text here.</p>';
51 * @cfg {String} [newpage_html='']
52 * @member CKEDITOR.config