2

In RTF if I add meta tag as <meta name="description" content="Products" /> then if I view in source tab of RTF it displays below HTML for single line of meta tag.

<pre id="line1">
 <span>&lt;<span class="start-tag">meta</span> <span class="attribute-name">name</span>="<a class="attribute-value">description</a>" <span class="attribute-name">content</span>="<a class="attribute-value">Products</a>" <span>/</span>&gt;</span> 
</pre>

How we can restrict to not add extra tags for meta tag.

3 Answers 3

5

Meta tag is meant for the head element. It's not something you normally let editors mess with in free form like RTF.

Typically you render each field individually in you page template. By putting it in an RTF you are creating an invalid markup scenario because RTF is meant for content inside the body element. Hence, tridion tries to fix it by converting it into the best markup it can figure out (it's not that smart in this case).

In summary, your approach here is a bit funky, and rethinking the content model of how you specify page meta is probably something to consider.

3

It looks like you added the meta tag in the regular view of Tridion's rich-text editor.

To include HTML code into your rich-text area, you should paste it into the Source view. If you are in Tridion's regular Content Manager Explorer interface (the one with a tree on the left), you can find this one a few tabs to the right in the rich-text editor.

Nickoli's remark about about a META tag is also true: Tridion's rich-text editor is meant for editing rich text, which is normally part of the body of an article. If you want to include literal HTML fragments, a common practice is to put those into a regular multiline text field.

2

Many standard WYSIWYG editors will not respond well to HTML elements that are reserved for the <head>. Tridion is no different

In both Tridion 2011, and Tridion 2013, a <meta> tag added to the source of an RTF field will get stripped out. The same will be true if you add a <link> or a <title>

For RTF fields both in and out of Tridion, it's best to stick with block, or inline-level elements that are meant for content and/or allowed by the W3C to be in the <body>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.