ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Textarea (Rich Text) messes up markup

January 17, 2013 5:19am

Subscribe [2]
  • #1 / Jan 17, 2013 5:19am

    G - B - O

    31 posts

    Hi there,

    I have a channel which is used for some small entries on the side of my pages. The entries contain an address block, a download link list, a random proverb, etc. The field type of the entries’ content is Textarea (Rich Text) since the user has to use the WYSIWYG.

    My markup in the entries is e.g. as follows:

    <header><h2>Downloads</h2></header>
    <ul>
    <li><a href="/">Some link</li>_<li><a href="/">Some link</li>_<li><a href="/">Some link</li>_</ul>
    __But gets turned into:_
    <header></p><h2>Downloads</h2></header>_<ul>_<li><a href="/">Some link</li>_<li><a href="/">Some link</li>_<li><a href="/">Some link</li>_</ul>
    __Which of course causes problems in the valid markup.__My address:__
    <header><h2>Contact me</h2></header>_<address>_My name____My home address line1__My home address line2____<abbr title="Phone">T</abbr> <a href="tel:555">555</a>
    
    <abbr title="Email">E</abbr> <a href="mailto:[email protected]">[email protected]</a>
    </address>

    Turns into:

    <header><p><h2>Contact me</h2><p></header><br />
    <address><br />
    My name<br />
    My home address line1<br />
    My home address line2</p>
    
    <p><abbr title="Phone">T</abbr> <a href="http://tel:555">555</a><br />
    <abbr title="Email">E</abbr> <a href="mailto:[email protected]">[email protected]</a><br />
    </address>


    Is there any way i could prevent the formatting from messing up my markup but maintain the WYSIWYG?

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases