eclipse / nebula

Nebula Project
https://eclipse.org/nebula
Eclipse Public License 2.0
85 stars 98 forks source link

Update rich text editor to use CKEditor 5 and add a way to replace CKEditor with a customized version #610

Open travkin79 opened 4 weeks ago

travkin79 commented 4 weeks ago

It would be nice if the CKEditor version used in Nebula's richt text editor (RTE) would be updated to the latest CKEditor version (latest version today is 5.x, the version used in Nebula seems to be 4.12.1). Updating the RTE widget to using the latest CKEditor 5 API would allow for using the latest features or even for generating a customized CKEditor 5 version that could be used with the RTE. Maybe it would be an even better idea to extract the CKEditor JavaScript code to a separate, replaceable Eclipse feature (maybe provided through an extension point) in order to explicitly offer an option to generate a customized CKEditor 5.

I'm not sure if the CKEditor 5 license did change compared to version 4 or if some of the features from version 4 have to be payed for in version 5.

fipro78 commented 4 weeks ago

The license has changed to GPL2+.

https://support.ckeditor.com/hc/en-us/articles/115002539665-Can-I-include-Open-Source-CKEditor-in-a-commercial-environment#:~:text=You%20can%20modify%2C%20integrate%20and,the%20terms%20of%20GPL%202%2B.

And from my knowledge this is not compatible with the EPLv2. Therefore an update to ckeditor 5 is not possible.

laeubi commented 4 weeks ago

And from my knowledge this is not compatible with the EPLv2. Therefore an update to ckeditor 5 is not possible.

I think that's a question for the EMO but in general EPLv2 with secondary license is compatible as far as I know but you will require permission from all contributors: https://www.eclipse.org/legal/epl-2.0/faq/#h.cktcxkzh8ks4

Beside from that, if rich text editor could be made to work with version 4.x and 5.x e.g. using fragments that swap in the code, it would be possible to maintain 4.x as before and allow a user (or software product) to exchange it with 5.x version (e.g. such fragment can live in an own GPL versioned repository).

travkin79 commented 4 weeks ago

Interesting. It seems, making the CKEditor code replaceable is the most promising option. The license question remains open, of. course.

My original intent was to use the RTE from Nebula project, but replace its CKEditor with my own version, customized for editing Markdown code (trimmed for a custom Markdown dialect). For the case that the license question cannot be answered soon, do you see some other option of implementing a WYSIWYG-Markdown editor with open source software?

(I didn't find a CKEditor 4 generator. If that one would exist, I'd create a customized CKEditor 4 version for Markdown that I could use to replace the CKEditor in RTE.)

fipro78 commented 4 weeks ago

The license topic is not a trivial one. Despite the fact that all committers would need to accept the dual licensing, it would also mean that products that are using the RTE with ckeditor 5 would become automatically GPL2. And I am not sure if this is really a desirable state.

From the FAQ

For example, content that is licensed under the EPL-2.0 with a GPL-2.0 Secondary License can be combined with content that is licensed under the GPL-2.0, and then distributed as combined work under the GPL-2.0.

The fragment option could be possible. But I am not sure how much API changed from ckeditor 4 to 5. And how much rework it would mean in the BrowserFunctions etc. It could lead to a re-implementation of the RTE. And because of the licensing stuff probably of limited use. But yes, would be a question for the Eclipse Legal Team.

I am not aware of any open source markdown wysiwyg editor. I typically use VS Code and use a preview window to see what I have done. That is also how you edit markdown in GitHub.