Modify

Opened 4 years ago

Closed 4 years ago

#8586 closed enhancement (fixed)

Keep CKEditor out of egg; suggestion of different approach

Reported by: Franz Owned by: itamarost
Priority: normal Component: CkEditorPlugin
Severity: normal Keywords:
Cc: Trac Release: 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.

Attachments (1)

GS_TicketNav.zip (42.8 KB) - added by Franz 4 years ago.
Zip file containing source code of different approach

Download all attachments as: .zip

Change History (9)

Changed 4 years ago by Franz

Zip file containing source code of different approach

comment:1 follow-up: Changed 4 years ago by itamarost

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: Changed 4 years ago by anonymous

Replying to itamarost:

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: Changed 4 years ago by framay

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 4 years ago by AdrianFritz

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

comment:5 in reply to: ↑ 2 Changed 4 years ago by itamarost

Replying to anonymous:

Replying to itamarost:

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 4 years ago by itamarost

Replying to framay:

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 4 years ago by framay

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 4 years ago by itamarost

  • Resolution set to fixed
  • Status changed from new to 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!

Add Comment

Modify Ticket

Action
as closed The owner will remain itamarost.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.