If someone wants to simulate the WYSIWYNG editor in Obsidian, you can follow the codes below to put together your own editing behavior. You can also make your own combinations of multiple scc Snippets and easily turn them on or off as needed in Obsidnian settings if something goes wrong.
My experience
It’s not perfect, but you can get used to it…
The main thing to get used to is that when a character is turned off, don’t start rewriting the words completely at the beginning, because you might “miss” between the hidden character and the first letter. You just have to test it to see how you like it…
When forcing the lines carefully… I think it’s a problem to edit them afterwards…
If you turn off the # characters, beware of adding inline TAGS. I don’t use them, so this is not a problem for me…
These can be used quite well:
/* Hides asterisks used for bold and italics */
.cm-formatting-strong, .cm-formatting-em {
display: none;
}
/* Hides underscores used for bold and italics */
.cm-formatting-em.cm-em-1, .cm-formatting-strong.cm-strong-1 {
display: none;
}
/* Hides `#` used for headings */
.cm-formatting-header {
display: none;
}
/* Hides `==` characters used for highlighting */
.cm-formatting-highlight {
display: none;
}
/* Hides markdown symbols for strikethrough */
.cm-strikethrough {
display: none;
}
These can be used, but it’s probably better not to use them:
/* Hides characters for code blocks */
.cm-formatting-code-block, .cm-formatting-code {
display: none;
}
/* Hides characters for block quotes */
.cm-formatting-quote {
display: none;
}
I don’t use these - because they bug me:
… maybe it will suit you
/* Hides characters used for lists */
.cm-formatting-list {
display: none;
}
/* Hides characters used for links */
.cm-formatting-link, .cm-hmd-link-url {
display: none;
}
/* Hides markdown symbols for strikethrough - this has completely disappeared */
.cm-strikethrough {
display: none;
}
/* Hides HTML tags in the editor */
.cm-s-obsidian span.cm-tag,
.cm-s-obsidian span.cm-bracket {
display: none;
}
/* Hides markdown symbols for superscript */
.cm-formatting-superscript {
display: none;
}