Pathfinder 1e for Foundry VTT
    Preparing search index...

    Class ScriptEditor

    Hierarchy

    • HandlebarsApplication<this> & ApplicationV2<
          RenderContext,
          Configuration,
          RenderOptions,
          this,
      >
      • ScriptEditor
    Index

    Constructors

    • Applications are constructed by providing an object of configuration options.

      Parameters

      • Optionaloptions: {}

        Options used to configure the Application instance (default: {})

      Returns ScriptEditor

    Properties

    DEFAULT_OPTIONS: {
        actions: {
            copyUuid: {
                buttons: number[];
                handler: (...this: any, event: PointerEvent, target: HTMLElement) => void;
            };
            help: Object;
            openMacro: (event: any, button: any) => Promise<void>;
        };
        classes: string[];
        form: { closeOnSubmit: boolean; handler: Object };
        id: string;
        position: { height: number; width: number };
        sheetConfig: boolean;
        tag: string;
        window: { icon: string; minimizable: boolean; resizable: boolean };
    } = ...
    PARTS: { footer: { template: string }; form: { template: string } } = ...

    Accessors

    • get category(): ScriptCallCategory

      Returns ScriptCallCategory

      • The category of this script
    • get isEditable(): boolean

      Is this script editable by the current User? This is governed by the editPermission threshold configured for the class.

      Returns boolean

    • get item(): ItemPF

      Returns ItemPF

      • The item the scriptCall belongs to
    • get promise(): Promise<any>

      Returns Promise<any>

    • get title(): string

      Returns string

    • get validCategories(): ScriptCallCategory[]

      Returns ScriptCallCategory[]

      • A list of valid categories for this script

    Methods

    • Parameters

      • options: any

      Returns any

    • Internal

      The event handler for changes to form input elements

      Parameters

      • formConfig: ApplicationFormConfiguration

        The configuration of the form being changed

      • event: Event

        The triggering event

      Returns void

    • Parameters

      • ...args: any[]

      Returns void

    • Parameters

      • context: any
      • options: any

      Returns Promise<void>

    • Protected

      Returns Promise<{ editable: boolean; id: string; isGM: any }>

    • Parameters

      • context: any

      Returns Promise<void>

    • Prepare context that is specific to only a single rendered part.

      It is recommended to augment or mutate the shared context so that downstream methods like _onRender have visibility into the data that was used for rendering. It is acceptable to return a different context object rather than mutating the shared context at the expense of this transparency.

      Parameters

      • partId: any

        The part being rendered

      • context: any

        Shared context provided by _prepareContext

      • options: any

        Options which configure application rendering behavior

      Returns Promise<any>

      Context data for a specific part

    • Partial copy of DocumentSheetV2#_renderFrame contents

      Synced with Foundry v13.348

      Parameters

      • options: any

      Returns Promise<HTMLElement>

    • Protected

      Disable or reenable all form fields in this application.

      Parameters

      • disabled: boolean

        Should the fields be disabled?

      Returns void

    • Returns Promise<unknown>

    • Parameters

      • event: any
      • button: any

      Returns Promise<void>

    • Parameters

      • options: any

      Returns Promise<any>