This file installs one tool into the user interface, a menu item for
refreshing dependecy-type atoms that are in the document or its header.
It also defines the Dependency subclass of Atom, but does not
permit users to insert any into their document or edit them. To do so, see
the file header-editor.js
, which defines tools for manipulating the list
of dependencies stored invisibly in the document header.
A dependency atom will have three important properties:
- A
"filename"
specifying where the dependency was loaded from. - A
"source"
specifying which FileSystem the dependency was loaded from. If this is the WebFileSystem, then the filename is the full URL, and such dependencies can be refreshed by reloading their content at any time. Other dependency types cannot be refreshed. - A
"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. - A
"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. - A checkbox for whether the dependency should be refreshed every time the document is loaded.
Source
Methods
install(editor)
Install into a TinyMCE editor instance a new menu item: Refresh dependencies. This reloads the contents of all URL-based dependencies in the document and its header.
This assumes that the TinyMCE initialization code includes the "refreshdependencies" item on one of the menus.
Parameters
-
editor
tinymce.Editor
the TinyMCE editor instance into which the new menu item should be installed