garysieling / jquery-highlighttextarea

http://garysieling.github.io/jquery-highlighttextarea/
156 stars 75 forks source link

Using the plugin causes text to be duplicated #29

Closed ror6ax closed 10 years ago

ror6ax commented 10 years ago

screenshot 2014-06-08 20 03 37

The code is

<body>
<center>
<textarea id="textarea1" rows="1" cols="100" style="resize:none">sample text </textarea><br>

<script>
    $('textarea').highlightTextarea({words: ['sample']});
</script>
<button onclick="searchf1()">button</buttton>
<button onclick="align()">align</buttton>
</center>
mistic100 commented 10 years ago

please provide a jsfiddle example

ror6ax commented 10 years ago

http://jsfiddle.net/x8khL/

ror6ax commented 10 years ago

...which looks not like mine, strangely

mistic100 commented 10 years ago

it does look like yours because it can't load the js files... and you didn't load the CSS either use these files https://mistic100.github.io/jquery-highlighttextarea/dist/jquery.highlighttextarea.css https://mistic100.github.io/jquery-highlighttextarea/dist/jquery.highlighttextarea.js

mistic100 commented 10 years ago

http://jsfiddle.net/x8khL/1/ it perfectly works, nothing is duplicated

and I guess it is duplicated on your test because you forgot the CSS

ror6ax commented 10 years ago

Indeed it does. Sorry for the false alarm. Great tool, thanks for doing it!

mistic100 commented 10 years ago

thank you :)