-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notation Color Blocks Only Works with Legacy Editor #9
Comments
Hi! did you find a solution when not using the legacy editor? |
not a direct solution to use this snipped. I stopped using it and instead have just been marking with obsidian's highlights (==highlight==) or the diff code. + this is blue
- this is red |
Cool, thanks |
It is not possible to get back the old functionality in the live preview with only CSS snippets. Below is a markdown example and the HTML output that is generated in the live preview window:
which gets translated into: <div class="HyperMD-codeblock HyperMD-codeblock-begin HyperMD-codeblock-begin-bg HyperMD-codeblock-bg cm-line" dir="ltr">
<img class="cm-widgetBuffer" aria-hidden="true" />
<span contenteditable="false"></span>
<img class="cm-widgetBuffer" aria-hidden="true" />
<span class="code-block-flair" aria-label="Copy" contenteditable="false">note-gray-background</span>
<img class="cm-widgetBuffer" aria-hidden="true" />
</div>
<div class="HyperMD-codeblock HyperMD-codeblock-bg cm-line" dir="ltr">
<span class="cm-hmd-codeblock" spellcheck="false">xxx</span>
</div>
<div class="HyperMD-codeblock HyperMD-codeblock-bg HyperMD-codeblock-end HyperMD-codeblock-end-bg cm-line" dir="ltr">
<img class="cm-widgetBuffer" aria-hidden="true" />
<span contenteditable="false"></span>
<img class="cm-widgetBuffer" aria-hidden="true" />
</div> It is not possible to style an element based on its But I just found the Admonition plugin, which looks like what I was looking for. Or you could use the built-in Callouts (which I also just found). |
Notation color blocks don't render when using the live preview, they just stay as code blocks.
Only when using the legacy editor and toggling preview mode do they render.
Tested using minimal theme 5.2 and notation-color-blocks as of commit d8caed4
The text was updated successfully, but these errors were encountered: