Rock icon indicating copy to clipboard operation
Rock copied to clipboard

[Prealpha] Obsidian LavaShortcodeDetail Documentation field defaults to code editor if shortcode syntax is present

Open leahjennings opened this issue 4 months ago • 1 comments

Description

If you add shortcode syntax ({[ ]}) to the Documentation field in the new Obsidian LavaShortcodeDetail block, then when you go to edit the shortcode it defaults to Code Editor without allowing it to show the visual editor. Before save: image

After save: image

I often use this Documentation field for quick copy/paste references on how to use the shortcode.

Actual Behavior

The visual editor doesn't show if there is any shortcode syntax ({[ ]}) present.

Expected Behavior

I would expect that using shortcode syntax in the Documentation field would show the rendered output in the visual editor (the non-Obsidian block did).

Steps to Reproduce

  • On the prealpha site, go to Settings, then click on Lava Shortcodes

  • Click the + icon to create a new shortcode

  • Name it test, make the shortcode test, mark it inline, and put test in the shortcode markup (this is irrelevant but they are required fields) image

  • In the Documentation field, add the shortcode syntax: {[ test ]} image

  • Save the shortcode

  • Find the shortcode in the list and open it, then click Edit

  • Notice how the Documentation field only shows code editor without the ability to switch to visual editor image

Issue Confirmation

  • [X] Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • [X] Reproduced the problem on a fresh install or on the demo site.

Rock Version

Rock McKinley 17.0 (1.17.0.30)

Client Culture Setting

en-US

leahjennings avatar Oct 20 '24 16:10 leahjennings