Changeset 942
- Timestamp:
- 01/26/08 00:07:41 (5 years ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
Xinha.css (modified) (1 diff)
-
plugins/Equation/equation.js (modified) (5 diffs)
-
plugins/Equation/popups/dialog.html (modified) (1 diff)
-
plugins/Equation/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xinha.css
r915 r942 71 71 .htmlarea .toolbar select:hover, 72 72 .htmlarea .toolbar select:active { 73 margin-top: 2px; 74 margin-bottom: 1px; 75 color: ButtonText; 76 height: 17px; 73 74 color: ButtonText; 75 height: 22px; 77 76 } 78 77 -
trunk/plugins/Equation/equation.js
r879 r942 74 74 Equation._pluginInfo = { 75 75 name : "ASCIIMathML Formula Editor", 76 version : "2. 2 (2007-08-17)",76 version : "2.3 (2008-01-26)", 77 77 developer : "Raimund Meyer", 78 developer_url : "http:// rheinaufCMS.de",78 developer_url : "http://xinha.raimundmeyer.de", 79 79 c_owner : "", 80 sponsor : " Rheinauf",81 sponsor_url : " http://rheinaufCMS.de",80 sponsor : "", 81 sponsor_url : "", 82 82 license : "GNU/LGPL" 83 83 }; … … 99 99 this.reParse = false; 100 100 } 101 }; 102 // avoid changing the formula in the editor 103 Equation.prototype.onKeyPress = function(ev) 104 { 101 105 if (!Xinha.is_ie) 102 106 { 107 e = this.editor; 103 108 var span = e._getFirstAncestor(e.getSelection(),['span']); 104 109 if ( span && span.className == "AM" ) 105 110 { 106 e.selectNodeContents(span); 107 } 108 } 109 }; 110 111 if ( 112 ev.keyCode == 8 || // delete 113 ev.keyCode == 46 ||// backspace 114 ev.charCode // all character keys 115 ) 116 { // stop event 117 Xinha._stopEvent(ev); 118 return true; 119 } 120 } 121 } 122 return false; 123 } 111 124 Equation.prototype.onModeChange = function( args ) 112 125 { … … 133 146 var node = spans[i]; 134 147 if (node.className != 'AM') continue; 148 if (node.innerHTML.indexOf(this.editor.cc) != -1) // avoid problems with source code position auxiliary character 149 { 150 node.innerHTML = node.innerHTML.replace(this.editor.cc,''); 151 node.parentNode.insertBefore(doc.createTextNode(this.editor.cc), node); 152 } 135 153 node.title = node.innerHTML; 136 AMprocessNode(node, false); 154 // FF3 strict source document policy: 155 // the span is taken from the editor document, processed in the plugin document, and put back in the editor 156 var clone = node.cloneNode(true); 157 try { 158 document.adoptNode(clone); 159 } catch (e) {} 160 AMprocessNode(clone, false); 161 try { 162 doc.adoptNode(clone); 163 } catch (e) {} 164 node.parentNode.replaceChild(clone, node); 137 165 } 138 166 } … … 167 195 args["editedNode"] = parent; 168 196 } 169 editor._popupDialog("plugin://Equation/dialog", function(params) {197 Dialog(_editor_url + "plugins/Equation/popups/dialog.html", function(params) { 170 198 self.insert(params); 171 199 }, args); … … 207 235 } 208 236 } 209 if (!Xinha.is_ie) AMprocessNode(this.editor._doc.body, false); 210 } 211 } 237 238 if (!Xinha.is_ie) this.parse();//AMprocessNode(this.editor._doc.body, false); 239 } 240 } -
trunk/plugins/Equation/popups/dialog.html
r879 r942 80 80 mathfontfamily = cfg.Equation.mathfontfamily; 81 81 82 translate(); 82 83 var inputField = document.getElementById("inputText"); 83 84 -
trunk/plugins/Equation/readme.txt
r677 r942 9 9 Usage 10 10 The formmulae are stored in their ASCII representation, so you have to include the 11 ASCIIMathML library which can be found in the plugin folder in order render the MathML output in your pages.11 ASCIIMathML library which can be found in the plugin folder in order to render the MathML output in your pages. 12 12 13 13 Example (also see example.html): … … 17 17 <script type="text/javascript" src="/xinha/plugins/AsciiMath/ASCIIMathML.js"></script> 18 18 19 20 19 The recommended browser for using this plugin is Mozilla/Firefox. At the moment showing the MathML output 21 20 inside the editor is not supported in Internet Explorer.
