Hello,
I am using a writer field and I can’t find a way to have the ‘horizontalRule’ node show up in the toolbar.
The docs says it is supported. All the other options (headings, quote, lists) I can enable/disable successfully.
I was able to replicate the issue on a fresh plainkit install, I just changed the default.yml blueprint:
title: Default Page
sections:
fields:
type: fields
fields:
text:
type: writer
headings:
- 2
- 3
- 4
marks:
- underline
- link
- email
nodes:
- heading
- horizontalRule
- bulletList
- orderedList
Am I missing something ?
I guess that might actually be a regression.The nodes section in the docs says you can do it but seems not to be in the list of available nodes.
Try - hr rather then - horizontalRule
return $maxlength;
},
/**
* Minimum number of required characters
*/
'minlength' => function (int|null $minlength = null) {
return $minlength;
},
/**
* Sets the allowed nodes. Available nodes: `paragraph`, `heading`, `bulletList`, `orderedList`, `quote`. Activate/deactivate them all by passing `true`/`false`. Default nodes are `paragraph`, `heading`, `bulletList`, `orderedList`.
* @param array|bool|null $nodes
*/
'nodes' => function ($nodes = null) {
return $nodes;
},
/**
* Toolbar options, incl. `marks` (to narrow down which marks should have toolbar buttons), `nodes` (to narrow down which nodes should have toolbar dropdown entries) and `inline` to set the position of the toolbar (false = sticking on top of the field)
*/
'toolbar' => function ($toolbar = null) {
return $toolbar;
No luck with - hr either : /
I tried with various Kirby versions: 3.9, 4.2 and 4.8 and I couldn’t make it work in any one of those.
To me, it looks like an error in the documentation. Looking at the code it seems that the horizontal rule is generally available (i.e. if you paste text that contains them), but it is not an installed node.