Fórum

FCKEditor in Portlet

Rajiv Putuval, modificado 12 Anos atrás.

FCKEditor in Portlet

New Member Postagens: 3 Data de Entrada: 10/10/11 Postagens Recentes
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, modificado 12 Anos atrás.

RE: FCKEditor in Portlet

New Member Postagens: 3 Data de Entrada: 10/10/11 Postagens Recentes
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, modificado 12 Anos atrás.

RE: FCKEditor in Portlet

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
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, modificado 12 Anos atrás.

RE: FCKEditor in Portlet

New Member Postagens: 3 Data de Entrada: 10/10/11 Postagens Recentes
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, modificado 12 Anos atrás.

RE: FCKEditor in Portlet

Regular Member Postagens: 171 Data de Entrada: 08/10/10 Postagens Recentes
Hi Rajiv,

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

Thanks
Jaid.Shaik