evertsemeijn

Topic: Solved WYSIWYG?

I think I solved the WYSIWYG feature requests and want to know if it's working like it is supposed to be.

What I did is implement a new jQuery WYSIWYM plugin into the post function. See http://www.wymeditor.org/

Because of my average English I'm not going to explain it in detail.

What I did:

1) downloaded the plugin
2) created jquery.start.wymeditor.js containing "jQuery(function() {jQuery(".wymeditor").wymeditor();});"
3) uploaded all into the js folder
4) added "<script src="{$BASE_URL}js/wymeditor/wymeditor/jquery.wymeditor.pack.js"></script>" and "<script src="{$BASE_URL}js/wymeditor/wymeditor/jquery.start.wymeditor.js"></script>" to the HEAD
5) added "class=wymeditor" to the textarea in publish-write.tpl
6) added "class=wymupdate" to the submit button in publish-write.tpl
7) replaced "$GLOBALS[$variable] = $db->real_escape_string(strip_tags($value));" with "$GLOBALS[$variable] = $db->real_escape_string(strip_tags($value,'<a><strong><em><p><ul><li><ol><img>'));" in function.escape.php
8) checked to see that it worked
9) discovered that I forgot to remove the Textile link smile

You can tweak it by changing the allowed html tags and by changing the WYM-editor.

Let me know if it works with you guys and girls!

Last edited by evertsemeijn (2008-11-16 14:57:55)

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes