quill icon indicating copy to clipboard operation
quill copied to clipboard

Update modules without re-instantiating the editor?

Open ViktorZhurbin opened this issue 8 months ago • 5 comments

Question: Do I have to create a new Quill instance to update modules? Or is there a way to update them directly, something like:

const quill = new Quill(editorContainer, {
  modules, // <- this can change
  theme: "snow",
 });

// later on
quill.options.modules = updatedModules. // doesn't work, obviously

Context: I need to override some default keyboard bindings, and I do it through the config as suggested. When a binding needs to be updated (eg, user can change it in settings), it looks like I need to create a new Quill instance with updated config. This creates an extra hustle of saving/re-applying existing user input and selection.

ViktorZhurbin avatar Jun 03 '24 15:06 ViktorZhurbin