Added pagebreak button to SimpleMDE
A simple addition to the plugin's toolbar. I feel that the pagebreak function needs to be more noticeable by the users.
This commit is contained in:
parent
3ae41bd710
commit
94f161767f
|
@ -127,7 +127,19 @@ class pluginsimpleMDE extends Plugin {
|
|||
uniqueId: "'.$autosaveID.'",
|
||||
delay: 1000,
|
||||
},
|
||||
toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).']
|
||||
toolbar: [ {
|
||||
name: "pageBreak",
|
||||
action: function addPageBreak(editor){
|
||||
var cm = editor.codemirror;
|
||||
output = "\n<!-- pagebreak -->\n\n";
|
||||
cm.replaceSelection(output);
|
||||
},
|
||||
className: "fa fa-book",
|
||||
title: "Pagebreak",
|
||||
},
|
||||
"|",
|
||||
'.Sanitize::htmlDecode($this->getDbField('toolbar')).'
|
||||
]
|
||||
});';
|
||||
|
||||
$html .= '}); </script>';
|
||||
|
|
Loading…
Reference in New Issue