Formatted text
import { FormattedText, parseFormatted, formattedPreview } from "@arcadia/ui";FormattedText
sourcerequired- string
- The text as written: plain text, read for a small set of Markdown marks. Nothing else decides its look.
ranges- readonly FormattedTextRange[]
- Spans of the source the product has already understood (
startandlengthin UTF-16 units), each drawn as itsnode. A range is never read for marks, though a mark may run across it; inside code it is text. One that overlaps another, runs outside the source or crosses a line is dropped. end- ReactNode
- A small mark that ends the last line (a read mark, a time): after the last word,
--space-1on, in the text's own style at its regular weight, so an icon in it takes the line's pair. It goes to a new line only with that word, never alone, and a copy leaves it out. After a closing block of code it stands under the block, at its end. codeCopy- boolean
- Default:
true - A copy control in each code block's top end corner, under the pointer, on keyboard focus and always on touch. It copies the block's text as written. false where copying the code makes no sense.
compactCode- boolean
- Default:
false rootStyle- RootStyle
- Typed StyleX override: where the text sits (layout only).
Rest props go to <div> props.
State machine
The deploy is ready.