From 252fe7df139b3f5b8336d2a158c417b902d3cde6 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 10 Aug 2017 19:55:50 +0200 Subject: [PATCH] pagebreak --- bl-plugins/simplemde/plugin.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/bl-plugins/simplemde/plugin.php b/bl-plugins/simplemde/plugin.php index d210ae33..8eb0dcc2 100644 --- a/bl-plugins/simplemde/plugin.php +++ b/bl-plugins/simplemde/plugin.php @@ -11,7 +11,7 @@ class pluginsimpleMDE extends Plugin { { $this->dbFields = array( 'tabSize'=>'2', - 'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"', + 'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen"', 'autosave'=>true, 'spellChecker'=>true ); @@ -127,19 +127,18 @@ class pluginsimpleMDE extends Plugin { uniqueId: "'.$autosaveID.'", delay: 1000, }, - toolbar: [ { - name: "pageBreak", - action: function addPageBreak(editor){ - var cm = editor.codemirror; - output = "\n\n\n"; - cm.replaceSelection(output); - }, - className: "fa fa-book", - title: "Pagebreak", - }, - "|", - '.Sanitize::htmlDecode($this->getDbField('toolbar')).' - ] + toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).', + "|", + { + name: "pageBreak", + action: function addPageBreak(editor){ + var cm = editor.codemirror; + output = "\n'.PAGE_BREAK.'\n"; + cm.replaceSelection(output); + }, + className: "fa fa-minus-square-o", + title: "'.$Language->get('Pagebreak').'", + }] });'; $html .= '}); ';