BookStack
BookStack copied to clipboard
Can't dismiss callout
Describe the Bug
When I write something into callout and it's the last line in book (I don't have any paragraphs or text under) and press Enter, new line with new callout appears. If I press Backspace, it disappears but the cursor goes to the previous callout.
Right now when:
- I press
enter, it will create a new callout, - I press
ctrl+1to change it toH1, it will createH1inside callout, - then I press
ctrl+1again and it will convertH1 inside calloutinto simple paragraph
Expected behavior:
- Like in Notion, (when I press enter in callout, next line is a normal paragraph)
Steps to Reproduce
As written above
Expected Behaviour
As written above
Screenshots or Additional Context
No response
Browser Details
Chrome 105.0.5195.102
Exact BookStack Version
v22.07.03
PHP Version
No response
Hosting Environment
Docker / Docker-compose
Hi. The similar is happening with inline_code.
- CTRL+8 (to activate inline code)
- write some text
enter
New line is starting as inline code. Normal <p> would be preferred.
Wrong way to dismiss:
- after pressing
enter, pressbackspace- because that would just move the cursor line above inside the previousinline_codewith an emptyinline_codeblock on the right.
Funny enough, if I repeat enter and backspace a few times, this happens:

Correct way to dismiss:
- after pressing
enter, write any character and only then pressbackspace- that will dismiss theinline_codeblock and I can write normally.
Dev findings for callouts
Setting tinymce keep_styles option to false will clear on newline, but will affect current format handling in such cases for all block types.
Option usage in tinymce src here:
https://github.com/tinymce/tinymce/blob/f65c926ace4ae3f68f8c08a1f6a4b693fc26e241/modules/tinymce/src/core/main/ts/newline/InsertBlock.ts#L267-L270
No additional control possible by the looks of things via specific format. Can possibly hook into custom event to handle specific cases we're attempting to address:
https://github.com/tinymce/tinymce/blob/f65c926ace4ae3f68f8c08a1f6a4b693fc26e241/modules/tinymce/src/core/main/ts/newline/InsertBlock.ts#L497
I have a document ending with a callout and I don't know how to dismiss it. I've tried using the arrow keys, clicking around, enter and backspace. I can't find any way to continue editing the document outside of the callout.
Is there a workaround?
Oh, I can make a new empty one and then toggle "large header" on and off.