Optional ReadonlyblockOptional ReadonlycanOptional ReadonlycontainerWhere the floating control is appended. Defaults to the view's parent, which must be a positioned ancestor of the surface.
Optional ReadonlycopyLabels for the copy button, overridable for localization.
Optional ReadonlydetectGuess the language of a block that names none, from its text. Supply
detectLanguage from @trevixal/extension-code-highlight; keeping it an
option means this package needs no dependency on that one.
The guess is shown as a suggestion. The block's own attribute always wins, and nothing is written to the document until the user picks.
Optional ReadonlyhintThe keyboard hint shown beside the picker: by default, that Enter adds a
line and Mod-Enter leaves the block. A string replaces it; false drops
it. Hidden on its own over a block too narrow to hold it.
ReadonlylanguagesOptional ReadonlynodeNode type carrying the language attribute (default "codeBlock").
Optional ReadonlyonCopy the block's code. Supplying this adds a Copy button to the bar; it reports "Copied" or "Failed" for a moment from the returned result. The block's language comes too, for a copy that depends on it (a terminal session's leaves its prompts out).
Optional ReadonlyonRun the block's code. With this, a Run button shows on the blocks
canRun accepts, by their language.
Optional ReadonlyplainLabel for the "no highlighting" entry (default "Plain text").
Add the block's options to the bar: numbered lines, wrapped lines, a folded block, lines picked out and a title. The block's attributes hold them; a host draws them (
codeBlockLinesin extension-code-highlight).