Insert a new line #6202
Replies: 6 comments
-
Hi @suifengpiaoyang! I'm Dosu and I’m helping the Trilium team. There isn't an official or documented way to insert a new line before a code block at the top of a note in Trilium Notes. Standard CKEditor shortcuts like Enter or Shift+Enter at the start of the code block may not work in this scenario. As a workaround, you can switch the note to a code note type, manually edit the HTML to add a new line before the code block, and then switch back to a text note—though this is considered an advanced and unofficial method and not recommended for everyday editing tasks [source]. This appears to be a current limitation. If these options don't help, let me know and I can help look for other solutions or workarounds. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Currently, there’s no option to insert a blank line before a code block. However, there is a workaround: select a piece of text and drag it above the code block. Recording.2025-07-03.105220.mp4 |
Beta Was this translation helpful? Give feedback.
-
Follow these steps:
|
Beta Was this translation helpful? Give feedback.
-
This approach seems quite versatile and can be applied in other scenarios as well. Thanks. |
Beta Was this translation helpful? Give feedback.
-
It looks like black magic, but it gets the job done. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Aha, here's another trick 😄: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe feature
I don't know how to insert a new line before a code block which at the top of a note?
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions