Ehyiah / ux-quill

Bundle to use quill JS in symfony

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add custom module

gerritwitkamp opened this issue · comments

Hi, maybe I'm missing something; but how to add a custom module to the Quill editor?
As far as I can see in the Stimulus Controller I cannot add a module to the modules object.

The only way I managed is by a work-a-round; using Quill.find to find the instances and append the module backwards (in the onload event).

Hello,

Well, if you're talking about modules (like the toolbar or history modules (https://quilljs.com/docs/modules), indeed it's a missing feature, totally forget about them.

At the momet, you should probably try to override or extends the controller as for now nothing is possible inside the bundle configuration, but that can be of course a possible amelioration !

Will try to work on it ASAP.

@Ehyiah
Yeah right, I'm referring to the modules you mentioned. Would be a great addition to this bundle!

HI !
I Just published the 2.0.4 tag.

You will find a way to easily add/customize some modules in a PHP-only way (like History module).

Some modules are more complicated and need custom javascript code (like Clipboard and Keyboard) to decide what behavior you want in each cases.
So I implemented a way to easily extend default behavior like many other symfony UX bundles are doing.
I added exemples in the updated readme for this part.

Hope you will like it ! :-)

just need to release a 2.0.5 version as some files where not commited !
sorry for the inconvenience.

@Ehyiah is it by design that my custom data-controller is placed as attribute on the quill-container AND hidden input?