Foren

FCKEditor in Portlet

Rajiv Putuval, geändert vor 12 Jahren.

FCKEditor in Portlet

New Member Beiträge: 3 Beitrittsdatum: 10.10.11 Neueste Beiträge
Hi EveryAll,

I would like to use FCKEditor in Liferay 5.2. Currently i am using MVC Portlet. Can anyone provide sample code for the same. I found several threads related to FCKEditor. But all are working on EXT environment. Is it possible to use FCKEditor in Spring MVC Portlet?

Regards
PSK
Rajiv Putuval, geändert vor 12 Jahren.

RE: FCKEditor in Portlet

New Member Beiträge: 3 Beitrittsdatum: 10.10.11 Neueste Beiträge
Hi EveryAll,

I would like to use FCKEditor in Liferay 5.2. Currently i am using MVC Portlet. Can anyone provide sample code for the same. I found several threads related to FCKEditor. But all are working on EXT environment. Is it possible to use FCKEditor in Spring MVC Portlet?


Till now there is no comment on my issue. Can any one help in this regard?


Is there any problem in this controller?

@RequestMapping(params = "action=edit") // action phase
public void populateSite(
@ModelAttribute("catalogInfo") HomeCatalog homeCatalog, BindingResult result, SessionStatus status, ActionResponse response) {

new HomeCatalogValidator().validate(homeCatalog, result);//here. I am not getting descry value.
if (!result.hasErrors()) {
if (this.catalogInfo == null) {
this.catalogInfo = new HomeCatalog();
}
if (homeCatalog != null && homeCatalog.getJounralId() == null){
homeCatalog.setJounralId(0);
}
this.catalogInfo.setDescr(homeCatalog.getDescr());
this.catalogInfo.setJounralId(homeCatalog.getJounralId());
status.setComplete();
response.setRenderParameter("action", "list");
}
}

UI :
<portlet:actionURL var="formAction">
<portlet:param name="action" value="edit"/>
</portlet:actionURL>

<form:form modelAttribute="catInfo" action="${formAction}" method="post" enctype="multipart/mixed" name="fm" onsubmit="extractCodeFromEditor(this);return false;">
<table>
<tr>
<td>
<liferay-ui:input-editor />
<form:hidden path="descr" id="descr"/></td>
</tr>
</table>
<button type="submit">Submit</button>
</form:form>

<script type="text/javascript">
function <portlet:namespace />initEditor() {
return '<font style="font-weight: bold">scott was here</font>';
}

function extractCodeFromEditor(el) {
alert("Test message");
document.fm.descr.value = window.<portlet:namespace />editor.getHTML();
alert(document.fm.descr.value);
fm.submit();
}
</script>


Regards,
PSK
thumbnail
Jignesh Vachhani, geändert vor 12 Jahren.

RE: FCKEditor in Portlet

Liferay Master Beiträge: 803 Beitrittsdatum: 10.03.08 Neueste Beiträge
you can have look on http://liferaycms.blogspot.com/2011/10/add-fckeditor-in-liferay.html

Also import and include all necessary tags and files like <liferay-theme:defineObjects /> <portlet:defineObjects />
Rajiv Putuval, geändert vor 12 Jahren.

RE: FCKEditor in Portlet

New Member Beiträge: 3 Beitrittsdatum: 10.10.11 Neueste Beiträge
Hi,

I got FCKEditor on my Portlet. How can i integrate with Spring MVC Portlet. I am facing problem with getting information of Fckeditor content in my Controller class.

Regards,
PSK
thumbnail
jaid shaik, geändert vor 12 Jahren.

RE: FCKEditor in Portlet

Regular Member Beiträge: 171 Beitrittsdatum: 08.10.10 Neueste Beiträge
Hi Rajiv,

I need fckeditor in my customized portlet how can i configure..
Can you explain little briefly......

Thanks
Jaid.Shaik