getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

Missing <hr> separator block #3197

Closed hdodov closed 3 years ago

hdodov commented 3 years ago

Describe the bug
I'm migrating from Kirby Editor to Blocks and there's no horizontal rule block. After the data is converted to Blocks JSON, the hr block is still there:

image

...but there's no default snippet for it and it also doesn't render as a separator in the panel:

image

To Reproduce
Steps to reproduce the behavior:

  1. Create a page with the Editor field
  2. Put an hr block in that field
  3. Convert the Editor field to Blocks field as described in the docs

Expected behavior

  1. You should see a separator in the Kirby Panel
  2. There should be an <hr /> tag in the rendered HTML

Kirby Version
3.5.3.1

afbora commented 3 years ago

@bastianallgeier how do you think the solution should be? Should we create a new block type named hr/gap/separator/line or put <hr> inside the text block? By the way, <hr> does not work in the text block (writer field) for some reason, it also throws it into the paragraph <p><hr></p>. Alternatively, we can use the markdown block. What do you think?

bastianallgeier commented 3 years ago

I think it would make sense to add a new line block. This would open new options to add custom styling for such gaps/lines.

bastianallgeier commented 3 years ago