loadOnController)) {
return false;
}
$html = ''.PHP_EOL;
$html .= ''.PHP_EOL;
$html .= ''.PHP_EOL;
return $html;
}
public function adminBodyEnd()
{
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
return false;
}
$script = <<
var quill;
// Function required for Media Manager to insert a file on the editor
function insertMedia(filename) {
var Delta = Quill.import("delta");
quill.updateContents(new Delta()
.retain(quill.getSelection().index)
.insert('')
);
}
$(document).ready(function() {
quill = new Quill("#jscontent", {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['image', 'code-block']
]
},
placeholder: "Content, support Markdown and HTML.",
theme: "snow"
});
// Change button images event handler to open the Media Manager
quill.getModule("toolbar").addHandler("image", openMediaManager);
});
EOF;
return $script;
}
}