Lurch Web User Interface

Module

Dependencies

This file installs one tool into the user interface, a menu item for inserting a dependecy-type atom into the document. A user who edits such an atom can load any document into that dependency from any source supported by the Dialog.loadFile() function.

Such an atom will have two important properties:

  • Its "description" metadata entry will contain whatever text the user wants to use to make the dependency easy to identify when scrolling through a document, so the reader doesn't need to open it up to know what's inside. This is a simple piece of metadata, not HTML-type metadata; the difference between the two is documented here.
  • Its "content" HTML metadata entry will contain the full content of the dependency that was loaded, or it will be absent if the atom has not yet been configured by the user. This is a piece of HTML metadata, not simple metadata, because it will typically be large; the difference between the two is documented here.

Methods

static

install(editor)

Install into a TinyMCE editor instance a new menu item: Import dependency, intended for the Document menu. It adds a dependency atom (with no content or description) to the user's document, and if the user clicks it, they can then edit both in a popup dialog.

This assumes that the TinyMCE initialization code includes the "dependency" item on one of the menus.

Parameters

  • editor tinymce.Editor

    the TinyMCE editor instance into which the new menu item should be installed

Source