One or more classes which specify the preview widget icon.
Indicates whether and with which priority (larger is better) this preview handler is responsible for the resource identified by the given URI. If multiple handlers return the same priority it's undefined which one will be used.
the URI identifying a resource.
a number larger than 0 if the handler is applicable, 0 or a negative number otherwise.
Search and return the HTMLElement which corresponds to the given fragment. This is used to initially reveal elements identified via the URI fragment.
the preview widget element containing the content previously rendered by PreviewHandler.renderContent.
the URI fragment for which the corresponding element shall be returned
the HTMLElement which is part of content and corresponds to the given fragment, undefined otherwise.
Search and return the HTMLElement which corresponds to the given line number. This is used to scroll the preview when the source editor scrolls.
the preview widget element containing the previously rendered by PreviewHandler.renderContent.
the line number for which the corresponding element shall be returned.
the HTMLElement which is part of content and corresponds to the given line number, undefined otherwise.
Returns the line number which corresponds to the preview element at the given offset. This is used to scroll the source editor when the preview scrolls.
the preview widget element containing the previously rendered by PreviewHandler.renderContent.
the total amount by which the preview widget is scrolled.
the source line number which corresponds to the preview element at the given offset, undefined otherwise.
Render the preview content by returning appropriate HTML.
information for the handler to render its content.
the HTMLElement which will be attached to the preview widget.
A PreviewHandler manages the integration of one or more previews.
It indicates whether a preview shall be rendered for a given resource URI and, if yes, renders the content. Additionally it optionally provides methods with which the scroll state of the preview and corresponding editor can be managed.
See MarkdownPreviewHandler for an example implementation.