CKEditor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CKEditor

Defero
Hi!

I'm trying to implement the CKEditor into my qx project.
I'm using the project from contrib that Derrell made, thank you for that.

Now i'm trying to implement the latest build (no special reason for that really). But because i need to change some of the original plugins from the ckeditor, i downloaded ckeditor-dev and builded my own ckeditor.js.

After many problems with this i came to a problem that i can't find a way to resolve.
Here's my problem:
All the native CK commands are available but for some reason the "bold", "italic" etc commands are in a state=0
That means, if i'm correct, that they are disabled.

Undo, Redo are at a state=2, which is enables and off (not in use at the moment)

I tried simply enable them before i call them, with no luck. I tried to "ignore" the checks in the ckeditor and just execute them, but again with no luck. This lead me to belive that there is something overall wrong.

I hope someone can help with this one with an idea where to look.

Thanks,
Defero
Reply | Threaded
Open this post in threaded view
|

Re: CKEditor

Defero
Ok,

noticed something extra. If i call the command.enable(). The editor check command.checkAllowed() -> this looks at the editor.activeFilter.

So i looked inside and i found that there are only 14 or so plugins in there. No bold, or italic.
Reply | Threaded
Open this post in threaded view
|

Re: CKEditor

Defero
Ok, i'm a bit ashamed to post the solution after the amount of time i spent on it

I don't know where these filters are being set but if you add in the CKEDITOR.replace of the Ckeditor.js project this line:
allowedContent : true


Here is my whole ckeditor instance:

        this.__ckEditor = CKEDITOR.replace(
          el,
          {
            height: hint.height - 4, // leave room for focus border
            //width: hint.width,
            resize_enabled: false,
            tabIndex: this.getTabIndex(),
            skin: "kama",
            toolbar : [],
            allowedContent : true
          });


When allowedContent is set to true it says to the editor to disable the filters, so all commands are available.