Include the below line at the top of the page to access the liferay-ui elements.
Note the <portlet:namespace /> tag in the function name.
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>The below line adds the Text Editor to the page.
<liferay-ui:input-editor initmethod="initDefaultMessage" name="textEditor" ></liferay-ui:input-editor>This code adds content that as soon as the editor is initialized.
Note the <portlet:namespace /> tag in the function name.
<script type="text/javascript"> function <portlet:namespace />initDefaultMessage() { return 'Text to test'; } </script>
No comments :
Post a Comment