Sizes are pixels, written with or without px. Other units are not converted.
A palette in the Chart Spec overrides the series colors for that chart.
Fonts in exports and Word
An exported image can only use fonts installed on the machine that exports it.
A web font the page loaded is not available to an exported image.
A native Word chart names a single typeface: the first family of --tt-chart-font-family
that Word ships with (WORD_FONTS), a generic family as its Word counterpart, or
fallbackFont ('Arial').
wordFontFor(fontFamily) tells whether Word will draw a different face than the page.
Quick Input
Property
Default
--tt-diagram-input-radius
8px
--tt-diagram-input-background
#f4f4f5
--tt-diagram-input-color
inherit
--tt-diagram-input-font-family
ui-monospace, monospace
--tt-diagram-input-delimiter-color
#6a00f5
--tt-diagram-input-placeholder-color
#a1a1aa
--tt-diagram-input-placeholder-lines
Set on an empty box to the number of lines of its placeholder
--tt-diagram-input-cell-background
#f4f4f5
Highlighted source
In the Quick Input, in a Mermaid diagram's code view, and in any element with the class
tiptap-diagram-source, such as a source editor of your own. The option
sourceHighlighting turns it off.
Class
Part
Color property
Light default
tiptap-diagram-source-keyword
The diagram or chart type, statement words
--tt-diagram-source-keyword
#1e40af
tiptap-diagram-source-label
Labels in shapes, quotes and the first column
--tt-diagram-source-label
#3f6212
tiptap-diagram-source-number
Numbers
--tt-diagram-source-number
#7c2d12
tiptap-diagram-source-operator
Arrows, delimiters, brackets, colons
--tt-diagram-source-operator
#52525b
tiptap-diagram-source-comment
Comments (%%)
--tt-diagram-source-comment
#4b4b53
The dark value of each is derived as for every default color, and each is at 4.5:1 or
more against the input background in both schemes.
To make one part colorless, set its property to inherit.
Diagrams
A diagram (the flowDiagram Node, see Diagrams) follows the same pattern
with its own names.
Diagram classes
Class
Element
tiptap-flow-diagram
The root of a diagram in the editor, with role="figure" and an aria-label from the description or the title
tiptap-flow-diagram-viewport
Around the canvas; scrolls while the diagram is zoomed in
tiptap-flow-diagram-zoom-box
Between viewport and canvas; takes the room of the zoomed picture
tiptap-flow-diagram-canvas
Holds the drawn diagram as an <img>
tiptap-flow-diagram-code
The source text, shown instead of the picture while the view is code
tiptap-flow-diagram-caption
Below the diagram: the title
tiptap-flow-diagram-attribution
Below the picture: the link the Diagram Renderer's rules ask for, hidden while there is none
tiptap-flow-diagram-error
The message shown when drawing failed
tiptap-flow-diagram-unavailable
What unavailable returns, shown when no Renderer here draws the diagram
tiptap-flow-diagram-resize-handle
A handle that resizes the diagram, with resizable; shown while the diagram is selected
tiptap-flow-diagram-label-input
The field a double click opens over a shape of a Mermaid flowchart, for its text
idle (the code view), empty, loading, ready, unavailable, error
data-tt-flow-diagram-renderer
The id of the Diagram Renderer drawing it
data-tt-flow-diagram-selected
Present while the diagram is selected
data-tt-flow-diagram-zoom
fit, or the zoom factor, such as 1.5 (setZoom)
data-tt-flow-diagram-maximized
Present while the diagram is laid over the window (setMaximized)
data-tt-flow-diagram-panning
Present while the zoomed picture is dragged (setPan)
data-tt-flow-diagram-sized
Present while the diagram has a size
data-tt-flow-diagram-align
left or right for a sized diagram that does not stand centered (setDiagramAlign)
data-tt-flow-diagram-resizing
Present while a handle is dragged
On .tiptap-flow-diagram-resize-handle:
Attribute
Values
data-tt-flow-diagram-resize
left, right, bottom, bottom-left, bottom-right
In HTML, on figure[data-type="flow-diagram"]:
Attribute
Value
data-tt-flow-diagram-format
The format
data-tt-flow-diagram-description
The description
data-tt-flow-diagram-view
code, while the source is shown
data-tt-flow-diagram-options
The options as JSON
Diagram custom properties
Property
Default
--tt-flow-diagram-padding
12px
--tt-flow-diagram-border
1px solid transparent
--tt-flow-diagram-radius
8px
--tt-flow-diagram-max-height
640px, the tallest a diagram is drawn at its width; not applied to a diagram with a size
--tt-flow-diagram-width
Set on a diagram with a size: its share of the column
--tt-flow-diagram-aspect-ratio
Set on a diagram with a size: its ratio. The picture fits into that shape
--tt-flow-diagram-handle-color
#6a00f5, the fill of a resize handle
--tt-flow-diagram-handle-border
#ffffff
--tt-flow-diagram-handle-radius
4px
--tt-flow-diagram-code-radius
8px
--tt-flow-diagram-code-background
#f4f4f5
--tt-flow-diagram-code-color
inherit
--tt-flow-diagram-code-font-family
ui-monospace, monospace
--tt-flow-diagram-empty-text
"Empty diagram", a CSS string shown while the source is empty
--tt-flow-diagram-caption-color
#71717a
--tt-flow-diagram-caption-size
0.875em
--tt-flow-diagram-caption-align
center
--tt-flow-diagram-attribution-color
#71717a
--tt-flow-diagram-attribution-size
0.75em
--tt-flow-diagram-loading-opacity
0.5
--tt-flow-diagram-error-color
#e5484d
--tt-flow-diagram-unavailable-color
#71717a
--tt-flow-diagram-selected-outline
2px solid #6a00f5
--tt-flow-diagram-label-input-border
1px solid #6a00f5, around the field for a shape's text
--tt-flow-diagram-label-input-background
Canvas
A maximized diagram uses --tt-chart-maximized-inset, --tt-chart-maximized-z-index and
--tt-chart-maximized-background, so charts and diagrams leave the same room.
Diagram drawing
Read by the Diagram Renderer when a diagram is drawn, and by an export.