Closed nuanjanP closed 2 months ago
For Source mode, I'm pretty sure I can't add the regex (as everything is show). I need to check, but I exclude it for the moment.
For the rest, what do you want to see into the UI ?
As for the UI, I was thinking of the last option, just a simple toggle in the plugin settings window. I think I'll be using the same settings for all the notes, and not changing it often, but that's just my own case.
By the way, somehow for me the plugin is working normally in source mode (which for me is a plus, because actually I mainly use source mode). For example, I could add xyz
as the regex to be matched and assign to it the class name xyz
, then if I load in the following css fragment:
.xyz {
font-size: 2em;
background-color: green;
color: red;
}
As expected, all instances of xyz
in source mode will be 2 times as big, with green background and red text.
I fully found how to disable the regex in the three different mode (so source, reading & LP). I removed the disable option, as it is handled by this.
To keep a clean settings, I added an option as a modal, so you can toggle each view separately !
I pasted the new settings, could you please review and said if it's okay?
Looking from the image of the proposed settings page, it looks great! Thank you! :)
Issue validation
Is your feature related to a problem ?
I'm interested in using this plugin as an "invisible character revealer" in the source (and perhaps live preview) mode. For example, I could match just the
U+200D zero width joiner
character, and then add via css a visible element such as text like "ZWJ" in a box, to indicate there's a ZWJ there.However, at the moment, in the reading mode, that ZWJ is also wrapped in
<span>
, preventing it from doing its normal job (for example, joining emojis in a ZWJ sequences).What solution do you want to see ?
It would be great if we have the following:
3 global toggles to select whether all the regex markings registered are to be applied in source mode, live preview mode, or reading mode. (More than one is allowed). These should be independent of each other, meaning if I don't want any markings at all in reading mode, I just have to toggle off the global toggle for "reading mode" here once.
(optional, but nice to have) 3 local toggles for each regex registered, to select whether this particular regex marking is to be applied in source mode, etc. This should override the global toggles for this particular marking. That is, if I wish to turn off all markings in reading mode except this one, I could do so by toggling off the global reading mode toggle, then toggling on the local reading mode toggle only for this regex marking.
I don't have any experience creating plugins, but I suspect this requires quite some work. So thank you at the very least for reading this long post :)
Describe the alternative you've considered
No response
Anything else?
No response
OS
Windows
Obsidian information
Plugin version
1.6.3