Skip to content

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 03 Dec 17:08
· 20 commits to develop since this release
aba7821

Patch Changes

  • #31 2a8444a Thanks @kriss145! - The rich text editor gains Markdown shortcuts, a Markdown view and a drag handle, and each of its tools is a feature a field can leave out.

    Behaviour changes - read before upgrading

    • A field whose features is a list of its own shows no full-screen button until the list holds FullScreenFeature(). A field on the defaults, or with a function of defaultFeatures or rootFeatures, keeps it.

    Features

    • MarkdownShortcutsFeature() - Markdown typed or pasted, such as ## , - or **bold**, turns into what the field's features allow. On by default.
    • DragHandleFeature() - a paragraph, heading, list or quote moves above or below another by the handle beside it. On by default.
    • FullScreenFeature() - the button that opens the editor over the whole Admin. On by default.
    • MarkdownViewFeature() - the field edited as Markdown from the editor's Actions menu, and saved as the same document. Underline, subscript and superscript lose their format when the view opens, and undo brings it back. Off by default.
    • RichTextFeatureKey has the keys markdownShortcuts, dragHandle, fullScreen and markdownView, which an exhaustive switch handles.
  • #34 9c45ac5 Thanks @kriss145! - A rich text field can hold horizontal rules, which HorizontalRuleFeature() turns on.

    Features

    • HorizontalRuleFeature() - a toolbar button inserts a rule between blocks, and --- alone on a line makes one. Off by default.
    • The renderers write a rule as <hr>, under the component key horizontalRule.
    • RichTextFeatureKey has the key horizontalRule, which an exhaustive switch handles.