You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Then the shortcode will match in the preview, as evidenced by the preview component being visible in the result, but will remain visible as raw HTML in the widget.
As far as I can tell, the dissonance comes from the fact that the control first parses the value as markdown before applying shortcodes:
Not sure if this is a bug or just a massive misuse of the feature on my part, but if I define a shortcode like so:
And use it on a document like so:
Then the shortcode will match in the preview, as evidenced by the preview component being visible in the result, but will remain visible as raw HTML in the widget.
As far as I can tell, the dissonance comes from the fact that the control first parses the value as markdown before applying shortcodes:
static-cms/packages/core/src/widgets/markdown/plate/hooks/useMarkdownToSlate.ts
Lines 36 to 42 in 734cecd
While the preview first replaces shortcodes (into MDX) and then parses markdown:
static-cms/packages/core/src/widgets/markdown/MarkdownPreview.tsx
Lines 58 to 72 in 734cecd
(Though I suppose for my particular issue, a call to
processShortcodeConfigsToSlate
around here would suffice:)static-cms/packages/core/src/widgets/markdown/plate/serialization/slate/deserializeMarkdown.ts
Lines 264 to 272 in 734cecd
The text was updated successfully, but these errors were encountered: