Editor: add ID to Bootstrap modal for size change
Editor: add ID to Bootstrap modal for size change
I'm wondering if it's possible to add some ID to Editor Bootstrap modal, so I can change modal size? I need this since I have a table in my other modal and then within that modal I would launch Editor Bootstrap modal. This means I need some ID,since I can't use Class.
I've Googled for some time on only found this discussion however I can't find the line in editor.bootstrap.js
I'd be happy for any hint. Thank you!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you using Bootstrap 3 or 4?
In both cases the integration JS file contains
'<div class="modal fade">'+
(line 129 in both cases for the current release).Allan
@allan I'm using Bootstrap 3.
I found the line in this file, however it's #71.
b._dom.content = c('<div class="modal fade"><div class="modal-dialog"><div class="modal-content"/></div></div>');
Is that the one or I should be looking in different file?
@allan, I think I figured it out and resized my modal by adding ID in the line above. Thank you!
Yes that's the one. That's the minimised file, which is a little harder to edit, but it can be done!
Allan
https://jsfiddle.net/aq9Laaew/21132/
Check this out Allan, maybe is time to give more op views to that monotone editor, my unexperienced teammates will like it. Have good day.
@PetterDaniels - Thanks for your reply, although I must confess I'm not clear on how it relates to the original discussion of making the Bootstrap modal wider?
Allan
Hey @allan - its cause modal designs (size, color, etc) works with classes:
https://getbootstrap.com/docs/4.1/components/modal/#optional-sizes
If we are able to add custom layout for modal (maybe inside editor params) like u can do with "dom" of datatables maybe makes ppl life bit more easy.
If you want to use a custom modal for the Editor view, you can do so using a display controller plug-in. The display controller used for the form is then controlled by the
display
option.Allan