Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dominik 711 posts 733 karma points
    Sep 26, 2011 @ 11:07
    dominik
    0

    TinyMCE removes brakes and spaces

    Everytime i use HTML input in TinyMCE and insert for example &nbsp; or a brake <br /> it is removed after saving. How can i stop removing this brakes and spaces?

    Thanks

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 26, 2011 @ 11:18
    Fuji Kusaka
    0

    Hi Dominik,

    Have you try to set the convertLineBreaks to false where you are add you umbraco:Item for your RTE

    <umbraco:Item convertLineBreaks="true" runat="server" />
  • skiltz 501 posts 701 karma points
    Sep 26, 2011 @ 11:38
    skiltz
    0

    Have a look at tinyMceConfig.config and the validElements section. You'll need to restart the app pool after any chnages or 'touch' the web.config (does the same thing).

     

     

     

  • dominik 711 posts 733 karma points
    Sep 26, 2011 @ 11:40
    dominik
    0

    HI Fuji,

    The problem is that they are also removed from HTML block in TinyMCE

    SO i insert for example &nbsp; and if i go back into the HTML view the &nbsp; is removed from code. So if I save it again it does not work any more.

    So everytime i use HTML and save it - umbraco must save completly the HTML which i have set.

    For example a blank table row "<tr><td>&nbsp;</td></tr>" is removed completly if i go back to HTML view.

    But it should show exactly the same HTML as i inserted before

     

     

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Sep 26, 2011 @ 12:34
    Peter Dijksterhuis
    0

    Dominik,

    open up tinymceconfig.config and look for the validElements-section.

    There's a setting -td[someallowedstuff]

    Change that to #td

    -td causes empty cells to be removed (see here: http://www.tinymce.com/wiki.php/Configuration:valid_elements)

    Peter

  • dominik 711 posts 733 karma points
    Sep 26, 2011 @ 12:43
    dominik
    0

    Thanks Peter,

    But this problem is not only occuring on <td> also if i insert a <p>&nbsp;</p> etc.

    Is there a possibility to show exactly the same HTML code which has been inserted after saving?

     

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Sep 26, 2011 @ 12:49
    Peter Dijksterhuis
    0

    By default, umbraco throws the content of the tinyMCE through tidy to cleanup possible bad html. It does that according to the validelements as described above. And basically it is to prevent editors to break the valid html.

    In your case, you can do 2 things:

    1 disable the tidyeditor completely (set TidyEditorContent in umbracosettings to false)

    2 edit the tinymceconfig-file to allow empty spaces on all elements you want (every element is listed in the tinymceconfig-file, so to allow <p>&nbsp;</p> change -p to #p etc)

    Does this help?

    Peter

  • dominik 711 posts 733 karma points
    Sep 26, 2011 @ 15:37
    dominik
    0

    HI Peter,

    I set TidyEditorContent to false, touched web.config but still it removes &nbsp; after saving from html view

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies