Class TinyMCEHelper
Index
Constructors
Methods
Constructors
constructor
- new
TinyMCEHelper (): TinyMCEHelper Returns TinyMCEHelper
Methods
Static
configBasic
- 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
Optional
opts: {
basicFormats?: boolean;
contentCSS?: string[];
contentStyle?: string;
fontFormat?: boolean;
fontSize?: boolean;
help?: boolean;
stripStyleFormat?: boolean;
styleFormat?: boolean;
tjsStyles?: boolean;
toolbar?: boolean;
}Optional parameters.
Optional
basicFormats ?: booleanWhen true, only basic style formats are allowed.
Optional
contentCSS?: string[]An array of CSS paths to load.
getRoute
will be applied to them.Optional
contentStyle ?: stringThe same content style string for TinyMCE options.
Optional
fontFormat ?: booleanIncludes font select box.
Optional
fontSize ?: booleanIncludes font size select box.
Optional
help?: booleanWhen true include help plugin / toolbar button.
Optional
stripStyle ?: booleanFormat Strips any additional style formats added by other modules.
Optional
styleFormat ?: booleanIncludes style format select box.
Optional
tjsStyles ?: booleanIncludes extensive TJS styling options.
Optional
toolbar?: booleanIncludes the editor toolbar.
Returns object
TinyMCE options
Static
configStandard
- config
Standard (opts?): object Provides the standard TinyMCE configuration options. This is similar to standard core configuration and the ProseMirror editor.
Parameters
Optional
opts: {
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.
Optional
basicFormats ?: booleanWhen true, only basic style formats are allowed.
Optional
code?: booleanWhen true include source code editing option.
Optional
contentCSS?: string[]An array of CSS paths to load.
getRoute
will be applied to them.Optional
contentStyle ?: stringThe same content style string for TinyMCE options.
Optional
fontFormat ?: booleanIncludes font select box.
Optional
fontSize ?: booleanIncludes font size select box.
Optional
help?: booleanWhen true include help plugin / toolbar button.
Optional
stripStyle ?: booleanFormat Strips any additional style formats added by other modules.
Optional
styleFormat ?: booleanIncludes style format select box.
Optional
tjsOembed ?: booleanIncludes custom oEmbed plugin to include video from YouTube / Vimeo.
Optional
tjsStyles ?: booleanIncludes extensive TJS styling options.
Optional
toolbar?: booleanIncludes the editor toolbar.
Returns object
TinyMCE options
Static
configTJS
- configTJS(opts?): object
Provides the TJS super cool TinyMCE configuration options. These options are selected for increased media embedding and styling flexibility.
Parameters
Optional
opts: {
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.
Optional
basicFormats ?: booleanWhen true, only basic style formats are allowed.
Optional
code?: booleanWhen true include source code editing option.
Optional
contentCSS?: string[]An array of CSS paths to load.
getRoute
will be applied to them.Optional
contentStyle ?: stringThe same content style string for TinyMCE options.
Optional
fontFormat ?: booleanIncludes font formats, size, line spacing and color options.
Optional
fontSize ?: booleanIncludes font size options.
Optional
help?: booleanWhen true include help plugin / toolbar button.
Optional
stripStyle ?: booleanFormat Strips any additional style formats added by other modules.
Optional
styleFormat ?: booleanIncludes style format select box.
Optional
tjsOembed ?: booleanIncludes custom oEmbed plugin to include video from YouTube / Vimeo.
Optional
tjsStyles ?: booleanIncludes extensive TJS styling options.
Optional
toolbar?: booleanIncludes the editor toolbar.
Returns object
TinyMCE options
Static
optionsSingleLine
- options
Single (opts?): objectLine Provides a combined
mceConfig
and 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-size
in contentStyleBody and any other styles match the editor CSS variables:...TinyMCEHelper.configSingleLine({ contentStyleBody: { 'font-size': '22pt' }})
Parameters
Optional
opts: {
contentCSS?: string[];
contentStyle?: string;
}Optional parameters.
Optional
contentCSS?: string[]An array of CSS paths to load.
getRoute
will be applied to them.Optional
contentStyle ?: 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.