Note that there are some explanatory texts on larger screens.

plurals
  1. POTridion core service: How to check if multi line field has rich text formatting enabled?
    primarykey
    data
    text
    <p>I want to check through core service if rich text formatting is enabled on a multi line field or not.</p> <p>If I analyze source of a schema after rich text format enabling then there are lots of tags inserted for this purpose:- </p> <pre class="lang-xml prettyprint-override"><code> &lt;tcm:Size xmlns:tcm="http://www.tridion.com/ContentManager/5.0"&gt;2&lt;/tcm:Size&gt; &lt;tcm:FilterXSLT xmlns:tcm="http://www.tridion.com/ContentManager/5.0"&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"&gt;&lt;/xsl:output&gt; &lt;xsl:template name="FormattingFeatures"&gt; &lt;FormattingFeatures xmlns="http://www.tridion.com/ContentManager/5.2/FormatArea"&gt; &lt;Doctype&gt;Transitional&lt;/Doctype&gt; &lt;AccessibilityLevel&gt;0&lt;/AccessibilityLevel&gt; &lt;DisallowedActions&gt;&lt;/DisallowedActions&gt; &lt;DisallowedStyles&gt;&lt;/DisallowedStyles&gt; &lt;/FormattingFeatures&gt; &lt;/xsl:template&gt; &lt;xsl:template match="/ | node() | @*"&gt; &lt;xsl:copy&gt; &lt;xsl:apply-templates select="node() | @*"&gt;&lt;/xsl:apply-templates&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;xsl:template match="/body[not(processing-instruction() or comment() or normalize-space(translate(., &amp;apos; &amp;apos;, &amp;apos;&amp;apos;)) != &amp;apos;&amp;apos; or *[@* or * or comment() or processing-instruction() or not(self::p or self::br)])]"&gt; &lt;!-- make an empty &lt;body&gt; if all the body has is empty paragraphs, line-breaks and (non-breaking) spaces --&gt; &lt;xsl:copy&gt;&lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;xsl:template match="p[not(@* or * or comment() or processing-instruction() or normalize-space(translate(., &amp;apos; &amp;apos;, &amp;apos;&amp;apos;)) != &amp;apos;&amp;apos; or following-sibling::node()[@* or * or comment() or processing-instruction() or not(self::p or self::text()) or normalize-space(translate(., &amp;apos; &amp;apos;, &amp;apos;&amp;apos;)) != &amp;apos;&amp;apos;])]"&gt; &lt;!-- ignore all paragraphs at the end that have nothing but (non-breaking) spaces --&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; &lt;/tcm:FilterXSLT&gt; </code></pre> <p>But which exactly is the property to find if rich text is enabled I am not able to figure out even in core service API document.</p> <p>My core service code is a bit like below:-</p> <pre class="lang-cs prettyprint-override"><code>SessionAwareCoreService2010Client client = new SessionAwareCoreService2010Client(); client.ClientCredentials.Windows.ClientCredential.UserName = "myUserName"; client.ClientCredentials.Windows.ClientCredential.Password = "myPassword"; client.Open(); SchemaFieldsData fields = client.ReadSchemaFields("tcm-x-y-z", true, new ReadOptions()); foreach (var field in fields.Fields) { if (field is MultiLineTextFieldDefinitionData) { return Constants.DataType.STRING; } } </code></pre> <p>Please suggest.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload