Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 4, 2021

Conversation

nzmattman
Copy link
Contributor

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

  • Created the callback function
  • Adjusted the HTML build process to check for the function type and inject that HTML, otherwise use the standard HTML markup
  • adjusted the validation rules to target new markup

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

  • changed to use flexbox over absolute positioning
  • added styling support for select lists and textareas (rather than just input fields)

@Alex-D
Copy link
Owner

Alex-D commented Jun 30, 2021

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?

src/trumbowyg.js Outdated Show resolved Hide resolved
src/trumbowyg.js Show resolved Hide resolved
src/ui/sass/trumbowyg.scss Show resolved Hide resolved
@nzmattman
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Owner

Alex-D commented Jul 1, 2021

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

@Alex-D Alex-D merged commit 8a45f65 into Alex-D:develop Jul 4, 2021
@Alex-D
Copy link
Owner

Alex-D commented Jul 4, 2021

Thank you for this PR :)

@Alex-D
Copy link
Owner

Alex-D commented Jul 4, 2021

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

@nzmattman
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants