Lurch web app user interface

Module

HeaderEditor

Users who want to edit the invisible header inside of a Lurch document (which is stored in its metadata) can do so in one of two ways.

First, they can extract the document header into the document, which brings all content except for dependencies into the document. They can edit this content and then push it back up into the document header. This module provides actions (menu items) for doing so.

Second, they can edit the list of dependencies in the document header, which we refer to by the more mathematical term "background material." This module also provides an action (menu item) for editing that list of dependencies (background material).

Source

Methods

static

getHeader(editor) → {HTMLElement}

The metadata element for a document is stored in the editor rather than the DOM, because we do not want TinyMCE to be able to edit it. It is sometimes useful to be able to extract the header element from that metadata, so that it can be treated like an entire document (fragment), since it effectively is one.

Parameters

  • editor tinymce.Editor

    the editor from which to extract the document header

Returns

  • HTMLElement

    the HTMLElement that contains the document header for this editor

Source

static

install(editor)

Install into a TinyMCE editor instance the menu items that can be used in the primary window to pop open the secondary window, or instead to move content between the header and the main document. The menu items in question are intended for the Document menu, but could be placed anywhere.

Parameters

  • editor tinymce.editor

    the TinyMCE editor into which to install the tools

Source