David Mendoza 12 Anos atrás Nice post!!! But the part where you have to convert your content to xml is missing... Por favor, autentique-se para votar. Responda como... Cancelar
Natasa Bulatovic 12 Anos atrás Could you please advise if/how the CK editor can be integrated with the Comments? Por favor, autentique-se para votar. Responda como... Cancelar
Puj Z 12 Anos atrás Thanks for the post! I didn't get this:by adding a toolbar definition to the ckconfig.jspckconfig is a normal jsp file, the definition you said:CKEDITOR.config.toolbar_slimmed = [ ['Bold', 'Italic', 'Underline'], ['Link', 'Unlink']];ist not jsp format. Are you sure it should be added to ckconfig.jsp? If yes, to which part of it exactly? Por favor, autentique-se para votar. Responda como... Cancelar RODRIGO MADRIGAL Puj Z 12 Anos atrás Thanks for the post! I was looking for a solution to change the default toolbar of the blogs entry editor and it worked perfectly at first try.Puj Z, it worked for me that way. Try it! Por favor, autentique-se para votar. Responda como... Cancelar Erik Andersson RODRIGO MADRIGAL 12 Anos atrás Rodrigo, great to hear it worked out for!Puj Z. You are correct that the syntax is not JSP but javascript. The file ckconfig.jsp is included in the file ckeditor.jsp:<script type="text/javascript"> function initCkArea() { ... CKEDITOR.config.customConfig = '<%= request.getContextPath() %>/html/js/editor/ckeditor/ckconfig.jsp?p_l_id=<%= plid %>&p_main_path=<%= HttpUtil.encodeURL(mainPath) %>&doAsUserId=<%= HttpUtil.encodeURL(doAsUserId) %>&cssPath=<%= HttpUtil.encodeURL(cssPath) %>&cssClasses=<%= HttpUtil.encodeURL(cssClasses) %>'; ...</script> Por favor, autentique-se para votar. Responda como... Cancelar
RODRIGO MADRIGAL Puj Z 12 Anos atrás Thanks for the post! I was looking for a solution to change the default toolbar of the blogs entry editor and it worked perfectly at first try.Puj Z, it worked for me that way. Try it! Por favor, autentique-se para votar. Responda como... Cancelar Erik Andersson RODRIGO MADRIGAL 12 Anos atrás Rodrigo, great to hear it worked out for!Puj Z. You are correct that the syntax is not JSP but javascript. The file ckconfig.jsp is included in the file ckeditor.jsp:<script type="text/javascript"> function initCkArea() { ... CKEDITOR.config.customConfig = '<%= request.getContextPath() %>/html/js/editor/ckeditor/ckconfig.jsp?p_l_id=<%= plid %>&p_main_path=<%= HttpUtil.encodeURL(mainPath) %>&doAsUserId=<%= HttpUtil.encodeURL(doAsUserId) %>&cssPath=<%= HttpUtil.encodeURL(cssPath) %>&cssClasses=<%= HttpUtil.encodeURL(cssClasses) %>'; ...</script> Por favor, autentique-se para votar. Responda como... Cancelar
Erik Andersson RODRIGO MADRIGAL 12 Anos atrás Rodrigo, great to hear it worked out for!Puj Z. You are correct that the syntax is not JSP but javascript. The file ckconfig.jsp is included in the file ckeditor.jsp:<script type="text/javascript"> function initCkArea() { ... CKEDITOR.config.customConfig = '<%= request.getContextPath() %>/html/js/editor/ckeditor/ckconfig.jsp?p_l_id=<%= plid %>&p_main_path=<%= HttpUtil.encodeURL(mainPath) %>&doAsUserId=<%= HttpUtil.encodeURL(doAsUserId) %>&cssPath=<%= HttpUtil.encodeURL(cssPath) %>&cssClasses=<%= HttpUtil.encodeURL(cssClasses) %>'; ...</script> Por favor, autentique-se para votar. Responda como... Cancelar
Puj Z 12 Anos atrás thanks for the info! well I tried it but it doesn't work. I already have a standard liferay editor for the content field, and I would like to add a simple editor for description field. Here is what I did:I wrote a hook and added the slimmed editor as mentioned in the ckconfig.jspthen I replaced my simple aui:input with this: <aui:field-wrapper label="my-description"> <liferay-ui:input-editor name="descriptionEditor" toolbarSet="slimmed" initMethod="initDescriptionEditor" width="200" /> <script type="text/javascript"> function <portlet:namespace />initDescriptionEditor() { return "<%= (myModel!=null)?myModel.getAward():"" %>"; } </script> </aui:field-wrapper><%-- <aui:input name="description" style="width:550px;" type="textarea" label="challenge-award"/>--%>the commented line is what is was before. Now I don't see an html input field or editor field, all I see is the label. Have I missed anything? Por favor, autentique-se para votar. Responda como... Cancelar
Puj Z 12 Anos atrás by the way, for content, we did this approach to use the liferay standard editor:<script type="text/javascript"> function <portlet:namespace />initEditor() { $("#<portlet:namespace />editor").contents().find("iframe").contents().find("body").html(document.getElementById("<portlet:namespace />content").value); return document.getElementById("<portlet:namespace />content").value; } function extractCodeFromEditor() { document.getElementById("<portlet:namespace />content").value = window.<portlet:namespace />editor.getHTML(); <%--alert(document.getElementById("<portlet:namespace />content").value);--%> }</script>and then in the aui:form: <liferay-ui:input-editor /> <aui:input name="content" type="hidden" />This works. Por favor, autentique-se para votar. Responda como... Cancelar Puj Z Puj Z 12 Anos atrás to be preciser, I overwrote this file with a hook:portal-web/docroot/html/js/editor/ckeditor_diffs/ckconfig.jsp Por favor, autentique-se para votar. Responda como... Cancelar
Puj Z Puj Z 12 Anos atrás to be preciser, I overwrote this file with a hook:portal-web/docroot/html/js/editor/ckeditor_diffs/ckconfig.jsp Por favor, autentique-se para votar. Responda como... Cancelar
Ramiro Gomez 11 Anos atrás hi Por favor, autentique-se para votar. Responda como... Cancelar Ramiro Gomez Ramiro Gomez 11 Anos atrás hi Por favor, autentique-se para votar. Responda como... Cancelar
Ramiro Gomez Ramiro Gomez 11 Anos atrás hi Por favor, autentique-se para votar. Responda como... Cancelar
Alexander Ishmuradov 10 Anos atrás - Editado Thanks a lot! But how to process and insert the xml from database to rich text area? and how to do the the reverse process (HTML->XML) Por favor, autentique-se para votar. Responda como... Cancelar
Mohammad Hejazi 9 Anos atrás HelloPlease Help MeHow To Add Customize Fonts To Default HTML Editor Of Liferay? Por favor, autentique-se para votar. Responda como... Cancelar