Unable to load Quill
Unable to load Quill
Wanted to see if Quill would better serve my needs than CKEditor and TinyMCE. But I'm not able to get it loaded, seeing the following:
Uncaught TypeError: conf._quill.addModule is not a function
at e.create (editor.quill.js:224)
at e.Field._typeFn (dataTables.editor.min.js:22)
at e.Field (dataTables.editor.min.js:12)
at e.add (dataTables.editor.min.js:36)
at e.add (dataTables.editor.min.js:35)
at e._constructor (dataTables.editor.min.js:66)
at new e (dataTables.editor.min.js:8)
at HTMLDocument.<anonymous> (instructions:229)
at j (jquery-3.1.0.min.js:2)
at k (jquery-3.1.0.min.js:2)
Here is my specific Quill config:
<!-- quill plugin -->
<link href="//cdn.quilljs.com/1.2.2/quill.snow.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="static/css/editor.quill.css">
<!-- quill plugin -->
<script src="//cdn.quilljs.com/1.2.2/quill.min.js"></script>
<script type="text/javascript" src="static/js/editor.quill.js"></script>
editor = new $.fn.dataTable.Editor( {
ajax: '/manage_instructions',
table: '#edit-table',
fields: [
{ label: 'pkid:', name: 'main.pkid', type: 'hidden' },
{ label: 'Web Page:', name: 'main.name' },
{ label: 'Instructions:', name: 'main.instructions', type: 'quill',
},
]
} );
I can successfully use one of the other two editors by commenting the quill JS and CSS and uncommenting one of the others and change the field type.
Was going to try it on live.datatables.net but not sure if there is a path to load quill. BTW, I just downloaded the quill plugin and CSS from quill plugin page.
Kevin
This question has an accepted answers - jump to answer
Answers
Its a compatiblity issue. They changed their API for v1 causing the problem. I've not got around to updating the Editor site yet, but try this as the integration plug-in:
Allan
That works, thanks!
Kevin
Kevin, do you think Quill is any better than CKEditor and TinyMCE? What would you recommend knowing all three of them?
Hey @rf1234,
I've only been messing around with these editors for a day or so. I want more a plain text editor which Quill seems to be a better fit. Out of the box Quill allows for pure text (no html tags) which I use for some of the tables. However that does mean I need to manually type in the tags if desired. Which for me is not so bad because I can easily add classes to them. For plain text all lines are displayed on one line when the field is being edited, ie,
\n
does not force a new line in html.CKEditor seemed to work fine except for one issue. When creating hyperlinks my page would crash. Didn't take the time to troubleshoot. And I never did figure out to customize the toolbar. I found crush123's post but still no luck.
TinyMCE I only loaded to see what it looks like and that it works. Didn't spend any time with it.
Kevin
Thanks for the update. Will keep Quill, I guess.
The thing I like most about Quill is that it doesn't use an iframe. The iframe aspect makes the integration really difficult for the other editors. The reason they do that is to make sure that there is no bleed in styles from the host document to the editable content (I haven't actually dug into how Quill handles that).
Allan