react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Error: [Parchment] Unable to create formula blot

Open daltonrenaldo opened this issue 8 years ago • 1 comments

Using RichTextInput component with props toolbar={[ ['formula'] ]}. When I try to enter a formula, for example: x^2, only blank lines are added, and I get the following error:

quill.js:734 Uncaught Error: [Parchment] Unable to create formula blot
    at new ParchmentError (quill.js:734)
    at Object.create (quill.js:765)
    at BlockBlot.insertAt (quill.js:1496)
    at Block.insertAt (quill.js:4525)
    at Scroll.ContainerBlot.insertAt (quill.js:279)
    at ScrollBlot.insertAt (quill.js:1265)
    at Scroll.insertAt (quill.js:6417)
    at Editor.insertEmbed (quill.js:4037)
    at quill.js:2025
    at Quill.modify (quill.js:2251)
    at Quill.insertEmbed (quill.js:2024)
    at SnowTooltip.save (quill.js:10394)
    at HTMLInputElement.<anonymous> (quill.js:10323)

Environment

  • Admin-on-rest version: 1.3.3
  • React version: 16.0.2

daltonrenaldo avatar Dec 23 '17 16:12 daltonrenaldo

According to the quill.js documentation, if you want to use the formula toolbar, you must also use the formula module.

Adding custom modules is currently not supported in aor-rich-text-input. I advise you to open an issue about it in https://github.com/marmelab/aor-rich-text-input. In the meantime, I invite you to write your own rich text editor input component, based on the code of aor-rich-text-input.

fzaninotto avatar Jan 04 '18 12:01 fzaninotto