@astl/editor-tiptap/tiptap
For hosts that build their own TipTap editor around the authoring kit: the extensions of the content format and the
EditorAdapter over a TipTap editor. A separate entry, because it imports TipTap.
Interfaces
Section titled “Interfaces”PictureHooks
Section titled “PictureHooks”How the surface asks the author about pictures (<astl-editor> answers with its picture dialog). Without it,
picture files that are pasted or dropped are left to the browser's default and Enter on a picture does nothing new.
Methods
Section titled “Methods”ask(request): Promise<PictureFields | null>;Asks for a picture: a new one from file (uploaded first), or current to edit. Null: the author cancelled.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
PictureRequest |
Returns
Section titled “Returns”Promise<PictureFields | null>
help()?
Section titled “help()?”optional help(part): void;Opens the help for students of the component at the cursor at a part, from a tag on its frame (<astl-editor>:
astl-help-open, else its inspector).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
part |
HelpPart |
Returns
Section titled “Returns”void
refuse()
Section titled “refuse()”refuse(): void;A picture file was pasted or dropped, but there is no upload: say why nothing was inserted.
Returns
Section titled “Returns”void
style()?
Section titled “style()?”optional style(kind): void;Opens the style form of the selected picture, figure or component (<astl-editor>: as its toolbar's style menu
does).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
kind |
"picture" | "figure" | "component" |
Returns
Section titled “Returns”void
Functions
Section titled “Functions”astrolabeExtensions()
Section titled “astrolabeExtensions()”function astrolabeExtensions( authoring, manifests?, options?): Extensions;The TipTap extensions of the content format, labelled in authoring's locale: the nodes of manifests (default: the
authoring's types), pages with their heads, pictures, layouts and help for students. pictures is how the surface
asks about pictures; pageActions are the buttons of each page's head, in order (default: PAGE_ACTIONS, all four),
read when the extensions are made.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
authoring |
Authoring |
undefined |
manifests? |
readonly ComponentManifest[] |
authoring.engine.manifests |
options? |
{ pageActions?: readonly PageAction[]; pictures?: PictureHooks; } |
{} |
options.pageActions? |
readonly PageAction[] |
undefined |
options.pictures? |
PictureHooks |
undefined |
Returns
Section titled “Returns”Extensions
createTiptapAdapter()
Section titled “createTiptapAdapter()”function createTiptapAdapter(editor, manifests): EditorAdapter;The EditorAdapter over a TipTap editor made with astrolabeExtensions: the source in and out, one element by id,
the selection and change events, for the kit elements or <astl-editor>'s adapter. manifests are the types of
its schema, as given to astrolabeExtensions.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
editor |
Editor |
manifests |
readonly ComponentManifest[] |
Returns
Section titled “Returns”References
Section titled “References”PAGE_ACTIONS
Section titled “PAGE_ACTIONS”Re-exports PAGE_ACTIONS
PageAction
Section titled “PageAction”Re-exports PageAction