trilium
    Preparing search index...

    The editor can operate into two distinct modes:

    Hierarchy

    • default
      • default
    Index

    Constructors

    Properties

    _noteId: string
    _position: number
    $widget: JQuery<HTMLElement>
    attrs: Record<string, string>
    children: default[]
    componentId: string
    initialized: null | Promise<void>
    noteContext?: NoteContext
    parent?: TypedComponent<any>
    spacedUpdate: default

    Accessors

    Methods

    • Parameters

      • notePath: string
      • linkTitle: null | string
      • externalLink: boolean = false

      Returns Promise<void>

    • Parameters

      • fun: (arg: unknown) => Promise<unknown>
      • data: unknown

      Returns undefined | Promise<unknown>

    • Sets the CSS attribute of the given name to the given value.

      Parameters

      • name: string

        the name of the CSS attribute to set (e.g. padding-left).

      • value: string

        the value of the CSS attribute to set (e.g. 12px).

      Returns default

      self for chaining.

    • By default:

      • activeContextChanged is intercepted and converted to a setNoteContext event to avoid refresh().
      • entitiesReloaded and refreshData are passed as-is.
      • any other event is not passed to the children.

      Type Parameters

      Parameters

      Returns null | Promise<unknown>

    • Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to false will cause the widget not to be displayed, however it will still be available on the DOM but hidden.

      If the widget is not enabled, it will not receive `refreshWithNote` updates.

      Returns undefined | null | boolean

      true when an active note exists

    • Parameters

      • ntxId: undefined | null | string | string[]

      Returns undefined | null | boolean | ""

    • Conditionally adds the given components as children to this component.

      Parameters

      • condition: boolean

        whether to add the components.

      • ...components: default[]

        the components to be added as children to this component provided the condition is truthy.

      Returns default

      self for chaining.

    • Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy.

      Parameters

      • condition: boolean

        true in order to apply the CSS, false to ignore it.

      • name: string

        the name of the CSS attribute to set (e.g. padding-left).

      • value: string

        the value of the CSS attribute to set (e.g. 12px).

      Returns default

      self for chaining.

    • Parameters

      • $img: JQuery<HTMLElement>

      Returns Promise<
          | null
          | {
              noteId: any;
              viewScope: { attachmentId?: undefined; viewMode?: undefined };
          }
          | {
              noteId: undefined
              | string;
              viewScope: { attachmentId: any; viewMode: string };
          },
      >

    • Parameters

      • show: undefined | null | boolean | ""

      Returns void