Opened 7 years ago

Closed 6 years ago

# Keep CKEditor out of egg; suggestion of different approach

Reported by: Owned by: Franz Itamar Ostricher normal CkEditorPlugin normal 0.12

### Description

The idea of having a full wysiwyg editor was also a must in our company. And furthermore the ability of spell checking, which CKEditor provide, was a must have.

In my environment, the plugin didn't work - the CKEditor wasn't shown.

I had a different approach and wanted to share it with you. Since I haven't committed anything yet to trac or tac-hacks and I am quite new to python, I would like to share it through a Zip-File. In the attached Zip-File I have different small things programmed, but the HtmlContent is kind of a different implementation of the CKEditorPlugin. I would suggest to keep CKEditor itself out of the plugin-egg, since you would like to change the version (because of bugfixes or similiar) or the CKEditor configuration. Therefore a link to the Editor should be parametrizable (as in my attached Component is already).

The bad thing of the attached plugin is, that you need to change the file ticket_box.html (see documentation inside HtmlContent). I tried to copy it to [trac-environment]/templates, but I couldn't get it to work (see commented code above HtmlContent).

If you like, have a look at my code and feel free to make comments. I would be glad, if you could revise the code or have some ideas to make it smoother.

### Changed 7 years ago by Franz

Zip file containing source code of different approach

### comment:1 follow-up:  2 Changed 7 years ago by Itamar Ostricher

thanks for the feedback!

as stated in the wiki page of the plugin, it is very alpha-stage and is quite limited as such, although I'm not sure why it didn't show up for you.

at the moment I'm on hold with this plugin, as the guys from CKEditor itself informed me they are working on a wiki-rendering-engine for CKEditor, so I'm waiting to see what comes out of their door before doing anything extra.

regarding your idea to keep the editor itself outside of the egg - I'm not sure (as a plugin user) it is desirable, since it requires extra configuration, and gives "too much freedom" to the user (for example - the user can choose whatever version of the editor she wants, but no one assures her that all versions are supported).

I'd think that the plugin would release versions with updated editors as they come out, including possible adjustments so it works as expected.

### comment:2 in reply to:  1 ; follow-up:  5 Changed 7 years ago by anonymous

at the moment I'm on hold with this plugin, as the guys from CKEditor itself informed me they are working on a wiki-rendering-engine for CKEditor, so I'm waiting to see what comes out of their door before doing anything extra.

Ah, very interesting - do you know when this is to be landed? Is there any schedule or roadmap?

regarding your idea to keep the editor itself outside of the egg - I'm not sure (as a plugin user) it is desirable, since it requires extra configuration, and gives "too much freedom" to the user (for example - the user can choose whatever version of the editor she wants, but no one assures her that all versions are supported).

Well in my opinion it's not about the user, but the administrator, which changes the version of a CKEditor; so the administrator could immediately change the version, if there is a critical bugfix and don't have to wait until the plugin is updated (and don't have to update the plugin itself). Furthermore you might change some settings in CKEditor (as the toolbar, etc.) - how would you do this if it inside the egg?

### comment:3 follow-up:  6 Changed 6 years ago by Franz

How is the status quo of the CKEditor for Trac? I only found a forum entry in CKEditor-Forum (http://cksource.com/forums/viewtopic.php?f=11&t=21466&hilit=trac+wiki)

Is there any (extension) project for that?

### comment:4 Changed 6 years ago by Adrian Fritz

+1. Also interested on this. Count on me to test, document.

### comment:5 in reply to:  2 Changed 6 years ago by Itamar Ostricher

at the moment I'm on hold with this plugin, as the guys from CKEditor itself informed me they are working on a wiki-rendering-engine for CKEditor, so I'm waiting to see what comes out of their door before doing anything extra.

Ah, very interesting - do you know when this is to be landed? Is there any schedule or roadmap?

Actually - I just got an update from the CKEditor guys that version 3.6 will not include the wiki-plugin, but will include a plugin for BBCode (see https://svn.ckeditor.com/CKEditor/branches/versions/3.6.x/).

It seems feasible to create a CKEditor-wiki-plugin based on the BBCode-plugin and integrate it into Trac, and I'm looking into doing just that.

Disclaimer: my spare time and lack of javascript-experience might hinder this effort somewhat. (help appreciated!)

regarding your idea to keep the editor itself outside of the egg - I'm not sure (as a plugin user) it is desirable, since it requires extra configuration, and gives "too much freedom" to the user (for example - the user can choose whatever version of the editor she wants, but no one assures her that all versions are supported).

Well in my opinion it's not about the user, but the administrator, which changes the version of a CKEditor; so the administrator could immediately change the version, if there is a critical bugfix and don't have to wait until the plugin is updated (and don't have to update the plugin itself). Furthermore you might change some settings in CKEditor (as the toolbar, etc.) - how would you do this if it inside the egg?

Good point, though a problem remains, assuming the CKEditor itself requires adjustments for the Trac-integration, the administrator will need to apply those adjustments (probably using patches) if she chooses to change the CKEditor version.

Regarding the settings and configuration - I agree completely.

### comment:6 in reply to:  3 Changed 6 years ago by Itamar Ostricher

How is the status quo of the CKEditor for Trac? I only found a forum entry in CKEditor-Forum (http://cksource.com/forums/viewtopic.php?f=11&t=21466&hilit=trac+wiki)

Is there any (extension) project for that?

See the last comment regarding the status.

The quoted forum post is by a colleague of mine who actually did the work of integrating the CKEditor into Trac (although currently he is not working on it). It was the trigger to my correspondence with the CKEditor team, and this plugin is the project for that.

### comment:7 Changed 6 years ago by Franz

I created a new Plugin page of my source code: TicketNavPlugin; the relevant Component is HtmlContent. Feel free to have a look and copy snippets. Hope it helps.

### comment:8 Changed 6 years ago by Itamar Ostricher

Resolution: → fixed new → closed

Version 1.0dev (just uploaded to trunk) implements the approach where the CKEditor is separate from the plugin (no need to replace templates, custom ckeditor-plugin for trac-wiki-conversions registered as an external plugin).

Thanks for the ideas and feedback!

### Modify Ticket

Change Properties