Copied to clipboard

Flag this post as spam?

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


  • Anuj 15 posts 35 karma points
    Feb 28, 2012 @ 09:10
    Anuj
    0

    Nested Divs Problem

    Hi Friends,

    I am new to Umbraco , i am facing one problem.Please help me out.

    I am trying to insert nested divs html in Rich textbox, but its not working properly.Below is the code :

    <div>
    <div>
        hey Frndzzz
    </div>
    </div>


    Output :

    <div>
        hey Frndzzz
    </div>

    Why its removing parent div ?

    Thanks
    Anuj

  • Rodion Novoselov 694 posts 859 karma points
    Feb 28, 2012 @ 18:05
    Rodion Novoselov
    0

    Hi. It's the way how TinyMCE cleans the text up. I don't know whether it will help but I would try to input these divs as:

    <div>
      <br/>
      <div>
          Lorem ipsum
      </div>
      <br/>
    </div>

     

  • Christian Stenfors 80 posts 124 karma points
    Feb 28, 2012 @ 21:51
    Christian Stenfors
    0

    You can specify what content and sub-content are allowed in the editor by modifying the file "tinyMceConfig.config".

    If you install the package "Config Tree" by Tim Geyssens, you can find all the config files under the "developer" section.

     Also, try to visit this post on how-to customize the editor

  • Rodion Novoselov 694 posts 859 karma points
    Feb 28, 2012 @ 22:42
    Rodion Novoselov
    0

    Actually, I've realised that it seems to be a feature of the TidyNet library and unfortunately it cannot be diverged. In fact the TidyNet itself is rather outdated itself and also used inside umbraco in completely uncustomisable way. The only thing you can do is to turn it off at all in umbracoSettings.config with setting TidyEditorContent to false there, but I'm not sure if it's a good idea.

  • Paul Blair 466 posts 731 karma points
    Feb 28, 2012 @ 23:30
    Paul Blair
    0

    You also mention that you are new to Umbraco so you might also like to consider structuring your solution slightly differently. I try and limit what my editors need to understand and format in the RTE to as basic as possible - usually paragraphs and UL/OL lists is sufficient.

    In this case I would move the nested DIVs to the master template (or XSLT/razor macro).

    Cheers

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft