Main Region

FOEX CKeditor
2 answers | 668 views

CH
Jul 30, 2015 23:37 +00:00

We use PL-jrxml2pdf to print out many of our application created documents. We commonly supply the customer a way to create rich-text (HTML markup). This causes problems as the standard FOEX HTML editor creates markup that PL-jrxml2pdf cannot render.

I have just tried CKeditor (new in 2.0.1 I believe) and found that it created much cleaner and simpler HTML markup than the standard HTML editor.

I looked to some documentation concerning what kind of config switches are available and did not find any (or examples of use) in demo.tryfoexnow.com. I'd like to leave the toolbar on FULL, but would like to turn off many of the buttons (I specifically would like to use the Find and Replace functionality). Any hints? I looked at the Sencha docs, but I have to admit my eyes cross after looking through it.... There is always SO MUCH that I know I can't use and it didn't look there was anything that I could use to turn off buttons.

Thanks,

Chris

4 comments

CH
Chris Aug 1, 2015 18:05 +00:00 

OK, using the example you gave me and the CKEditor documentation, I was able to define which buttons I wanted turned on. Thank you.

Now, the only remaining issue I have, is that when I apply a value to the CKEditor page item, it goes blank. If one presses the "undo" button within the CKEditor, it then displays correctly and now one can apply changes, and everything sticks fine. I tried a refresh on it, but that didn't seem to do anything.

So just to reiterate, I do have it behaving itself when its a field you just type into. Just not when you apply a template to it.

CH
Chris Aug 1, 2015 18:21 +00:00 

And I can't seem to control the height with "height":100 or "height":"100" in either the standard config field to the CKEditor config field. This is probably due to the fact you aren't supporting it.

MN
Matt Nolan Oct 28, 2015 06:59 +00:00 

We have provided the ability to add CKEditor JSON config to make it as flexible as possible. The CKEditor documentation has all the information you need. If you ask why you need to define the config a certain way, well thats because they designed it that way.

They now provide a web page to allow you to customize the toolbar and generate the JSON config: http://ckeditor.com/tmp/4.5.0-beta/ckeditor/samples/toolbarconfigurator/index.html#basic

Also see the docs: http://docs.ckeditor.com/#!/guide/dev_toolbar

CH
Christian86 Oct 28, 2015 09:14 +00:00 

Fine, Thanks

MN
Jul 31, 2015 07:04 +00:00

The CKEditor will be officially released in v2.1.0 due out shortly. It was included within the documentation application in v2.0.1 but the build feature was disabled and it was not included in the load all plugins" script. Therefore you should not be using this plugin until v2.1.0.

Customizing the toolbar will be done by including the the toolbar or toolbarGroups config attribute in the plugin attribute setting "CKEditor Config" e.g.

http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar

http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups

"toolbar": /**/[{
   name: "document",
   groups: ["mode"],
   items: ["Source"]
}, {
   name: "clipboard",
   groups: ["clipboard", "undo"],
   items: ["Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Undo", "Redo"]
}, {
   name: "paragraph",
   groups: ["list", "indent", "blocks", "align", "bidi"],
   items: ["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"]
}]/**/

By including this config you will override the Basic/Full CkEditor toolbar plugin attribute setting and customize the toolbar to your liking.

Note: the required PLJSON escaping above /**/JSON config/**/

0 comments

CH
Oct 28, 2015 06:17 +00:00

Hi

where do I find each button name specified? I couldnĀ“t find it in the documentation. Why do I have to definde "name" and "groups"?

Regards, Christian

0 comments

You must log in or sign up to post questions and answers.