简体   繁体   中英

How Can I initialize multiple wysihtml5 editor on same page?

When I initialize bootstrap-wysihtml5 with class name it will only initialize first one and rest of the remain normal text-area

Is there any way to handle it

<script>
      $(document).ready(function() {
      $('.vid_description').wysihtml5();
    });
</script>

I guess, the method wysihtml5() is only called for the first element.

Iterate over all elements and call the initialization method for each element separately:

$('.vid_description').each(function() {
    $(this).wysihtml5();
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM