JSF TinyMCE Composite Component not working?
I have created a TinyMCE Composite Component Steps which i did 1- Added
tinymce folder provided by TinyMCE in resource directory of the project.
2- Then created another folder editors in resource directory and created
two file one is js file tinymce_init.js and code is
tinyMCE.init({
mode : "specific_textareas",
theme : "simple",
debug : true,
editor_selector : "tinymce"
});
and another file tinymce.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<ui:component xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:pe="http://primefaces.org/ui/extensions">
<composite:interface>
<composite:attribute name="value" />
</composite:interface>
<composite:implementation>
<h:outputScript library="tinymce" name="tinymce.js" target="head" />
<h:outputScript library="editors" name="tinymce_init.js"
target="head" />
<h:inputTextarea rows="5" cols="80" />
</composite:implementation>
</ui:component>
3- Now access this composite component into my xhtml file something like this
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:editors="http://java.sun.com/jsf/composite/editors">
<h:head>
<title>test</title>
</h:head>
<h:body>
<editors:tinymce />
</h:body>
</html>
But when i access this file i saw a input box without any toolbar , what i
am doing wrong and JS is loaded properly without any error in browser
console.
No comments:
Post a Comment