•  
      request #40129 Cannot move out of preformatted
    Infos
    #40129
    Manuel Vacelet (vaceletm)
    2024-11-06 09:39
    2024-11-05 09:10
    41755
    Details
    Cannot move out of preformatted

    When I select "preformatted" (at the end of the edit section, without text after) I can start writting preformatted text, good !

    But when I want to move out of preformatted, I have no options:

    • Typing "Enter" twice (as we do for lists) doesn't move out preformatted
    • Selecting "text" in the style select box revert preformatted for the whole block (and the spaces/carriage return are lost)
    Artidoc
    development
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Verified
    Empty
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar

    Should we mimic the behavior of ckeditor?

    I don't know, ideally we should align with something that most users would expect. Regarding Ctrl + Enter I was not aware of it, how did you choose this shortcut ?

    select some preformatted code snippet (👼) + switch to normal text block => keep line breaks and the whole block change to normal text

    My expectation regarding the selector is that:

    If I select a part of preformatted text and style it as "text", the selected block should be converted

    However, if I'm on a line, esp with my carret at the beginning of the line, when I switch my style to "Text" , I don't expect the previous bloc to be converted, I expect that, starting this point, I will have "text"

    User avatar
    last edited by: Nicolas Terray (nterray) 2024-11-05 10:14

    The default binding to leave a preformatted block is Ctrl+Enter .

    Should we mimic the behavior of ckeditor?

    • Remove Ctrl+Enter
    • Hit Enter in the middle of preformatted block => stay in preformatted block
    • Hit Shift+Enter at the end of preformatted block => stay in preformatted block
    • Hit Enter at the end of the preformatted block => leave preformatted block to enter a normal text block
    • select some preformatted code snippet (👼) + switch to normal text block => keep line breaks and the whole block change to normal text

    • Status changed from New to Verified