mirror of
https://github.com/directus/directus.git
synced 2026-02-16 07:14:57 -05:00
Close WYSIWYG fullscreen when opening drawer or dialog (#12037)
This commit is contained in:
@@ -36,6 +36,10 @@ export default function useImage(editor: Ref<any>, imageToken: Ref<string | unde
|
||||
icon: 'image',
|
||||
tooltip: i18n.global.t('wysiwyg_options.image'),
|
||||
onAction: (buttonApi: any) => {
|
||||
if (editor.value.plugins.fullscreen.isFullscreen()) {
|
||||
editor.value.execCommand('mceFullScreen');
|
||||
}
|
||||
|
||||
imageDrawerOpen.value = true;
|
||||
|
||||
if (buttonApi.isActive()) {
|
||||
|
||||
@@ -37,6 +37,10 @@ export default function useLink(editor: Ref<any>): UsableLink {
|
||||
icon: 'link',
|
||||
tooltip: i18n.global.t('wysiwyg_options.link'),
|
||||
onAction: (buttonApi: any) => {
|
||||
if (editor.value.plugins.fullscreen.isFullscreen()) {
|
||||
editor.value.execCommand('mceFullScreen');
|
||||
}
|
||||
|
||||
linkDrawerOpen.value = true;
|
||||
|
||||
if (buttonApi.isActive()) {
|
||||
|
||||
@@ -45,6 +45,10 @@ export default function useMedia(editor: Ref<any>, imageToken: Ref<string | unde
|
||||
icon: 'embed',
|
||||
tooltip: i18n.global.t('wysiwyg_options.media'),
|
||||
onAction: (buttonApi: any) => {
|
||||
if (editor.value.plugins.fullscreen.isFullscreen()) {
|
||||
editor.value.execCommand('mceFullScreen');
|
||||
}
|
||||
|
||||
mediaDrawerOpen.value = true;
|
||||
|
||||
if (buttonApi.isActive()) {
|
||||
|
||||
@@ -23,6 +23,10 @@ export default function useSourceCode(editor: Ref<any>): UsableSourceCode {
|
||||
icon: 'sourcecode',
|
||||
tooltip: i18n.global.t('wysiwyg_options.source_code'),
|
||||
onAction: () => {
|
||||
if (editor.value.plugins.fullscreen.isFullscreen()) {
|
||||
editor.value.execCommand('mceFullScreen');
|
||||
}
|
||||
|
||||
codeDrawerOpen.value = true;
|
||||
code.value = editor.value.getContent();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user