Sunday, May 21, 2017

Use WYSIWUG Editor in our custom Portlet


In this blog we will see how to use WYSIWUG Editor in our custom portlet. So i create a simple portlet and load some default content in editor.You can change the content and click submit and the content will display on Console.






Inside your controller paste this. Here i am using Generic Portlet:-



Explanation:-
1)Inside doView i just set a attribute with name defaultText. We will fetch this on view.jsp.
2)processAction method display the text when we submit the form.

Now open view.jsp and paste this:-



Explanation:-
1)Here i fetch the value of defaultText which we set in our controller and put in inputEditor by using initEditor().
2)We create a simple form which just print the content data on console when we click the submit button.





Hope this will Help....


Related Post:-

No comments:

Post a Comment

Total Pageviews

Number Of Unique Visitor

Free counters!