We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13734
    • 11 Posts
    Hi

    On a website I am making the template looks like this

    
        	<p class="left">
            
    
    			[*main_info*]
    
            
            </p>
    
    



    I have made a RichText Template Variable for main_info so that someone who knows little about computers can go onto the manager and change the text there.

    However when the text is published on the page... it seems to be ignoring that it is class "left".

    I was wondering if perhaps that the template variable adds its own <p> </p> around the text input, so it would be overriding my own tags.


    If this is the case..how do I make it so the text inputted in the manager is inserted directly into the template code without having <p> tags added?
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      I think rich text is designed to be used with tinymce widget which will add tags as instructed by the user. I think you want a Textarea for just plain text input.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 13734
        • 11 Posts
        THanks for the reply.

        But if I choose "text" or "text area", the tinyMCE editor cannot be used when editing the page. . I assumed thats why I had to select ’RichText’ as the input type...
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Correct, if you use text or textarea it’s plain text input so any added html tags would need to be added for formating. If you want the richtext editor you need to enable the richtext widget, but then it generates html code as with normal content area.

          It’s all a question of what you want to do and how you could the template to work with that logic.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting