Mohammad Ashfaq
Mohammad Ashfaq

Reputation: 1375

How to check the value of Rich Text Field in content of IBM WCM is empty

We have IBM WCM 8.5, and created content which contains Rich Text component in AT field.

I want to check whether the value of Rich Text is empty or not in one of my Menu Component.

I have tried to use "IfEmpty Plugin Component", but it doesn't work.

If any one have solution to this, it is of great help to me.

Upvotes: 1

Views: 990

Answers (2)

Nadeem Shaikh
Nadeem Shaikh

Reputation: 1

This is known issue in the Textbox.io editor which comes with IBM Portal 8.5. When its empty it gives the '<p>&nbsp;</p>' tags. We are facing the same issue. We are using Portal 8.5 CF 11

Upvotes: 0

Raef Kandil
Raef Kandil

Reputation: 307

I have tried using Plugin:ifEmpty in WebSphere Portal 8.5 and they worked fine with Rich Text Editors.

This was the code that I used in the presentation template:-

 [Plugin:ifEmpty value="[Element context='current' type='content' key='richText']"]Empty![/Plugin:ifEmpty]
 [Plugin:ifNotEmpty value="[Element context='current' type='content' key='richText']"]Not Empty![/Plugin:ifNotEmpty]

It worked pretty well and responded appropriately.

May be you need to update to the latest fix pack. The other possibility would be that you inadvertently put some value in the rich text editor in the authoring template and all contents created from it took this value. Check the source of the rich text editor to make sure that it is empty.

Upvotes: 2

Related Questions