Changeset 13257
- Timestamp:
- 04/01/08 15:07:18 (8 months ago)
- Location:
- dijit/trunk/_editor
- Files:
-
- 2 modified
-
plugins/EnterKeyHandling.js (modified) (3 diffs)
-
RichText.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/_editor/plugins/EnterKeyHandling.js
r12207 r13257 55 55 if(!dojo.withGlobal(this.editor.window, 'hasAncestorElement', dijit._editor.selection, ['LI'])){ 56 56 //circulate the undo detection code by calling RichText::execCommand directly 57 dijit._editor.RichText.prototype.execCommand. apply(this.editor, ['formatblock',this.blockNodeForEnter]);57 dijit._editor.RichText.prototype.execCommand.call(this.editor, 'formatblock',this.blockNodeForEnter); 58 58 //set the innerHTML of the new block node 59 59 var block = dojo.withGlobal(this.editor.window, 'getAncestorElement', dijit._editor.selection, [this.blockNodeForEnter]); … … 78 78 } 79 79 this._checkListLater = false; 80 }else if(this._pressedEnterInBlock){ 80 } 81 if(this._pressedEnterInBlock){ 81 82 //the new created is the original current P, so we have previousSibling below 82 83 this.removeTrailingBr(this._pressedEnterInBlock.previousSibling); … … 135 136 136 137 if((this._checkListLater = (block.blockNode && block.blockNode.tagName == 'LI'))){ 138 if(dojo.isMoz){ 139 //press enter in middle of P may leave a trailing <br/>, let's remove it later 140 this._pressedEnterInBlock = block.blockNode; 141 } 137 142 return true; 138 143 } -
dijit/trunk/_editor/RichText.js
r13156 r13257 1419 1419 }, 1420 1420 1421 _srcInImgRegex : /(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi ,1422 _hrefInARegex : /(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi ,1423 1424 1421 _preFixUrlAttributes: function(/* String */ html){ 1425 return html.replace(this._hrefInARegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') 1426 .replace(this._srcInImgRegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2'); // String 1422 return html.replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi, 1423 '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') 1424 .replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi, 1425 '$1$4$2$3$5$2 _djrealurl=$2$3$5$2'); // String 1427 1426 } 1428 1427 });