|
|
@ -61,10 +61,14 @@ class Inkeon { |
|
|
|
//如果是图片或链接才显示菜单
|
|
|
|
if (editor.isActive("image")) { |
|
|
|
const altInput = BubbleMenuElement.querySelector( |
|
|
|
"input" |
|
|
|
".alt-input" |
|
|
|
) as HTMLInputElement; |
|
|
|
const currentImage = editor.getAttributes("image"); |
|
|
|
altInput.value = currentImage.alt || ""; |
|
|
|
const srcInput = BubbleMenuElement.querySelector( |
|
|
|
".src-input" |
|
|
|
) as HTMLInputElement; |
|
|
|
srcInput.value = currentImage.src || ""; |
|
|
|
} |
|
|
|
return editor.isActive("image") || editor.isActive("link"); |
|
|
|
}, |
|
|
|