Skip to content

Commit b9342f5

Browse files
committed
TINY-11908: Remove usage of miniature in component code
1 parent 36876f6 commit b9342f5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/main/ts/Utils.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
import { Ref, watch, SetupContext } from 'vue';
1010
import { IPropTypes } from './components/EditorPropTypes';
11-
import type { Editor as TinyMCEEditor, EditorEvent, TinyMCE } from 'tinymce';
12-
import { getTinymce } from './TinyMCE';
13-
import { TinyVer } from '@tinymce/miniature';
11+
import type { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
1412

1513
const validEvents = [
1614
'onActivate',
@@ -157,10 +155,7 @@ const mergePlugins = (initPlugins: string | string[] | undefined, inputPlugins?:
157155
const isNullOrUndefined = (value: any): value is null | undefined =>
158156
value === null || value === undefined;
159157

160-
const isDisabledOptionSupported = (): boolean => {
161-
const tinymce: TinyMCE = getTinymce();
162-
return !TinyVer.isLessThan(tinymce, '7.6.0');
163-
};
158+
const isDisabledOptionSupported = (editor: TinyMCEEditor): boolean => typeof editor.options.set === 'function' && editor.options.isRegistered('disabled');
164159

165160
export {
166161
bindHandlers,

0 commit comments

Comments
 (0)