Open andrews05 opened 7 years ago
I'll check into the cleanHtml question.
As for the problem with the activeToolbarClass you should be able to do the following:
$('#editor').wysiwyg({
activeToolbarClass: 'active'
});
Yup, I know I can pass in the options to the function but setting the defaults can be helpful so I don't have to keep passing in the same options everywhere I want to use it.
Hrm, @andrews05 is it every time? This could be a bug with the way it cleans.
Hi @steveathon, I'm not quite sure what you're asking. The problem is the cleanHtml function doesn't appear to exist anymore, or at least it isn't callable in the way that it was before.
I'm facing the same problem.
In the previous version, cleanHtml was added as a jQuery function ($.fn.cleanHtml = ...). In version 2, it appears to be a function of the Wysiwyg object which isn't accessible from outside the plugin. I'd suggest either turning it back into a jQuery function, or allow it to be called in the form of $('#myeditor').wysiwyg('cleanHtml').
I'll also note that the $.fn.wysiwyg function currently doesn't return anything, meaning it can't be chained like most jQuery functions.
Thanks everyone,
As @andrews05 points out this is a problem with the way this has been implemented. We should make this directly callable. Likewise, I've opened another request for the jQuery chaining. #112
I've been using an older version of the plugin and am just looking at updating to the current OOP version but can't figure out how to run the cleanHtml function. Calling
$('#editor').cleanHtml()
doesn't work anymore.I also can't set the defaults the same way I could before, e.g.
$.fn.wysiwyg.defaults.activeToolbarClass = 'active'
.