Options
All
  • Public
  • Public/Protected
  • All
Menu

Hyperlink plugin does the following jobs for a hyperlink in editor:

  1. When hover on a link, show a tool tip
  2. When Ctrl+Click on a link, open a new window with the link
  3. When type directly on a link whose text matches its link url, update the link url with the link text

Hierarchy

  • HyperlinkPlugin

Implements

Index

Constructors

constructor

  • new HyperlinkPlugin(tooltip?: HyperlinkToolTip, target?: string, onLinkClick?: (anchor: HTMLAnchorElement, mouseEvent: MouseEvent) => boolean | void): HyperlinkPlugin
  • Create a new instance of HyperLink class

    Parameters

    • tooltip: HyperlinkToolTip = ...

      Tooltip to show when mouse hover over a link Default value is to return the href itself. If null, there will be no tooltip text.

    • Optional target: string

      (Optional) Target window name for hyperlink. If null, will use "_blank"

    • Optional onLinkClick: (anchor: HTMLAnchorElement, mouseEvent: MouseEvent) => boolean | void

      (Optional) Open link callback (return false to use default behavior)

        • (anchor: HTMLAnchorElement, mouseEvent: MouseEvent): boolean | void
        • Parameters

          • anchor: HTMLAnchorElement
          • mouseEvent: MouseEvent

          Returns boolean | void

    Returns HyperlinkPlugin

Methods

dispose

  • dispose(): void

getName

  • getName(): string

initialize

  • initialize(editor: IEditor): void

Protected onMouse

  • onMouse(e: Event): void

onPluginEvent

Generated using TypeDoc