-
-
Notifications
You must be signed in to change notification settings - Fork 11
refactor, feat: support notationHightligh (close #50), feat: editing in live preview (close #19, about #44) #51
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
base: master
Are you sure you want to change the base?
Conversation
QQ2025520-133147.mp4I referred to the textarea on the https://shiki.style/ page. The principle is to stack textarea and pre together. Warning This strategy has a drawback: it is very susceptible to the influence of themes/plugins/styles, etc. Because it is necessary to ensure that the It's still the same display: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain more closely what you are doing and why you are doing it. Please keep to existing coding conventions used in the plugin, please use the set-up formatter, and please keep comments to english.
I pressed the wrong… 😢 don't review for now. |
Review note
A review item I haven't modified: obsidian docuemnt apiAlthough I know that obsidian provides a more convenient document api, I used to like using him too. It was very convenient. But I didn't use it here because I will encapsulate it into a universal module unrelated to obsidian later (for my use in other projects). Yes, an editable textarea encapsulated based on shiki/prism component, should be independent of obsidian. |
There are currently some problems with this PR:
This PR works
en
[!code hl]
,[!code ++]
). close Update shiki version and support notationHightligh #50zh
TODO / Task
from 'shiki'
replacefrom 'shiki.mjs'
) (Because of the problems with bun and npm)tab
keyTODO / Task in nestVersion
editablePre
. The principle does not use overlapping textare and pre. Rather, it's like my other project: https://linczero.github.io/obsidian-node-flow/p::selection {background-color; color}
(Adaptive light and shade)