Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
4.02k stars 614 forks source link

feat: add custom field types to open modal insert #1228

Closed nzmattman closed 3 years ago

nzmattman commented 3 years ago

I have added an option for creating custom HTML form types by using a call back function as the type.

I have also adjusted the modal css to allow for this integration to work better;

Alex-D commented 3 years ago

This idea is brilliant! :)

But, I can't merge this since it's full of breaking changes :(

Trumbowyg 2 partially supports IE11, with this, it will completely break the support of all old browsers, which means that I need to push that in a new major version...

Can we make that work without flexbox, and without ES2015+ things?

nzmattman commented 3 years ago

Ahh right, bloody IE!

Yip, I will change it to not use flexbox. I haven't had to code anything for IE11 for a long time, but will do

nzmattman commented 3 years ago

Ok, I have done a few updates for this.

I am not really happy with how the example in the docs looks, but the general code is there

Alex-D commented 3 years ago

I will check that in old browsers in the next few days, thank you for your reactivity! :)

Alex-D commented 3 years ago

Thank you for this PR :)

Alex-D commented 3 years ago

I've fixed some bugs on the develop branch directly :)

nzmattman commented 3 years ago

You are a champion, thanks Alex. I didn't have time on Friday to look at this and was going to fix up the small things today.