Different size editor modals

Different size editor modals

advaniaadvania Posts: 35Questions: 13Answers: 0

Hi guys,

I have multiple tables on same page using tabs and I need to change the width of editor modals for some tabs. The best way to change width I have found is using "modal-content" class (as it doesn't properly inherit width from children as far as my tests have shown) but changing it globally affects all modals. so I'm wondering if I should target the editor modal form ID and then look for it's next parent "modal-content" class.. or maybe I can put an ID on the modal-content div somehow?

would love some suggestion on how to solve this.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin
    Answer ✓

    The "trick" here is that all of the Editor instances share the same modal at the moment. Bootstrap only allows a single modal to be shown at a time, so I thought I'd just reuse the same one for efficiency.

    So what you probably need to do here is listen for the open event on a per Editor instance basis (i.e. have a listener for each new ...Editor) and set the width of the modal there for that instance.

    Allan

  • advaniaadvania Posts: 35Questions: 13Answers: 0

    Yeah, thanks for that Allan :) i did that and it worked fine, just had to reset size again on preClose event to prevent all other windows to retain same size until page refreshed.

This discussion has been closed.