19 include_once($ROOT_PATH.
'wysiwyg_plugin.inc');
45 wysiwyg_plugin::wysiwyg_plugin($wysiwyg);
46 $this->_add_button(
'visual_aid',
'Visual_Aid',
'Visual Aid',
'false',
'61');
62 <script type=
"text/javascript" src=
"<?php echo sq_web_path('fudge').'/wysiwyg/plugins/visual_aid/visual-aid.js' ?>"></script>
63 <script type=
"text/javascript" language=
"Javascript">
64 var visual_aid_image_path =
"<?php echo sq_web_path('fudge') ?>/wysiwyg/plugins/visual_aid/images";
65 var visual_aid_mode =
false;
67 HTMLArea.prototype._visualAidToggle =
function(target, change_mode) {
70 if (target.length == 1 && target[0] ==
"all") {
71 var tag_types = visual_aid_types;
73 var tag_types = target;
77 var elements = Array();
78 if (HTMLArea.is_gecko) {
79 for (var i = 0; i < tag_types.length; i++) {
80 elements[tag_types[i]] = this._doc.getElementsByTagName(tag_types[i]);
82 }
else if (HTMLArea.is_ie) {
83 for (var i = 0; i < tag_types.length; i++) {
84 elements[tag_types[i]] = this._docContent.getElementsByTagName(tag_types[i]);
87 for (var tag in elements) {
88 if (elements[tag].length > 0) {
89 for (var j = 0; j < elements[tag].length; j++) {
91 var obj =
new visual_aid_factory(tag, elements[tag][j], editor);
92 if (visual_aid_mode) {
101 visual_aid_mode = !visual_aid_mode;
120 var target =
new Array(
"all");
121 this._visualAidToggle(target,
true);
138 if (visual_aid_mode) {
139 var target =
new Array(
"all");
140 this._visualAidToggle(target,
true);
157 var target =
new Array(
"all");
158 this._visualAidToggle(target,
true);
159 HTMLArea._stopEvent(ev);