Okay
  Public Ticket #1130349
wysihtml5
Closed

Comments

  •  2
    ruben started the conversation

    Having issue adding multiple wysihtml5 on a page.

    <textarea class="form-control wysihtml5" data-stylesheet-url="/css/bootstrap-wysihtml5-color.css" rows="20" name="one" id="one"></textarea>

    <textarea class="form-control wysihtml5" data-stylesheet-url="/css/bootstrap-wysihtml5-color.css" rows="20" name="two" id="two"></textarea>

    2 toolbar appear on each one.

  • [deleted] replied

    Hi Ruben,

    I saw this is an error in our theme so to fix it just replace neon-custom.js:

    Download this file and replace it in this directory (of the theme): /assets/js

    On line 1173 change ".wysihtml5" to el:

    // Wysiwyg Editor
    if($.isFunction($.fn.wysihtml5))
    {
        $(".wysihtml5").each(function(i, el)
        {
            var $this = $(el),
                stylesheets = attrDefault($this, 'stylesheet-url', '')
            $(".wysihtml5").wysihtml5({
                stylesheets: stylesheets.split(',')
            });
        });
    }

    Like shown below:

    // Wysiwyg Editor
    if($.isFunction($.fn.wysihtml5))
    {
        $(".wysihtml5").each(function(i, el)
        {
            var $this = $(el),
                stylesheets = attrDefault($this, 'stylesheet-url', '')
            $( el ).wysihtml5({
                stylesheets: stylesheets.split(',')
            });
        });
    }

    This should work for you.

  •  2
    ruben replied

    Thank you so much! This fixed my issue. I replaced all html assets/js in the entire theme. I hope that is what you mean?

    I tried it for the dashboard and it worked perfectly, thank you!.

  • [deleted] replied

    Hi Ruben,

    Yes that is just fine. That code was to explain how this works.

    I am glad that it worked for you. Have a great day there