• Resolved proggers

    (@proggers)


    Hi,

    For two days (on and off) I’ve been trying to tweak wordpress or tinyMCE so that the editor leaves the   when editing a page (or a post) in the visual editor (I enter the   in html mode and when I switch to visual and back to html it turns into a normal space ‘ ‘).

    After some research (including this forum), I did the following:

    In the file wp-includes\js\tinymce\tiny_mce_config.php I changed the line

    $initArray = array (
    [...]
    	'entities' => '38,amp,60,lt,62,gt',

    into

    $initArray = array (
    [...]
    	'entities' => '38,amp,60,lt,62,gt,160,nbsp',

    and it just didn’t change anything.
    Afterwards, I tried to modify editor.js or something like that, but nothing came out of it.

    So now I’m gonna move on to other problems, if someone knows of a solution to this — a hack, plugin, or anything to that effect — I’d very much appreciate it, thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter proggers

    (@proggers)

    All right, I finally came about to solve it :p.
    Instead of using nbsp, I just enclose the text in a span : <span class="no_wrap"> and put .no_wrap{ white-space: nowrap; } in my css.

    I just recently encoutered nowrap somewhere and it ticked.

    I thought the problem was that i failed to use nbsp, but the real problem was that I couldn’t keep a whitespace from breaking.

    Sometimes you just have to leave an issue to rest, time and diversity came to the rescue where research and focus seemed to bring only confusion.

Viewing 1 replies (of 1 total)
  • The topic ‘hack to make the editor accept &nbsp;’ is closed to new replies.