inspector/manifestText#
Interfaces#
TextOptions#
Defined in: editor/src/inspector/manifestText.ts:78
How a text shows a manifest: with or without its styling (graphical),
and in the complete form (every default written out) or the minimal one.
Properties#
includeStyling#
readonlyincludeStyling:boolean
Defined in: editor/src/inspector/manifestText.ts:79
minimal#
readonlyminimal:boolean
Defined in: editor/src/inspector/manifestText.ts:80
Functions#
applyText()#
applyText(
store,block,format,text,options):Applied
Defined in: editor/src/inspector/manifestText.ts:150
Read text in format and dispatch ONE set replacing the block’s
manifest with the value read, its IDs made bare (withHeldIds; the store
completes it). On acceptance the
read document is patched with the manifest the store now holds, as
options show it (it may differ in order, completed defaults or styles),
so the text keeps the user’s comments; on refusal nothing is dispatched or
the store’s single problem is returned. A text whose complete form equals
the current manifest dispatches nothing and is no refusal: the store
refuses a set that changes nothing.
Parameters#
store#
block#
string
format#
"yaml" | "json" | "toml"
text#
string
options#
Returns#
Applied
follow()#
follow(
source,manifest,options):Applied
Defined in: editor/src/inspector/manifestText.ts:192
The text after the manifest changed: the document patched in place with
the manifest as options show it, so its comments survive.
Parameters#
source#
manifest#
options#
Returns#
Applied
manifestOf()#
manifestOf(
block):Json
Defined in: editor/src/inspector/manifestText.ts:63
A block’s manifest as the JSON value its text shows, the value a manifest
file writes (core’s manifestFileValue): every ID written #id and the
full @context, the format’s terms and every prefix the statements use,
which core does not hold. The manifest’s type
leaves meta free (unknown), so its JSON is checked, once per manifest;
a manifest holding anything else throws a TypeError.
Parameters#
block#
Returns#
manifestText()#
Defined in: editor/src/inspector/manifestText.ts:97
The text of a block’s manifest in format.
Parameters#
manifest#
format#
"yaml" | "json" | "toml"