Skip to content

Annotate Scripture Text

Mike Pelley edited this page May 13, 2021 · 2 revisions

A plugin can be derived from the IParatextScrTextAnnotationPlugin interface to participate in annotation of the scripture text. The annotations consist of modifying the style of the text by specifying CSS items for selected text. The following steps need to be performed by the plugin:

  • Create a class that implements the IPluginAnnotationSource interface.
  • Create a menu entry that specifies a description of the annotation and provides an instance of the above class.
  • Create a class that implements the IPluginAnnotation interface.
  • Create a class that implements the IScriptureTextSelection interface.

Paratext will add the menu entry to the View menu of Scripture text windows. The user clicks the menu items to enable the annotation. Paratext will call the GetAnnotations method of the IPluginAnnotationSource-derived class when it is generating the content of the Scripture text window. The plugin then provides a list of IScriptureTextSelection and the CSS style name to apply to the selection. Paratext will call the GetStyleInfo method to get the CSS definition for each style name.

See ReferencePluginD for an example of a plugin that provides annotation.

Clone this wiki locally