So as we all know the new editor is here and a lot of scripts relating to the old editor no longer work with it.
Well this small fix should allow most (not necessarily all) of your old scripts to continue working as they should. I know this will fix most of Avacwebs codes relating to the old editor.
Simply put this in a Javascript page and tick "In all Pages":
This code should fix things, by keeping the old textarea up to date, and so allowing scripts that check the old textarea to continue working.
If you also want to remove the WYSIWYG mode (since it can cause a lot of stress when using the editor) then make these adjustments to the code above.
After this line: [ic]sc ? sc.bind('keypress', sc.updateOriginal) : setTimeout(fix_it, 200);[/ic] add this: [ic]$('.sceditor-button-source', ta.nextSibling).remove();[/ic]
And right at the start before everything else add this: [ic]my_setcookie('WYSIWYG_STATE', 0, true);[/ic]
Then you've fixed the editor and got rid of the WYSIWYG mode.
Hope that helps fix some of your issues
Well this small fix should allow most (not necessarily all) of your old scripts to continue working as they should. I know this will fix most of Avacwebs codes relating to the old editor.
Simply put this in a Javascript page and tick "In all Pages":
- Code:
[panda=js]$(function() {
var ta = document.getElementById('text_editor_textarea');
if(ta && document.post) {
var fix_it = function() {
var sc = $(ta).data('sceditor');
sc ? sc.bind('keypress', sc.updateOriginal).blur(sc.updateOriginal) : setTimeout(fix_it, 200);
};
fix_it();
}
});
This code should fix things, by keeping the old textarea up to date, and so allowing scripts that check the old textarea to continue working.
If you also want to remove the WYSIWYG mode (since it can cause a lot of stress when using the editor) then make these adjustments to the code above.
After this line: [ic]sc ? sc.bind('keypress', sc.updateOriginal) : setTimeout(fix_it, 200);[/ic] add this: [ic]$('.sceditor-button-source', ta.nextSibling).remove();[/ic]
And right at the start before everything else add this: [ic]my_setcookie('WYSIWYG_STATE', 0, true);[/ic]
Then you've fixed the editor and got rid of the WYSIWYG mode.
Hope that helps fix some of your issues