Hey there
Has anyone had any success adding a rich text editor to a Chrome extension? Somelike like quill.js or Trix, for example.
I can set/open/edit these text editors in a normal html/JS webpage, but something always seems to be off when I duplicate my code in a Chrome content.js page.
Any advice or sample code of someone that has successfully done this would be helpful!
Also FWIW, it doesn't ever seem to be a manifest.json permissions issue of allowing the external scripts for these packages to run
Thanks.
Rich tech editors like quill.js use script tags to load the text editor. In manifest v3, external scripts are not allowed. You might be getting an error on the console like this. This is the TinyMCE editor->
""contentScript.bundle.js:68677 Refused to load the script 'something.min.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules'. Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.""
To solve this problem, use the module bundler to bundle the text editor and be able to use it without scripts
We are having the same problem. Did you ever solve this?
I wish, but unfortunately not.
This comment was deleted 6 years ago.