Changeset 654
- Timestamp:
- 04/10/10 15:04:13 (2 years ago)
- Location:
- trunk/src/wymeditor
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wymeditor/jquery.wymeditor.explorer.js
r648 r654 193 193 }; 194 194 195 WYMeditor.WymClassExplorer.prototype.setFocusToNode = function(node) { 196 var range = this._doc.selection.createRange(); 195 WYMeditor.WymClassExplorer.prototype.setFocusToNode = function(node, toStart) { 196 var range = this._doc.selection.createRange(); 197 toStart = toStart ? true : false; 198 197 199 range.moveToElementText(node); 198 range.collapse(false); 199 range.move('character',-1); 200 range.collapse(toStart); 200 201 range.select(); 201 202 node.focus(); -
trunk/src/wymeditor/jquery.wymeditor.js
r653 r654 1270 1270 }; 1271 1271 1272 WYMeditor.editor.prototype.setFocusToNode = function(node, toStart) { 1273 var range = this._doc.createRange(), 1274 selection = this._iframe.contentWindow.getSelection(); 1275 toStart = toStart ? 0 : 1; 1276 1277 range.selectNodeContents(node); 1278 selection.addRange(range); 1279 selection.collapse(node, toStart); 1280 this._iframe.contentWindow.focus(); 1281 }; 1282 1272 1283 WYMeditor.editor.prototype.addCssRules = function(doc, aCss) { 1273 1284 var styles = doc.styleSheets[0]; -
trunk/src/wymeditor/jquery.wymeditor.mozilla.js
r650 r654 249 249 }; 250 250 251 WYMeditor.WymClassMozilla.prototype.setFocusToNode = function(node) {252 var range = document.createRange();253 range.selectNode(node);254 var selected = this._iframe.contentWindow.getSelection();255 selected.addRange(range);256 selected.collapse(node, node.childNodes.length);257 this._iframe.contentWindow.focus();258 };259 260 251 WYMeditor.WymClassMozilla.prototype.openBlockTag = function(tag, attributes) 261 252 { -
trunk/src/wymeditor/jquery.wymeditor.opera.js
r648 r654 118 118 wym._selected_image = null; 119 119 }; 120 121 // TODO: implement me122 WYMeditor.WymClassOpera.prototype.setFocusToNode = function(node) {123 124 };125 -
trunk/src/wymeditor/jquery.wymeditor.safari.js
r648 r654 217 217 }; 218 218 219 WYMeditor.WymClassSafari.prototype.setFocusToNode = function(node) {220 var range = this._iframe.contentDocument.createRange();221 range.selectNode(node);222 var selected = this._iframe.contentWindow.getSelection();223 selected.addRange(range);224 selected.collapse(node, node.childNodes.length);225 this._iframe.contentWindow.focus();226 };227 228 219 WYMeditor.WymClassSafari.prototype.openBlockTag = function(tag, attributes) 229 220 {
Note: See TracChangeset
for help on using the changeset viewer.