Closed weberhofer closed 2 years ago
Ref: INT-2859
In TinyMCE 6 settings was renamed to options. This meant that the previous type RawEditorSettings
became RawEditorOptions
which is probably what you want. If you need to support both TinyMCE 5 and 6 (which we do in the integrations) you can use a typescript trick to get whatever of the two is needed:
type EditorOptions = Parameters<TinyMCE['init']>[0];
The button specifications are available from Ui
. The button specification can be accessed with:
import { Ui } from 'tinymce';
const buttonSpec: Ui.Toolbar.ToolbarButtonSpec = {
// your spec here
};
To be able to write tinymce configurations and and plugins with typescript, it would be great to have those interfaces exported.
The former RawEditorSettings have been exported in the 5.x version of the typings, but the Button specifications were never exported,