Changeset 1051
- Timestamp:
- 10/03/08 19:03:48 (5 years ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
XinhaCore.js (modified) (1 diff)
-
modules/Gecko/Gecko.js (modified) (3 diffs)
-
modules/InternetExplorer/InternetExplorer.js (modified) (2 diffs)
-
modules/Opera/Opera.js (modified) (1 diff)
-
modules/WebKit/WebKit.js (modified) (3 diffs)
-
plugins/InsertSnippet2/readme.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r1047 r1051 4939 4939 if ( this.config.sevenBitClean ) 4940 4940 { 4941 html = html.replace(/[^ -~\r\n\t]/g, function(c) { return '&#'+c.charCodeAt(0)+';'; });4942 } 4943 4941 html = html.replace(/[^ -~\r\n\t]/g, function(c) { return (c != Xinha.cc) ? '&#'+c.charCodeAt(0)+';' : c; }); 4942 } 4943 4944 4944 //prevent execution of JavaScript (Ticket #685) 4945 4945 html = html.replace(/(<script[^>]*((type=[\"\']text\/)|(language=[\"\'])))(freezescript)/gi,"$1javascript"); -
trunk/modules/Gecko/Gecko.js
r1044 r1051 736 736 737 737 //Control character for retaining edit location when switching modes 738 Xinha. prototype.cc = String.fromCharCode(8286);738 Xinha.cc = String.fromCharCode(8286); 739 739 740 740 Xinha.prototype.setCC = function ( target ) 741 741 { 742 var cc = this.cc;742 var cc = Xinha.cc; 743 743 try 744 744 { … … 773 773 { 774 774 var ta = this._textArea; 775 var pos = ta.value.indexOf( this.cc );775 var pos = ta.value.indexOf( Xinha.cc ); 776 776 if ( pos == -1 ) return; 777 var end = pos + this.cc.length;777 var end = pos + Xinha.cc.length; 778 778 var before = ta.value.substring( 0, pos ); 779 779 var after = ta.value.substring( end, ta.value.length ); … … 796 796 { 797 797 var doc = this._doc; 798 doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp( this.cc),'<span id="XinhaEditingPostion"></span>');798 doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp(Xinha.cc),'<span id="XinhaEditingPostion"></span>'); 799 799 var posEl = doc.getElementById('XinhaEditingPostion'); 800 800 this.selectNodeContents(posEl); -
trunk/modules/InternetExplorer/InternetExplorer.js
r1044 r1051 789 789 790 790 // Control character for retaining edit location when switching modes 791 Xinha. prototype.cc = String.fromCharCode(0x2009);791 Xinha.cc = String.fromCharCode(0x2009); 792 792 793 793 Xinha.prototype.setCC = function ( target ) 794 794 { 795 var cc = this.cc;795 var cc = Xinha.cc; 796 796 if ( target == "textarea" ) 797 797 { … … 837 837 // in case the cursor is inside a link automatically created from a url 838 838 // the cc also appears in the url and we have to strip it out additionally 839 if( range.findText( escape( this.cc) ) )839 if( range.findText( escape(Xinha.cc) ) ) 840 840 { 841 841 range.select(); 842 842 range.text = ''; 843 843 } 844 if( range.findText( this.cc ) )844 if( range.findText( Xinha.cc ) ) 845 845 { 846 846 range.select(); -
trunk/modules/Opera/Opera.js
r1044 r1051 743 743 * 744 744 */ 745 745 Xinha.cc = String.fromCharCode(8286); 746 746 Xinha.prototype.setCC = function ( target ) 747 747 { 748 748 // Do a two step caret insertion, first a single char, then we'll replace that with the 749 749 // id'd span. 750 var cc = String.fromCharCode(8286);750 var cc = Xinha.cc; 751 751 752 752 try -
trunk/modules/WebKit/WebKit.js
r1044 r1051 723 723 }; 724 724 725 Xinha. prototype.cc = String.fromCharCode(8286);725 Xinha.cc = String.fromCharCode(8286); 726 726 727 727 Xinha.prototype.setCC = function ( target ) 728 728 { 729 var cc = this.cc;729 var cc = Xinha.cc; 730 730 try 731 731 { … … 757 757 Xinha.prototype.findCC = function ( target ) 758 758 { 759 var cc = Xinha.cc; 760 759 761 if ( target == 'textarea' ) 760 762 { 761 763 var ta = this._textArea; 762 var pos = ta.value.indexOf( this.cc );764 var pos = ta.value.indexOf( cc ); 763 765 if ( pos == -1 ) return; 764 var end = pos + this.cc.length;766 var end = pos + cc.length; 765 767 var before = ta.value.substring( 0, pos ); 766 768 var after = ta.value.substring( end, ta.value.length ); … … 784 786 { 785 787 var doc = this._doc; 786 doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp( this.cc),'<span id="XinhaEditingPostion"></span>');788 doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp(cc),'<span id="XinhaEditingPostion"></span>'); 787 789 var posEl = doc.getElementById('XinhaEditingPostion'); 788 790 this.selectNodeContents(posEl); -
trunk/plugins/InsertSnippet2/readme.html
r1050 r1051 46 46 <h3>Attributes</h3> 47 47 <dl><dt> n</dt><dd> The name of one snippet or category. It is obligatory for both.<br /></dd><dt> v</dt><dd> If this attribute is present in a snippet tag, there is a button in the UI that allows to insert this variable instead of the textual content of the snippet. <br /></dd><dt> c<br /></dt><dd> The category<br /></dd></dl> 48 <p>Inside the plugin's directory, there is a sample XML file and PHP scrip that shows how to create the XML dynamically.<br /></p>48 <p>Inside the plugin's directory, there is a sample XML file and PHP script that shows how to create the XML dynamically.<br /></p> 49 49 <p style="font-size: 80%;">3 October 2008 Raimund Meyer (xinha@raimundmeyer.de)</p> 50 50 </body>
