@pihentagy: I like this bit of code because, using the same font in Edit as in Preview, one gets a sense of WYSIWYG.
I have found, however, that an inline footnote is not hidden.
So, in this: some text^[some footnote text], the bit between the square brackets does not get hidden by the code when the sentence is not in focus.
Also, this <!--some text--> does not get hidden.
And I would like to see <br> hidden too. I tried
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-formatting-link but it does not work.
Is there any way to get these things hidden too, or is that impossible with CSS code?