The client-side JournalEntryPage document which extends the common BaseJournalEntryPage document model.

Mixes

ClientDocumentMixin

See

JournalEntry The JournalEntry document type which contains JournalEntryPage embedded documents.

Hierarchy

  • any
    • JournalEntryPage

Properties

_toc: Record<string, JournalEntryPageHeading>

The cached table of contents for this JournalEntryPage.

Accessors

  • get permission(): any
  • Returns any

    Inherit Doc

  • get sceneNote(): Note
  • Return a reference to the Note instance for this Journal Entry Page in the current Scene, if any. If multiple notes are placed for this Journal Entry, only the first will be returned.

    Returns Note

Methods

  • Parameters

    • eventData: any
    • __namedParameters: {
          relativeTo: any;
          label: any;
      } = {}
      • relativeTo: any
      • label: any

    Returns any

    Inherit Doc

  • Parameters

    • event: any

    Returns any

    Inherit Doc

  • Parameters

    • changed: any
    • options: any
    • userId: any

    Returns void

    Inherit Doc

  • Parameters

    • config: any
    • options: {} = {}

      Returns Promise<any>

      Inherit Doc

    • Parameters

      • content: any
      • config: any
      • options: any

      Returns Promise<any>

      Inherit Doc

    • Protected

      Embed text page content.

      Parameters

      • config: Record<string, string | number | boolean> & EnrichmentOptions

        Configuration for embedding behavior. This can include enrichment options to override those passed as part of the root enrichment process.

      • Optional options: EnrichmentOptions = {}

        The original enrichment options to propagate to the embedded text page's enrichment.

      Returns Promise<HTMLElement | HTMLCollection>

      Example: Embed the content of the Journal Entry Page as a figure.

      @Embed[.yDbDF1ThSfeinh3Y classes="small right"]{Special caption} becomes

      <figure class="content-embed small right" data-content-embed
      data-uuid="JournalEntry.ekAeXsvXvNL8rKFZ.JournalEntryPage.yDbDF1ThSfeinh3Y">
      <p>The contents of the page</p>
      <figcaption>
      <strong class="embed-caption">Special caption</strong>
      <cite>
      <a class="content-link" draggable="true" data-link
      data-uuid="JournalEntry.ekAeXsvXvNL8rKFZ.JournalEntryPage.yDbDF1ThSfeinh3Y"
      data-id="yDbDF1ThSfeinh3Y" data-type="JournalEntryPage" data-tooltip="Text Page">
      <i class="fas fa-file-lines"></i> Text Page
      </a>
      </cite>
      <figcaption>
      </figure>

      Example: Embed the content of the Journal Entry Page into the main content flow.

      @Embed[.yDbDF1ThSfeinh3Y inline] becomes

      <section class="content-embed" data-content-embed
      data-uuid="JournalEntry.ekAeXsvXvNL8rKFZ.JournalEntryPage.yDbDF1ThSfeinh3Y">
      <p>The contents of the page</p>
      </section>
    • Protected

      Embed image page content.

      Parameters

      • config: Record<string, string | number | boolean>

        Configuration for embedding behavior.

      • Optional options: EnrichmentOptions = {}

        The original enrichment options for cases where the Document embed content also contains text that must be enriched.

      Returns Promise<HTMLElement | HTMLCollection>

      Example: Create an embedded image from a sibling journal entry page.

      @Embed[.QnH8yGIHy4pmFBHR classes="small right"]{Special caption} becomes

      <figure class="content-embed small right" data-content-embed
      data-uuid="JournalEntry.xFNPjbSEDbWjILNj.JournalEntryPage.QnH8yGIHy4pmFBHR">
      <img src="path/to/image.webp" alt="Special caption">
      <figcaption>
      <strong class="embed-caption">Special caption</strong>
      <cite>
      <a class="content-link" draggable="true" data-link
      data-uuid="JournalEntry.xFNPjbSEDbWjILNj.JournalEntryPage.QnH8yGIHy4pmFBHR"
      data-id="QnH8yGIHy4pmFBHR" data-type="JournalEntryPage" data-tooltip="Image Page">
      <i class="fas fa-file-image"></i> Image Page
      </a>
      </cite>
      </figcaption>
      </figure>
    • Convert a heading into slug suitable for use as an identifier.

      Parameters

      • heading: string | HTMLHeadingElement

        The heading element or some text content.

      Returns string

    • Build a table of contents for the given HTML content.

      Parameters

      • html: HTMLElement[]

        The HTML content to generate a ToC outline for.

      • Optional options: {
            includeElement: boolean;
        } = {}

        Additional options to configure ToC generation.

        • includeElement: boolean

          Include references to the heading DOM elements in the returned ToC.

      Returns Record<string, JournalEntryPageHeading>

    • Protected

      Construct a table of contents node from a heading element.

      Parameters

      • heading: HTMLHeadingElement

        The heading element.

      • Optional options: {
            includeElement: boolean;
        } = {}

        Additional options to configure the returned node.

        • includeElement: boolean

          Whether to include the DOM element in the returned ToC node.

      Returns JournalEntryPageHeading