Multiple instances #52
Comments
Hi |
you can pass an option for the toolbar selector. By default, wysiwyg widget will use the data-role selector, but you can override it to bind to any JQuery selector (even IDs). So to prevent multiple instances to bind to all the toolbars, give toolbars IDs and pass different selectors into different instances. See line 192 of https://github.com/mindmup/bootstrap-wysiwyg/blob/master/bootstrap-wysiwyg.js |
Hi |
Hi @chrisharrison, @nossai, and @wenjie711, If you still haven't figured out how to do this, this is something that you might want to do:
and change your btn toolbar into:
|
Thank you for the explanation, guys. Is there a method to dynamically change options of the wysiwyg? |
Thanks for the example. |
Thanks! |
Thanks @makusu !! |
thanks guy! |
@makusu how would you do that if you were cloning elements and want to have WYSIWYG enabled on each clone node? |
@magicalbanana Sorry for late reply. Busy these days. You basically need to have 2 different IDs for each of the WYSIWYG element. Please take it with a pinch of salt since my comment was well over 3 years ago. |
If you have a bunch of divs on the page with the same class ( .rte for instance), and apply the
.wysiwyg
method to them, they work perfectly with the hotkeys but the buttons don't work.If however, you apply a div to each one ( #rte1 #rte2 etc) it does work. This is OK, and for me I can easily do that programmatically in the flow of my application. But it's not standard and caused a little bit of confusion for me, and perhaps a lot of hair pulling for others.
The text was updated successfully, but these errors were encountered: