Я получаю сообщение об ошибке при попытке использовать модуль формул в quill.
Ошибка:
"[Parchment] Unable to create formula blot"
Следование сообщению об ошибке в инструментах веб-разработки Chrome приводит к следующей строке в registry.ts
(webpack:///./~/parchment/src/registry.ts)
function create(input, value) {
var match = query(input);
if (match == null) {
throw new ParchmentError("Unable to create " + input + " blot");
}
var BlotClass = match;
var node = input instanceof Node ? input : BlotClass.create(value);
return new BlotClass(node, value);
}
Это происходит, когда я пытаюсь вставить формулу.
Это происходит, когда я использую quill-rails5
, но также и без драгоценного камня. Я удалил драгоценный камень, чтобы упростить проблему. Вот мой код:
var quill = new Quill('#editor', {
modules: {
formula: true,
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['image', 'code-block'],
['formula'],
]
},
placeholder: 'Compose a solution...',
theme: 'snow' // or 'bubble'
});
мой контейнер редактора
<div id="editor">
<%= raw sanitize @post.description, tags: %w(strong em div a p br ul ol li), attributes: %w(href) %>
</div>