0

Retry about Configure CKEditor from java (not javascript)

asked 2013-11-14 09:59:54 +0800

nomos gravatar image nomos
1 1

Dear, I've need to configure CKEditor from viewmodel in Java (not in Javascript).

I've try this and it is works well:

import org.zkforge.ckez.CKeditor;

@Wire
CKeditor myCKeditor;

Map<String, Object> myConfig = new HashMap<String, Object>();
myConfig.put("readOnly", true);
myConfig.put("uiColor", "#ff0000");
myCKeditor.setConfig(myConfig);

But I not able to configure and modify toolbars. In particular I've need to display only the bold button and nothing else.

About some previous suggests, I add:

For example, if i must have two CKEditor IN THE SAME PAGE, one of this readonly, I tried use two different js configuration files but this it's not work well. Sometime the second configuration file wins and overwrites settings of first file.

So, for this reasons, i've try another approch and configure my two CKEditor from java, it seem work well.

Now there are two possibilities:

  1. Learn config toolbars from java and not javascript (in this case i don't have any problems to have two different configuration)
  2. Or learn to have two different js configuration on same page

Somebody can help me ?

Thanks, Rinaldo

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-11-14 09:59:54 +0800

Seen: 21 times

Last updated: Nov 14 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More