Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    May 07, 2011 @ 12:40
    Anthony Candaele
    0

    TinyMCE reformats nested div's

    Hi,

    Currently I try to add this markup to my richt text editor:

    <div class="sidebar">
    <div class="box_t">
    <div class="box_b">
    <h2>Gecertificeerd Umbraco Ontwikkelaar</h2>
    <img src="/media/141/cert.jpg" alt="umbraco certified developer" width="95" height="135" /><br />
    <p><a href="/{localLink:1166}" title="Umbraco">Verneem meer over Umbraco</a></p>
    </div>
    </div>
    </div>

    but tinyMCE reformats this markup to:

    <div class="sidebar">
    <h2>Gecertificeerd Umbraco Ontwikkelaar</h2>
    <img src="/media/141/cert.jpg" alt="umbraco certified developer" width="95" height="135" /><br />
    <p><a href="/{localLink:1166}" title="Umbraco">Verneem meer over Umbraco</a></p>
    </div>

    Has anyone experienced this and how can this be solved?

    Thanks for your help,

    Anthony Candaele
    Belgium

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 07, 2011 @ 18:07
    Jan Skovgaard
    1

    Hi Anthony

    The rich text editor is intended for text only and not code. So therefore it removes the extra divs etc.

    I think you could benefit from looking into enabling the templates part in tinymce to achieve the above code - Read more about it here: http://our.umbraco.org/wiki/how-tos/enabling-the-%27template%27-plugin-for-tinymce

    Hope this helps.

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    May 08, 2011 @ 10:19
    Anthony Candaele
    0

    Hi Jan,

    Thanks for the tip, I already stumbled accros this templates solution. I read the documentation on the wikipage that you provided, but I think it's a bit too much configuration in this case. Al I want is to apply certain css rules to my widgets. Therefore I'll look first if it isn't possible to redefine the css-rules.

    But this template solution might come in handy for other scenario's where I need a two or three column layout in my rich text editor.

    greetings,

    Anthony

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 08, 2011 @ 12:25
    Jan Skovgaard
    1

    Hi Anthony

    You could of course try to disable tidy in the umbracoSettings.config file...then you should be able to do the above thing...but I don't recommend it unless it's only you who are going to manage the content on the site.

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    May 08, 2011 @ 13:42
    Anthony Candaele
    0

    Hi Jan,

    Thanks for the tip, as it is only me who'll edit the website (it's the website of my own company), I'll try to disable tidy and see if this solves my problem.

     

    greetings,

     

    Anthony

Please Sign in or register to post replies

Write your reply to:

Draft