Skip to content

Commit 5dfe3a4

Browse files
committed
fix: lint visual editor
1 parent ea2ece0 commit 5dfe3a4

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

packages/netlify-cms-widget-markdown/src/MarkdownControl/VisualEditor.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ function Editor(props) {
9494
onChange,
9595
} = props;
9696

97-
const editor = useMemo(() =>
98-
withReact(withShortcodes(withBlocks(withLists(withInlines(createEditor()))))), []
97+
const editor = useMemo(
98+
() => withReact(withShortcodes(withBlocks(withLists(withInlines(createEditor()))))),
99+
[],
99100
);
100101

101102
const emptyValue = [defaultEmptyBlock()];
@@ -175,15 +176,15 @@ function Editor(props) {
175176
}
176177
const [toolbarKey, setToolbarKey] = useState(0);
177178

178-
const handleDocumentChange = debounce(newValue => {
179-
setEditorValue(() => newValue);
180-
onChange(
181-
slateToMarkdown(newValue, {
182-
voidCodeBlock: !!codeBlockComponent,
183-
remarkPlugins: getRemarkPlugins(),
184-
}),
185-
);
186-
}, 150);
179+
// const handleDocumentChange = debounce(newValue => {
180+
// setEditorValue(() => newValue);
181+
// onChange(
182+
// slateToMarkdown(newValue, {
183+
// voidCodeBlock: !!codeBlockComponent,
184+
// remarkPlugins: getRemarkPlugins(),
185+
// }),
186+
// );
187+
// }, 150);
187188

188189
function handleChange(newValue) {
189190
if (!isEqual(newValue, editorValue)) {

0 commit comments

Comments
 (0)