pagebreak

This commit is contained in:
Diego Najar 2017-08-10 19:55:50 +02:00
parent 647b815362
commit 252fe7df13
1 changed files with 13 additions and 14 deletions

View File

@ -11,7 +11,7 @@ class pluginsimpleMDE extends Plugin {
{ {
$this->dbFields = array( $this->dbFields = array(
'tabSize'=>'2', '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, 'autosave'=>true,
'spellChecker'=>true 'spellChecker'=>true
); );
@ -127,19 +127,18 @@ class pluginsimpleMDE extends Plugin {
uniqueId: "'.$autosaveID.'", uniqueId: "'.$autosaveID.'",
delay: 1000, delay: 1000,
}, },
toolbar: [ { toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).',
"|",
{
name: "pageBreak", name: "pageBreak",
action: function addPageBreak(editor){ action: function addPageBreak(editor){
var cm = editor.codemirror; var cm = editor.codemirror;
output = "\n<!-- pagebreak -->\n\n"; output = "\n'.PAGE_BREAK.'\n";
cm.replaceSelection(output); cm.replaceSelection(output);
}, },
className: "fa fa-book", className: "fa fa-minus-square-o",
title: "Pagebreak", title: "'.$Language->get('Pagebreak').'",
}, }]
"|",
'.Sanitize::htmlDecode($this->getDbField('toolbar')).'
]
});'; });';
$html .= '}); </script>'; $html .= '}); </script>';