fix: the editor clicks the img button for the first time and it does not take effect

This commit is contained in:
shuai
2023-11-24 14:47:39 +08:00
parent 615d90f7c8
commit 81ad54c4c8
@@ -218,9 +218,6 @@ const Image = () => {
const addLink = (ctx) => {
context = ctx;
setEditor(context.editor);
if (!editor) {
return;
}
const text = context.editor?.getSelection();
setImageName({ ...imageName, value: text });