mirror of
https://github.com/directus/directus.git
synced 2026-01-24 16:57:55 -05:00
Fix/wysiwyg context menu (#14404)
This commit is contained in:
@@ -464,6 +464,24 @@ export default defineComponent({
|
||||
});
|
||||
setCount();
|
||||
});
|
||||
|
||||
editor.on('OpenWindow', function (e: any) {
|
||||
if (e.dialog?.getData) {
|
||||
const data = e.dialog?.getData();
|
||||
|
||||
if (data) {
|
||||
if (data.url) {
|
||||
e.dialog.close();
|
||||
editor.ui.registry.getAll().buttons.customlink.onAction();
|
||||
}
|
||||
|
||||
if (data.src) {
|
||||
e.dialog.close();
|
||||
editor.ui.registry.getAll().buttons.customimage.onAction(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setFocus(val: boolean) {
|
||||
|
||||
@@ -273,6 +273,10 @@ body.dark .tox .tox-toolbar__overflow {
|
||||
line-height: unset;
|
||||
}
|
||||
|
||||
.tox .tox-collection__item-accessory {
|
||||
color: var(--foreground-normal);
|
||||
}
|
||||
|
||||
.tox .tox-textfield:focus,
|
||||
.tox .tox-selectfield select:focus,
|
||||
.tox .tox-textarea:focus {
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function useImage(
|
||||
onAction: (buttonApi: any) => {
|
||||
imageDrawerOpen.value = true;
|
||||
|
||||
if (buttonApi.isActive()) {
|
||||
if (buttonApi === true || buttonApi.isActive()) {
|
||||
const node = editor.value.selection.getNode() as HTMLImageElement;
|
||||
const imageUrl = node.getAttribute('src');
|
||||
const imageUrlParams = imageUrl ? new URL(imageUrl).searchParams : undefined;
|
||||
|
||||
Reference in New Issue
Block a user