Hello everybody,
first off, I am totally new to CodeMirror, and sadly not too well versed in Javascript either (I’m working my way through Eloquent JavaScript though ). I’m using CodeMirror as part of the Admin plugin for my favourite CMS, Grav. I think the editor is fabulous and it mostly does what I need it to do flawlessly – since most of my websites are in German, the language of hilariously long wordtogethermashings (honestly that would work in German!), I especially appreciate the handy red dot display when pasting a soft hyphen.
Now I would like to have something like this for no-break spaces and double spaces too – I feel that the use of both increases text quality, but this is made difficult by the fact that I cannot tell them apart from regular single spaces or line breaks in the editor. I have tried putting the no-break space in the list of special characters, however it then displays as a red dot and therefore looks like a soft hyphen, which doesn’t help all that much. I am looking for a way to have three different markups for these characters, but there doesn’t seem to be a simple setting for that? Or am I just missing something?
I have also just thought of targeting the no-break spaces with CSS via the attribute selector, like span[aria-label='\ua0']
or the like, and I shall experiment with that. That wouldn’t help me with the double spaces, though. Any way to get these wrapped in markup too?
Thank you for your time and help!
Anna~