我需要在liferay 6.2中为journal-articles限制ckeditor的功能。我尝试了不同的方法,例如使用新工具栏覆盖ckconfig.jsp
的钩子(请参阅我的其他问题here和here),但这不起作用。现在,通过为portal-ext.properties
中的不同portlet定义不同的编辑器,我找到了另一种方法。
这些是我添加到portal-ext.properties文件中的行:
editor.wysiwyg.default=tinymce
editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.calendar.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.enterprise_admin.view.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.invitation.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp=fckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content_xsd_el.jsp=fckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_configuration.jsp=fckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.login.configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit_message.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.shopping.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit.html.jsp=ckeditor
但是,它似乎始终是默认编辑器,并忽略所有其他设置。这是一个错误还是我错过了什么?
我也尝试使用editor.wysiwyg.default=
省略默认编辑器,但是当我想添加或编辑文章时,没有编辑器出现。
有人可以帮我解决这个问题吗?
答案 0 :(得分:0)
最近,我将这些设置添加到了liferay-portal-6.2-ce-ga4安装的portal-ext.properties中,并且相应地更改了编辑器。所以,至少在这里可能没有错误:
$('tab').addClass('inactive);
$('input[type="submit"]').click(function(){
//Onclick get all the input value
var firstname = $("#firstname").val(),
lastname = $("#firstname").val(),
email = $("#email").val(),
psw = $("#password").val(),
regx = /^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/;
//If anything is invallid
if(firstname == "" || lastname == "" || email == "" || !regx.text(email) || psw == ""){
if(firstname == ""){ //if firstname is blank
alert("Please enter your first name");
}
if(lastname == ""){ //if lastname is blank
alert("Please enter your last name");
}
if(email == ""){ //if email is blank
alert("Please enter email id");
}
if(!regx.text(email)){ //if email is not in proper format
alert("Please enter valid email id");
}
if(psw == ""){ //if password is blank
alert("Please enter password");
}
return false; //form will not submit, it will return false
}else{
$('.tab').addClass('active').removeClass('inactive'); //if for is valid, add/remove class to the element
}
});
我没有在portal-ext.properties中添加editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.bb_code.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.html.jsp=ckeditor
。