What does the "Text" view really show?
-
I have a client who’s a stickler for double-spaces after periods, and I’ve been fighting this over the years as we’ve moved his website around to different platforms. We’re in Word Press now, Version 4.1.1 with Elegant Theme’s Devi theme version 2.3.1.
I’m aware that browsers will collapse multiple spaces into one, and that a solution to this is to add non-breaking spaces. My question is more about how the Word Press post editor is behaving.
I’m noticing that when editing a post in the “Visual” view and insert two (or more) spaces between sentences and then switch to the “Text” view (which I understood to be a “raw” HTML view), I see the sentences with two (or more) spaces. I would expect to see a space followed by one (or more) non-breaking spaces. If I then preview the page and view the source, I see what I expect.
If I do the reverse, start in the “Text” view, insert two (or more) spaces then switch to the “Visual” view I see a single space. And then if I preview the page and view the HTML source, I see what I expect, two (or more) spaces that the browser is collapsing down to one.
So it seems that the “Text” mode of the editor is showing me a modified version of the actual HTML. My last test was to use the “Text” view to enter several non-breaking spaces (e.g. ” “) and then switch back to the “Visual” mode, where I saw the multiple spaces. But then when I switch back to the “Text” mode, the non-breaking space code was gone, but the spaces were still there.
So I’m thinking of ways that I can ensure these double spaces while working with the WordPress post editor, and wondering what the “Text” mode is really showing and if there are other options.
The topic ‘What does the "Text" view really show?’ is closed to new replies.