Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Variable TextEditorConst

    TextEditor: {
        engines: Record<string, TextEditorEngineConfig>;
        enrichers: TextEditorEnricherConfig[];
        inserts: ProseMirrorInsert[];
    } = ...

    Rich text editing configuration.

    Type Declaration

    • engines: Record<string, TextEditorEngineConfig>

      Configuration for custom text editor engines.

    • enrichers: TextEditorEnricherConfig[]

      A collection of custom enrichers that can be applied to text content, allowing for the matching and handling of custom patterns.

    • inserts: ProseMirrorInsert[]

      A collection of custom ProseMirror inserts that the user may place in their ProseMirror documents.

      CONFIG.TextEditor.inserts.push({
      action: "readaloud",
      title: "Readaloud",
      html: `
      <div class="readaloud">
      <strong>Title</strong>
      <blockquote>You awake to find yourself in a dark room.</blockquote>
      </div>
      `
      });
      CONFIG.TextEditor.inserts.push({
      action: "lore-link",
      title: "Lore Link",
      inline: true,
      html: '<span class="lore"><selection></selection></span>'
      });
      CONFIG.TextEditor.inserts.push({
      action: "readaloud",
      title: "Readaloud",
      html: `
      <div class="readaloud">
      <selection>
      <strong>Title</strong>
      <blockquote>You awake to find yourself in a dark room.</blockquote>
      </selection>
      </div>
      `
      })
      CONFIG.TextEditor.inserts.push({
      action: "my-inserts",
      title: "My Inserts",
      children: [{
      action: "lore-link",
      title: "Lore Link",
      inline: true,
      html: '<span class="lore"><selection></selection></span>'
      }, {
      action: "quest-link",
      title: "Quest Link",
      inline: true,
      html: '<span class="quest"><selection></selection></span>'
      }]
      })