Skip to content

Commit e08babb

Browse files
author
Gary Sieling
committed
Complete merge of adubrov-master master/master
1 parent b0d83f7 commit e08babb

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

jquery.highlighttextarea.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* Refresh highlight
6868
*/
6969
Highlighter.prototype.highlight = function() {
70-
var text = Utilities.htmlEntities(this.$el.val()),
70+
var text = this.$el.val(),
7171
that = this;
7272
that.spacer = '';
7373
if (this.settings.wordsOnly ) {
@@ -291,7 +291,7 @@
291291
// the highlighter has the same size than the "inner" textarea and must have the same font properties
292292
Utilities.cloneCss(this.$el, this.$highlighter, [
293293
'font-size','font-family','font-style','font-weight','font-variant','font-stretch',
294-
'line-height','vertical-align','word-spacing','text-align','letter-spacing', 'text-rendering'
294+
'vertical-align','word-spacing','text-align','letter-spacing', 'text-rendering'
295295
]);
296296

297297
// now make the textarea transparent to see the highlighter through

jquery.highlighttextarea.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"jquery.highlighttextarea.js"
1212
],
1313
"devDependencies": {
14-
"grunt": "~0.4.5",
15-
"grunt-contrib-uglify": "~0.4.0",
14+
"grunt": "^0.4.5",
1615
"grunt-contrib-cssmin": "~0.9.0",
17-
"grunt-contrib-jshint": "~0.10.0"
16+
"grunt-contrib-jshint": "~0.10.0",
17+
"grunt-contrib-uglify": "~0.4.0"
1818
},
1919
"keywords": [
2020
"textarea",

tests/index.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,29 @@
9494
$('#demo10').highlightTextarea({
9595
ranges: [{
9696
class: 'blue',
97-
start: 1,
98-
length: 4
97+
start: 0,
98+
length: 2
9999
}, {
100100
color: '#FFFF00',
101-
ranges: [[12, 16]]
101+
ranges: [[12, 15]]
102102
}],
103103
id: 'demo10-wrap',
104104
debug: true
105105
});
106106

107107
$('#demo11').highlightTextarea({
108108
ranges: [{
109-
class: 'blue',
110-
start: 0,
111-
length: 5
109+
color: '#FFFF00',
110+
ranges: [[0, 1], [10, 11], [21, 22], [24, 25]]
111+
}],
112+
debug: true
113+
});
114+
115+
$('#demo12').highlightTextarea({
116+
ranges: [{
117+
color: '#FFFF00',
118+
ranges: [[0, 5]]
112119
}],
113-
id: 'demo11-wrap',
114120
debug: true
115121
});
116122

@@ -354,7 +360,7 @@ <h3>Accents</h3>
354360
<article>
355361
<h3>Right to Left</h3>
356362

357-
<textarea id="demo11" cols="50" rows="5">
363+
<textarea id="demo12" cols="50" rows="5">
358364
وقد انتباه المجتمع مع. أم لكل وبغطاء العناد. كل وحرمان العسكري للإتحاد الى. والكوري بريطانيا كما و, أم أحكم السفن مواقعها غير.
359365
</textarea>
360366
</article>

0 commit comments

Comments
 (0)