Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2017 11:52
Show Gist options
  • Save anonymous/1e8bab3946bcf9f82b5459b77a7af49e to your computer and use it in GitHub Desktop.
Save anonymous/1e8bab3946bcf9f82b5459b77a7af49e to your computer and use it in GitHub Desktop.
<script src='<?= public_front_url(); ?>/assets/js/tinymce/js/tinymce/tinymce.min.js'></script>
<script>
$(function(){
tinyMCE.init({
selector: '<?=$selector?>',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime nonbreaking save table contextmenu directionality',
'emoticons template textcolor paste'
],
paste_as_text: false,
valid_elements: "b/strong,i/em,u,br,ol,ul,li,p,a[href],table,tr,th,td,h1,h2,h3,h4,h5,h6",
paste_word_valid_elements: "b/strong,i/em,u,br,ol,ul,li,p,a[href],table,tr,th,td,h1,h2,h3,h4,h5,h6,",
extended_valid_elements : ""
+"ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
+"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
+"|onmouseup|start|style|title|type]",
menubar:false,
toolbar: 'undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist | link | fontselect ',
setup: function(editor) {
editor.on('blur', function(e) {
setTags(editor);
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment