🌱 The next big step: Kirby 4 Alpha Learn more
Skip to content

Writer field improvements

Better toolbar

New toolbar option:

text:
  type: writer
  marks:
    - bold
    - italic
    - link
    - code
  toolbar:
    inline: false
    marks:
      - bold
      - "|"
      - link

inline controls the position/style of the toolbar:

marks and nodes control what is shown in the toolbar, while the top-level options of the same name define if the marks/nodes are actually supported. So you could, for example, support the code mark for pasting, but hide it from the toolbar.

Set heading levels

You can set the available heading levels in the writer field with the new headings option:

fields:
  text:
    type: writer
    headings:
      - 2
      - 3
      - 4

Counter

Added new minlength, maxlength and counter options, same behavior as for the textarea field.

sub and sup marks

fields:
  text:
    type: writer
    marks:
      - sub
      - sup

Clear formats

  • New writer field mark that clears all formatting marks (of the default ones all but email and link). 
  • New clear icon

Custom marks + nodes extension

  • New writerNodes Panel extension
  • New writerMarks Panel extension

The defined object extends /kirby/panel/src/components/Forms/Writer/Mark.js, /kirby/panel/src/components/Forms/Writer/Node.js and thus can make use of the same extension layer our default marks use.