Provides custom options for TinyMCE.

Please see CONFIG.TinyMCE for the default Foundry options.

Constructors

Methods

  • 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?: boolean

        When true, only basic style formats are allowed.

      • OptionalcontentCSS?: string[]

        An array of CSS paths to load. getRoute will be applied to them.

      • OptionalcontentStyle?: string

        The same content style string for TinyMCE options.

      • OptionalfontFormat?: boolean

        Includes font select box.

      • OptionalfontSize?: boolean

        Includes font size select box.

      • Optionalhelp?: boolean

        When true include help plugin / toolbar button.

      • OptionalstripStyleFormat?: boolean

        Strips any additional style formats added by other modules.

      • OptionalstyleFormat?: boolean

        Includes style format select box.

      • OptionaltjsStyles?: boolean

        Includes extensive TJS styling options.

      • Optionaltoolbar?: boolean

        Includes the editor toolbar.

    Returns object

    TinyMCE options

  • 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?: boolean

        When true, only basic style formats are allowed.

      • Optionalcode?: boolean

        When true include source code editing option.

      • OptionalcontentCSS?: string[]

        An array of CSS paths to load. getRoute will be applied to them.

      • OptionalcontentStyle?: string

        The same content style string for TinyMCE options.

      • OptionalfontFormat?: boolean

        Includes font select box.

      • OptionalfontSize?: boolean

        Includes font size select box.

      • Optionalhelp?: boolean

        When true include help plugin / toolbar button.

      • OptionalstripStyleFormat?: boolean

        Strips any additional style formats added by other modules.

      • OptionalstyleFormat?: boolean

        Includes style format select box.

      • OptionaltjsOembed?: boolean

        Includes custom oEmbed plugin to include video from YouTube / Vimeo.

      • OptionaltjsStyles?: boolean

        Includes extensive TJS styling options.

      • Optionaltoolbar?: boolean

        Includes the editor toolbar.

    Returns object

    TinyMCE options

  • 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?: boolean

        When true, only basic style formats are allowed.

      • Optionalcode?: boolean

        When true include source code editing option.

      • OptionalcontentCSS?: string[]

        An array of CSS paths to load. getRoute will be applied to them.

      • OptionalcontentStyle?: string

        The same content style string for TinyMCE options.

      • OptionalfontFormat?: boolean

        Includes font formats, size, line spacing and color options.

      • OptionalfontSize?: boolean

        Includes font size options.

      • Optionalhelp?: boolean

        When true include help plugin / toolbar button.

      • OptionalstripStyleFormat?: boolean

        Strips any additional style formats added by other modules.

      • OptionalstyleFormat?: boolean

        Includes style format select box.

      • OptionaltjsOembed?: boolean

        Includes custom oEmbed plugin to include video from YouTube / Vimeo.

      • OptionaltjsStyles?: boolean

        Includes extensive TJS styling options.

      • Optionaltoolbar?: boolean

        Includes the editor toolbar.

    Returns object

    TinyMCE options

  • 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

    • Optionalopts: {
          contentCSS?: string[];
          contentStyle?: string;
      }

      Optional parameters.

      • OptionalcontentCSS?: string[]

        An array of CSS paths to load. getRoute will be applied to them.

      • OptionalcontentStyle?: string

        The same content style string for TinyMCE options.

    Returns object

    TinyMCE options