-
Notifications
You must be signed in to change notification settings - Fork 948
Open
Description
Hi,
I am using react-quill for my project. in one of the scenario, I need to remove some of the module based on some condition.
const modules = useMemo(
() => ({
HashTagModule: enabledHashTagModule
? {
loadHashTags,
hashTagSuggestionRange,
hashTagLabels,
}
: null,
toolbar: {
container: `#${toolbarId}`,
handlers: {
highlighter: highlighter,
undo: undo,
redo: redo,
},
history: {
delay: 1000,
maxStack: 500,
userOnly: true,
},
},
clipboard: {
matchVisual: false,
},
}),
[toolbarId, enabledHashTagModule]
);
I have custom module called as hashTagModule. I want to register it only when its true. for initial render, when its true its working fine. but when user trying to toggle this feature off (enabledHashTagModule as false), the editor is misbehaving and doesn't show up the quill container / the editor. only toolbar is showing up.
Metadata
Metadata
Assignees
Labels
No labels