Class TinyMCEHelper
Index
Constructors
Methods
Constructors
constructor
- new
TinyMCEHelper (): TinyMCEHelper Returns TinyMCEHelper
Methods
StaticconfigBasic
- config
Basic (opts?): object Provides a very basic / limited TinyMCE config that limits the ability to apply many styles from the toolbar or with key commands.
Parameters
Optionalopts: {
basicFormats?: boolean;
contentCSS?: string[];
contentStyle?: string;
fontFormat?: boolean;
fontSize?: boolean;
help?: boolean;
stripStyleFormat?: boolean;
styleFormat?: boolean;
tjsStyles?: boolean;
toolbar?: boolean;
}Optional parameters.
OptionalbasicFormats ?: booleanWhen true, only basic style formats are allowed.
OptionalcontentCSS?: string[]An array of CSS paths to load.
getRoutewill be applied to them.OptionalcontentStyle ?: stringThe same content style string for TinyMCE options.
OptionalfontFormat ?: booleanIncludes font select box.
OptionalfontSize ?: booleanIncludes font size select box.
Optionalhelp?: booleanWhen true include help plugin / toolbar button.
OptionalstripStyle ?: booleanFormat Strips any additional style formats added by other modules.
OptionalstyleFormat ?: booleanIncludes style format select box.
OptionaltjsStyles ?: booleanIncludes extensive TJS styling options.
Optionaltoolbar?: booleanIncludes the editor toolbar.
Returns object
TinyMCE options
StaticconfigStandard
- config
Standard (opts?): object Provides the standard TinyMCE configuration options. This is similar to standard core configuration and the ProseMirror editor.
Parameters
Optionalopts: {
basicFormats?: boolean;
code?: boolean;
contentCSS?: string[];
contentStyle?: string;
fontFormat?: boolean;
fontSize?: boolean;
help?: boolean;
stripStyleFormat?: boolean;
styleFormat?: boolean;
tjsOembed?: boolean;
tjsStyles?: boolean;
toolbar?: boolean;
}Optional parameters.
OptionalbasicFormats ?: booleanWhen true, only basic style formats are allowed.
Optionalcode?: booleanWhen true include source code editing option.
OptionalcontentCSS?: string[]An array of CSS paths to load.
getRoutewill be applied to them.OptionalcontentStyle ?: stringThe same content style string for TinyMCE options.
OptionalfontFormat ?: booleanIncludes font select box.
OptionalfontSize ?: booleanIncludes font size select box.
Optionalhelp?: booleanWhen true include help plugin / toolbar button.
OptionalstripStyle ?: booleanFormat Strips any additional style formats added by other modules.
OptionalstyleFormat ?: booleanIncludes style format select box.
OptionaltjsOembed ?: booleanIncludes custom oEmbed plugin to include video from YouTube / Vimeo.
OptionaltjsStyles ?: booleanIncludes extensive TJS styling options.
Optionaltoolbar?: booleanIncludes the editor toolbar.
Returns object
TinyMCE options
StaticconfigTJS
- configTJS(opts?): object
Provides the TJS super cool TinyMCE configuration options. These options are selected for increased media embedding and styling flexibility.
Parameters
Optionalopts: {
basicFormats?: boolean;
code?: boolean;
contentCSS?: string[];
contentStyle?: string;
fontFormat?: boolean;
fontSize?: boolean;
help?: boolean;
stripStyleFormat?: boolean;
styleFormat?: boolean;
tjsOembed?: boolean;
tjsStyles?: boolean;
toolbar?: boolean;
}Optional parameters.
OptionalbasicFormats ?: booleanWhen true, only basic style formats are allowed.
Optionalcode?: booleanWhen true include source code editing option.
OptionalcontentCSS?: string[]An array of CSS paths to load.
getRoutewill be applied to them.OptionalcontentStyle ?: stringThe same content style string for TinyMCE options.
OptionalfontFormat ?: booleanIncludes font formats, size, line spacing and color options.
OptionalfontSize ?: booleanIncludes font size options.
Optionalhelp?: booleanWhen true include help plugin / toolbar button.
OptionalstripStyle ?: booleanFormat Strips any additional style formats added by other modules.
OptionalstyleFormat ?: booleanIncludes style format select box.
OptionaltjsOembed ?: booleanIncludes custom oEmbed plugin to include video from YouTube / Vimeo.
OptionaltjsStyles ?: booleanIncludes extensive TJS styling options.
Optionaltoolbar?: booleanIncludes the editor toolbar.
Returns object
TinyMCE options
StaticoptionsSingleLine
- options
Single (opts?): objectLine Provides a combined
mceConfigand other default options to create a single line editor that prevents pasting, prevents enter key / new lines, saves on editor blur, and doesn't show the toolbar. This is useful as a shortcut to enable TJSTinyMCE to act as a content editable text entry for a single line text field.Note: Since this function returns an object w/ mceConfig and other options you must use it like in TJSTinyMCE options; where
font-sizein contentStyleBody and any other styles match the editor CSS variables:...TinyMCEHelper.configSingleLine({ contentStyleBody: { 'font-size': '22pt' }})
Parameters
Optionalopts: {
contentCSS?: string[];
contentStyle?: string;
}Optional parameters.
OptionalcontentCSS?: string[]An array of CSS paths to load.
getRoutewill be applied to them.OptionalcontentStyle ?: stringThe same content style string for TinyMCE options.
Returns object
TinyMCE options
Provides custom options for TinyMCE.
Please see CONFIG.TinyMCE for the default Foundry options.