Hot answers tagged

15

One of the last ones I used was for 2011 and it stripped out a lot of unwanted elements and attributes (in the hope to the keep the source clear most of the times ;o). It's documented what does what, hope its helpful to you: <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"> <output omit-xml-declaration="yes" method="xml" ...


12

You could check to see if the ItemField type is a XhtmlField. if (itemField is XHtmlField) { // Is Rich Text Field } else if (itemField is TextField) { // Is Text Field } else { ... }


11

Preview your page in the SDL Tridion CME and check if the expected Japanese characters are showing up - I am pretty sure, you will be able to see the correct Japanese characters unless you have done some explicit wrong coding in the template related to the Character Encoding. If the Above stands true, go to the (or may be ask your system admin) to check for ...


11

Sunil, it is difficult to tell from your question what your role and knowledge of Tridion is. It would be great if we can encourage more content editors with good questions here. However, I will answer this from a Tridion Developer perspective... There are six things that I would check for initially: How does the content look after you 'Save and close'...


11

Without knowing your full requirements, it is difficult to propose a specific solution. However, some options that you may want to consider are: Make the Schema field plain text. Obvioulsy this isn't an option if the text needs to be formatted after it has been pasted (as plain text). Use the browser's "Paste as plain text" functionality (CTRL + SHIFT + V ...


11

The reason that you get the namespace is because DWT outputs XHTML by default. I've usually just done the cleanup using a custom "find and replace" TBB as you've mentioned in your question. However, I believe Default Finish Actions has a TBB called Cleanup Template which cleans out the namespaces. So try this first.


11

By default SDL Tridion 2013 SP1 is not setup to be fully HTML 5 compliant (this is also still the case for Web 8 for that matter). You can extend the RTF field to allow HTML 5 tags, and this can be specified in the file TcmXhtml.Config at the path [Tridion]\web\WebUI\Core\Controls\FormatArea\TcmXhtml\ Depending on how you exactly want it to behave you can ...


9

As for the XSLT required, try using the following Filtering XSLT <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"> <output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"></output> <template match="/ | node() | @*"> <copy> <apply-templates select="node() | @*">&...


9

One approach i've used in the past is having two fields: the first field is a large text field (non rtf) where the users can past in html A second field allows repeating multimedia items of any type. if you wish to embed the path of one of the multimedia items in the content you simple reference the multimedia item by it's name, for example: <div style=...


8

This certainly used to work back in early R5, but I have not tried it in a long time. I believe it even worked by including the URI or an XSLT CT/TBB. Have you tried using the href attribute rather than the invalid url attribute? Take a look at: http://www.w3schools.com/xsl//el_include.asp


8

I don't believe that the SDL Tridion RTF field should be used to allow the pasting of scripts and other complex html items. It works, but as editors have the ability to change this in the WYSIWYG view, 99% of the time they end up removing, copying or breaking inserted functionality. When I need to offer functionality to insert into rtf content, I like to ...


7

in this issue, Tridion converts <p></p> to <p/>, however HTML is not XML, so after my migration project, this is cause HTML error or JavaScript error for many cases, i added &#160; (in HTML is &nbsp;) <p>&#160;</p>, this will create a visible space to the HTML rendering. so continue to solve by adding <span style="display:none"> ...


7

The only option you have to my knowledge is to use different classes for the old and new design. But for generics like a font specification on the body there really isn't a solution, unless you think in terms of a UI extension that determines this based on the Schema (provided you have different Schemas for the old and new design).


7

In a Format Area (aka. Rich Text Editor) all content is stored as XHTML and thus it needs to be well formed. So this means that if you add this URL in the content, the & sign needs to be escaped into &amp;. Now technically that isn't necessary for the href attribute of your link, but SDL Tridion still seems to force that on to us. Nothing you can ...


7

When you switch views, the data is loaded into an XML document in order to allow the format area XSLT to be executed. When this happens, the serialisation format is lost, and you have an in-memory representation of your characters. When the XSLT executes, the data from your XML document is again serialised, and in this case, you get a byte-representation of ...


7

I am going to give it a shot... What I would do is to use a different syntax for the tag in the RTF: instead of < h:output >something< \h:output > I would do something like { h:output } something { \h:output }. That would solve the problem of not-allowed tags in the RTF, since this syntax would be considered text. Then if what you need is the ...


7

When the DXA publishes binaries (either linked from MM link fields, or embedded in RTF) it publishes the original full res image. When the image is rendered by a view, it will be resized according to the particular design requirements of the view - in this way we try to keep a clean separation of content and design. RTF fields are tricky as when you start ...


7

There are normally three places that I would check for character display issues such as this: Do the characters look correct inside of the Components in the Tridion Content Management Explorer (CME)? Can you open the published page (assuming that this is not a Dynamic Component Presentation) in Notepad++ or similar on the web server? Do the characters look ...


7

Mine too is greyed out if I choose a Component as the link type. However, the open button becomes enabled if using http:// as the link type, and can be used to open the linked page (e.g. The BBC website) in a new browser tab. Copying and pasting the TcmId of the Component (e.g. tcm:234-122967) into the search box is the only way I know of opening a linked ...


6

I don't have a system to hand, but this sounds like an error in your extension.config file. For your new toolbar you probably have added a config element which tells the system to add it to the ComponentView - You will need to add this to the PageView also. If that does not help, please include the relevant section of your extension.config in your question.


6

I believe this is managed in the SchemaData of the schema your item uses, rather than the ItemFieldDefinitionData. If you don't know the schema ID your item will use you can use something like var schemaId = element.Attribute("SchemaId"); to retrieve it. Once you have this Schema ID, var schemaData = (SchemaData)client.ClientInstance.Read(schemaId, null)...


6

You won't need to flip anything for the content to work. The editing fields in Tridion support RTL languages just fine. You'll want to mark it as RTL in the HTML/CSS of the resulting web page, and of course ensure that you use a sensible encoding across the board. You might also want to use a font that displays Hebrew characters clearly. All told, I ...


6

The Tridion Rich Text Field stores unicode characters using an encoding that it manages internally (I believe it's something like UTF-16), and then it converts the characters to an HTML-compliant encoding based on what you have set on your Publication Target. As you have noticed, in some scenarios this isn't what we want. However, also do notice that this ...


6

Yes, you can add your own fonts. See "Configuring system fonts" in the documentation. While you cannot replace the existing size options, you can add your own CSS classes - which then gives you full freedom of how you want to present the content. See the "Styles configuration" documentation page - and while you are there you might want to browse the related ...


5

I was going to suggest an XSLT transformation, but there's nothing in the generated source that you could use to rebuild the original code. I don't think stripping out the CDATA will help; you'll just end up publishing an empty iframe as there is no script to publish the content. Is there a valid reason for doing this in the rich text editor? If this is ...


5

One option (may or may not suits you) I can suggest is to create a guideline for the content authors. The Guideline should states like below: If you are entering any content into a RTF field, any text which is not enclosed in an HTML tag, should be entered in the "Design" tab of the RTF field, rest all (i.e. those which are enclosed by an HTML tag) should ...


5

When you know the root node (which is the name of your RTF field basically), I was thinking something along the lines of this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"/> <xsl:template match="/ | node() | @*"> &...


5

Valid and well known issue, I wondered when it would end up here... But I have to confess I haven't seen a good solution for it either yet. Personally I sticked with the Schema XSLT nightmare route. Kept a single Filtering XSLT which should be applied to all Format Area fields. Looking at your option list I'm wondering why I never picked the Event System, ...


5

There is absolutely no need of such over-engineering (XSLT framework) or solutions which involves inclusion of unexpected characters (like non breaking space or p tags) as it may spoil the final HTML layouts depending on your HTML/CSS. In SDL Tridion 2011, it is very simple to achieve indeed; follow below step: 1) On your CMS server, navigate to the ...


5

I bumped into this problem during a migration from R5 to 2011, and the way I solved it was by inserting a non breaking space inside the empty tags (turning <p/> and <p></p> to <p>&#160;</p>, for instance), and changing every instance of &nbsp; to &#160;. However I was using a 3rd party tool that could do it "on the ...


Only top voted, non community-wiki answers of a minimum length are eligible