parent
f793a5acbd
commit
a720b7ea5c
|
@ -72,39 +72,21 @@ class pluginQuill extends Plugin {
|
||||||
global $Language;
|
global $Language;
|
||||||
|
|
||||||
$html = '';
|
$html = '';
|
||||||
// Load CSS and JS only on Controllers in array.
|
if( $this->enabled() ) {
|
||||||
if(in_array($layout['controller'], $this->loadWhenController))
|
|
||||||
{
|
|
||||||
$html .= '
|
$html .= '
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var toolbarOptions = [
|
var quill = new Quill("#editor-container", {
|
||||||
["bold", "italic", "underline", "strike"], // toggled buttons
|
|
||||||
["blockquote", "code-block"],
|
|
||||||
|
|
||||||
[{ "header": 1 }, { "header": 2 }], // custom button values
|
|
||||||
[{ "list": "ordered"}, { "list": "bullet" }],
|
|
||||||
[{ "script": "sub"}, { "script": "super" }], // superscript/subscript
|
|
||||||
[{ "indent": "-1"}, { "indent": "+1" }], // outdent/indent
|
|
||||||
[{ "direction": "rtl" }], // text direction
|
|
||||||
|
|
||||||
[{ "size": ["small", false, "large", "huge"] }], // custom dropdown
|
|
||||||
[{ "header": [1, 2, 3, 4, 5, 6, false] }],
|
|
||||||
|
|
||||||
[{ "color": [] }, { "background": [] }], // dropdown with defaults from theme
|
|
||||||
[{ "font": [] }],
|
|
||||||
[{ "align": [] }],
|
|
||||||
|
|
||||||
["clean"] // remove formatting button
|
|
||||||
];
|
|
||||||
|
|
||||||
var quill = new Quill("#jscontent", {
|
|
||||||
modules: {
|
modules: {
|
||||||
toolbar: toolbarOptions
|
toolbar: [
|
||||||
|
[{ header: [1, 2, false] }],
|
||||||
|
["bold", "italic", "underline"],
|
||||||
|
["image"]
|
||||||
|
]
|
||||||
},
|
},
|
||||||
placeholder: "Compose an epic...",
|
placeholder: "asd",
|
||||||
theme: "snow"
|
theme: "snow"
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue