quill-blot-formatter icon indicating copy to clipboard operation
quill-blot-formatter copied to clipboard

How to include the file?

Open tedchou12 opened this issue 4 years ago • 2 comments

Error:

index.html:36 Uncaught ReferenceError: BlotFormatter is not defined
    at index.html:36
<link href="resources/quill.snow.css" rel="stylesheet">
	<link href="resources/quill-better-table.css" rel="stylesheet">
	<script src="resources/quill_2004.min.js"></script>
	<script src="resources/quill-better-table.min.js"></script>
	<script src="resources/quill-image-drop-and-paste.min.js"></script>
	<script src="resources/quill-blot-formatter.min.js"></script>
	<script src="resources/quill-cursors.min.js"></script>
<script>
Quill.register('modules/blotFormatter', BlotFormatter);
	editor = new Quill('#editor', {
        theme: 'snow',
        modules: {
					cursors: true,
          table: true,
          toolbar: {
						container: '#toolbar-container',
						handlers: {
							image: image_upload
						}
					},
					imageDropAndPaste: {
  					handler: image_upload
  				},
					blotFormatter: {
	          // displayStyles: {
	          //   backgroundColor: 'black',
	          //   border: 'none',
	          //   color: 'white'
	          // },
	          // modules: ['Resize', 'DisplaySize', 'Toolbar']
	        },
}
</script>

Thank you!

tedchou12 avatar Jun 09 '20 18:06 tedchou12

How to register the modules using only script tag without import like React??

QubeApps-Git avatar Sep 23 '20 01:09 QubeApps-Git

I believe you will have to export the module and compile it as a js first. Remember to use browserify input.js > output.js.

(I gave up on implementing quill because nobody can solve the table issue).

tedchou12 avatar Sep 24 '20 02:09 tedchou12