Suneditor: Can you modularize sun editor to reduce file size?

Created on 24 Nov 2017  路  8Comments  路  Source: JiHong88/SunEditor

This editor looks promising but I wanted to make a few suggestions
Modularize each of the heavyweight functions such as
file upload, image etc into seperate files that way we can include only the functions we want
Alot of the html embeded in javascript increases the file size for functionality we might not use

Most helpful comment

I had something similar in mind: I would like the editor to be more open and generic, modularity being then a side-benefit.

Example use case: when a user click to add an image, I would like to open my own dialog (linked to a specific stock repository). In other words I would need somehow to replace the default context.dialog.image and have a clear view on what inputs/outputs I have to handle.

All those dialogs which add new content are then just modules / plug-ins to support specific content types (images, videos, calendar, whatever!).

@JiHong88 are you planning to ship modularization in the coming days? If yes and if you are interested, I would then fork and send you a pull request.

(@drnkwati I also find this editor great --did a pretty exhaustive survey of editors a few months ago--, I am surprised that it does not get more stars)

All 8 comments

Thanks for the advice.
I agree with your suggestion.
I will proceed with modularization.

I had something similar in mind: I would like the editor to be more open and generic, modularity being then a side-benefit.

Example use case: when a user click to add an image, I would like to open my own dialog (linked to a specific stock repository). In other words I would need somehow to replace the default context.dialog.image and have a clear view on what inputs/outputs I have to handle.

All those dialogs which add new content are then just modules / plug-ins to support specific content types (images, videos, calendar, whatever!).

@JiHong88 are you planning to ship modularization in the coming days? If yes and if you are interested, I would then fork and send you a pull request.

(@drnkwati I also find this editor great --did a pretty exhaustive survey of editors a few months ago--, I am surprised that it does not get more stars)

@geonanorch Thanks for thinking good about suneditor.
I agreed your opinion, it is good idea!
I`m going to ship modularization as soon as possible.

Hi @drnkwati , @geonanorch
Modularization is complete.
I added customization and document menu to the sample and demo site.

Nice work man. I will check it tomorrow.
But I just noticed the examples on the main site are not working properly.
http://suneditor.com/sample/html/index.html
The font, format and drop downs specifically are not working.
Please can you investigate the issue
thanks

The bug has been fixed.
thanks :)

Thank you @JiHong88, I'm sure that it meant quite a bit of work...
Can't look into it right now, but I will let you know once I get there.

yup, thanks @geonanorch :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

setesolutions picture setesolutions  路  7Comments

vn516726 picture vn516726  路  3Comments

Saeeed-B picture Saeeed-B  路  7Comments

David-Grass-Feria picture David-Grass-Feria  路  6Comments

drnkwati picture drnkwati  路  6Comments