rich_text_editor.customButtons - Initialization - Question Editor API

Question Editor API Initialization

customButtons

If defined, the rich text editor will display a custom button in it's toolbar. If the button is clicked by an author, the function is called.

Values

Attribute path rich_text_editor.customButtons

Type array[CustomButton]

Type definitions

  • CustomButton object

    • attributes array[string]

      An array of string containing the selectors of the rich text editors with which the custom buttons are to be associated. If this is undefined the buttons will be associated with all rich text editor instances. For array type fields like options, you can either define a selector for a specific entry, e.g. options[0], or you can specify a selector targeting the whole array, e.g. options[*].

    • func RichTextEditorCustomButtonCallback

    • icon string

      A link to the button icon (Recommended dimensions: 25px by 25px).

    • label string

      The button label.

    • name string

      A unique identifier for the button.

  • RichTextEditorCustomButtonCallback function

    The callback function which is executed when the custom button is clicked.

    • attribute string

    • callback function

      Call this function to add the custom content to the text editor.

      • customContent string

        The custom HTML content to be added to the text editor.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.