Assign an CSS ID/class to bootstrap modal

Assign an CSS ID/class to bootstrap modal

jammybjammyb Posts: 12Questions: 3Answers: 0

I need to set the width for Editor modals (using bootstrap styling). This means I need to target the div.modal-dialog element, but if I create a css class for just ".modal-dialog" then I'm going to change the width of every bootstrap modal in my application.

Does/can Editor apply a DTE specific class or ID to that dom element so I can specify the modal width for only Editor modals?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,741Questions: 1Answers: 10,111 Site admin
    Answer ✓

    It doesn't I'm afraid. There is currently no way to uniquely target Editor's Bootstrap modal with CSS (that is an oversight!).

    At the moment you'd need to modify the editor.bootstrap.js file to add that - line 111: '<div class="modal fade">'.

    Allan

  • jammybjammyb Posts: 12Questions: 3Answers: 0

    Hi allan

    Thanks - I'd looked at the source and figured as much, but hoped there was some magical extra code I could utilise! :D

    Maybe a future feature request?

  • allanallan Posts: 61,741Questions: 1Answers: 10,111 Site admin

    Absolutely! I should have said that - sorry. When I read your post earlier I added it to my bug tracker. Will be in the next release (that might be 1.6.0, or 1.5.7 - depends if there are any bugs found in 1.5!).

    Allan

  • jammybjammyb Posts: 12Questions: 3Answers: 0

    Thanks allan!

This discussion has been closed.