Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Rashmi Rajappa
Trouble with dynamicdatalist textare display
January 21, 2013 3:16 PM
Answer

Rashmi Rajappa

Rank: New Member

Posts: 23

Join Date: April 27, 2009

Recent Posts

Hi,

I have a requirement to display "TextArea" field as a rich-text editor.

Inorder to achieve the same tried editing "textarea.ftl" as follows:
 1<#include "../init.ftl">
 2
 3<#assign width = escapeAttribute(fieldStructure.width!25)>
 4
 5<#assign cssClass = cssClass +  " aui-w" + width>
 6
 7<div class="aui-field-wrapper-content lfr-forms-field-wrapper">
 8     <@aui.script>
 9        function  <@liferay_portlet.namespace/>${namespacedFieldName} () { return "default content"; }
10    </@aui.script>
11   
12    <@liferay_ui["input-editor"] helpMessage=escape(fieldStructure.tip)  name=namespacedFieldName
13    cssClass=cssClass  initMethod=${namespacedFieldName} label=escape(label) />
14   
15    <@aui.input     name=namespacedFieldName type="hidden">
16        <#if required>
17            <@aui.validator name="required" />
18        </#if>       
19    </@aui.input>
20   
21
22    ${fieldStructure.children}
23</div>

but i'm having no luck. Html editor is displayed but does not get populated with "default content"

Pl let me know if you have achieved something similar or have any thoughts on how it can be resolved.

Thanks in advance,
Rashmi