0

I'm trying to create a liferay portlet with a input editor. For achieve this I'm using:

  • Liferay 6.2 GA5 bundled with Tomcat 7
  • Liferay Plugins SDK 6.2 GA5
  • Liferay IDE in Eclipse, 3.0.0 GA1

And I tried to create a portlet with the following content:

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<%@ page import="com.liferay.portal.kernel.util.UnicodeFormatter" %>

<portlet:defineObjects />

<aui:button-row cssClass="guestbook-buttons">
    <aui:button value="TESTING"></aui:button>
</aui:button-row>

<liferay-ui:input-editor initMethod="initEditor" name="mieditor">
<script type="text/javascript">
    function <portlet:namespace />initEditor() { 
        return "<%= UnicodeFormatter.toString("working") %>";
    }
</script>
</liferay-ui:input-editor>

Editor up.

The code indicated before creates a portlet with a button and input editor, but it does not show the editor, only the button and the sentence Editor up. You can see a picture of what I mean:

enter image description here

Do you know why the portlet does not show the input editor?

Thanks in advance!

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58

3 Answers3

1

You missed to include the Liferay-ui taglib.Just add this to your jsp

<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>

For future references,if you are developing in an IDE,it will show you a warning of Unknown tag,and hence it fails to resolve the tag or it's special usage.

Shivam Aggarwal
  • 795
  • 1
  • 11
  • 30
0

Simply you can use alloy CkEditor or FCKeditor. Alloy CKEditor Click here

FCKEditor click here

Akash
  • 816
  • 3
  • 13
  • 38
  • I tried to use FCKEditor, but I get the following error: `The absolut uri: http://java.fckeditor.net cannot be resolved in web.xml or jar files deployed with this application` – Mohamed Said Benmousa Aug 10 '16 at 07:59
0

Liferay implements CKEditor inside its own liferay-ui taglib.

If you want to use it dinamically I recommend you tinymce editor that you can customize automatically in its own page with your needs.

Jorge B.
  • 51
  • 3