Editor: add ID to Bootstrap modal for size change

Editor: add ID to Bootstrap modal for size change

matissgmatissg Posts: 63Questions: 15Answers: 0

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

Answers

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Answer ✓

    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

  • matissgmatissg Posts: 63Questions: 15Answers: 0

    @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?

  • matissgmatissg Posts: 63Questions: 15Answers: 0

    @allan, I think I figured it out and resized my modal by adding ID in the line above. Thank you!

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    Yes that's the one. That's the minimised file, which is a little harder to edit, but it can be done!

    Allan

  • PetterDanielsPetterDaniels Posts: 2Questions: 0Answers: 0

    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. :smile: Have good day.

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    @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

  • PetterDanielsPetterDaniels Posts: 2Questions: 0Answers: 0

    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.

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    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

This discussion has been closed.