ArkHost/HelixNotes
14
150
Fork
You've already forked HelixNotes
13

Collapsibles generate HTML code, and embedded tags convert to HTML as well #187

Open
opened 2026年06月29日 05:17:28 +02:00 by locodarwin · 2 comments

Description

Collapsible sections generates HTML and will cause all subsequent embedded tags to generate HTML in the source. Interestingly, callouts do not do this unless embedded themselves (or if a collapsible is embedded within them).

Steps to reproduce

Any collapsible section with embedded tags will do, but an especially interesting case is nested collapsibles:

  1. Create a new note
  2. Insert a collapsible section with slash / tags or by clicking the button in WYSIWYG mode
  3. Add another collapsible (or callout) inside the first collapsible
  4. Add some other / or typed tags/keystrokes, too, for the fun of it
  5. Switch to source mode; notice the source is pure HTML for all tags

Expected behavior

This might be the expected behavior. The effect, though, is that the resulting markdown output potentially loses portability in many other MD renderers. In fact some renderers that do render HTML to some degree will get completely borked, especially with embedded collapsibles or other HTML classes. It's up to the Helixnotes developer(s) to determine if this is accepted behavior, and to what extent. I understand adding HTML into markdown isn't exactly controversial, and it's expected for some features (e.g. table formatting), so this really comes down to intent.

Perhaps this is useful; it's clear that Helixnotes recognizes and renders standard HTML tags including <div> and classes, which allows for all sorts of creative rendering ideas for future development (e.g. Bootstrap elements and so on). However, this does seem to stray away from what appears to be the intent of Helixnotes and frankly sticking with pure markdown (and extended markdown of one or more of the extended flavors?) would suit me fine personally.

  • Continuous nesting of collapsibles (embed recursion) will actually render fine - tested up to 8 nestings
  • The generated HTML tags in do not appear to create any lasting issues with rendering in Helixnotes

Tested on

Windows 11, Linux (AppImage)

Attached screenshots

Attached screenshots just demonstrate the effects of embedded recursed collapsible sections (including callouts).

### Description Collapsible sections generates HTML and will cause all subsequent embedded tags to generate HTML in the source. Interestingly, callouts do not do this unless embedded themselves (or if a collapsible is embedded within them). ### Steps to reproduce Any collapsible section with embedded tags will do, but an especially interesting case is nested collapsibles: 1. Create a new note 2. Insert a collapsible section with slash `/` tags or by clicking the button in WYSIWYG mode 3. Add another collapsible (or callout) inside the first collapsible 4. Add some other `/` or typed tags/keystrokes, too, for the fun of it 5. Switch to source mode; notice the source is pure HTML for all tags ### Expected behavior This might be the expected behavior. The effect, though, is that the resulting markdown output potentially loses portability in many other MD renderers. In fact some renderers that do render HTML to some degree will get completely borked, especially with embedded collapsibles or other HTML classes. It's up to the Helixnotes developer(s) to determine if this is accepted behavior, and to what extent. I understand adding HTML into markdown isn't exactly controversial, and it's expected for some features (e.g. table formatting), so this really comes down to intent. Perhaps this is useful; it's clear that Helixnotes recognizes and renders standard HTML tags including `<div>` and classes, which allows for all sorts of creative rendering ideas for future development (e.g. Bootstrap elements and so on). However, this does seem to stray away from what appears to be the intent of Helixnotes and frankly sticking with pure markdown (and extended markdown of one or more of the extended flavors?) would suit me fine personally. ### Related - Continuous nesting of collapsibles (embed recursion) will actually render fine - tested up to 8 nestings - The generated HTML tags in do not appear to create any lasting issues with rendering in Helixnotes ### Tested on Windows 11, Linux (AppImage) ### Attached screenshots Attached screenshots just demonstrate the effects of embedded recursed collapsible sections (including callouts).

Hello,

You're right, this is expected behavior. Collapsible sections have no standard Markdown equivalent, so we serialize them as <details>/<summary> HTML.
When a collapsible contains other elements, the entire subtree falls through to DOM serialization, which is why callouts inside collapsibles also become HTML (callouts on their own serialize as > [!type] Markdown). Raw <details> degrades gracefully in renderers that support HTML, so we're keeping it as it is for now.

Leaving this open as a design discussion item.

Hello, You're right, this is expected behavior. Collapsible sections have no standard Markdown equivalent, so we serialize them as `<details>/<summary>` HTML. When a collapsible contains other elements, the entire subtree falls through to DOM serialization, which is why callouts inside collapsibles also become HTML (callouts on their own serialize as `> [!type]` Markdown). Raw `<details>` degrades gracefully in renderers that support HTML, so we're keeping it as it is for now. Leaving this open as a design discussion item.

Understood, thank you. Recognizing that there will be some need to allow for general HTML to render features that markdown doesn't cover, it becomes a question of what extent you wish to allow non-markdown features. I support any direction you choose, but I can readily see the slippery slope. Do you have some thoughts already as to where you want to draw the line?

Understood, thank you. Recognizing that there will be some need to allow for general HTML to render features that markdown doesn't cover, it becomes a question of what extent you wish to allow non-markdown features. I support any direction you choose, but I can readily see the slippery slope. Do you have some thoughts already as to where you want to draw the line?
Sign in to join this conversation.
No Branch/Tag specified
main
fix/vault-indication
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.2.9
v1.2.8
v1.2.7
v1.2.6
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.1.9
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.9
v1.0.8
v1.0.7
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ArkHost/HelixNotes#187
Reference in a new issue
ArkHost/HelixNotes
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?