Hello.
I use IE 6
I have the following code:
var flag = false;
var str = "aaaa\na <B>italico</B> e mais\n algo ee e e eee e e e e e a a a a a a a a a a a a a a a a a a a a ";
if(str.match(/<B>((.)*[\r\n]*(.)*)*<\/B>/i) != null) flag = true;
alert(flag)...
Well i can't use replace because i can have alot of same html tags in the text.
The point is to format text in a textarea with html tags.
(kinda of a text editor)
I can add a tag or remove the tag, and the problem is when i remove the tag.
I think the problem is here...
Tiago, you can run another script that will tag every div in the document with a id tag, that is a solution.
Another solution is using events, but i think for that you need to place the events inside the div thag.
When the event happens, it will pass the event argument, for example ev, and...
What is wrong with my question?
Like i said, i work with IE 6
I'm using javascript to work with a textarea.
My question, is if there is a way by using javascript, of correcting the double click, that selects the text like i said in the previous post.
Did the question bother you? Is the answer...
Hi.
I found the following function to retrieve the caret of a textarea:
function doGetCaretPosition (ctrl) {
var CaretPos = 0;
// IE Support
if (document.selection) {
ctrl.focus ();
var Sel = document.selection.createRange ();
Sel.moveStart ('character', -ctrl.value.length)...
this is to remove <br>some text</br> from the textarea for example
I don't see any problem with my code, althow i don't doubt you are right when saying its on my code.
so ie. :
...
var begin ="<br>";
var end = "</br> other stuff";
var selection = "some text";
textarea.value =...
Hi.
I work with IE 6
I have a text area with several words, when i double click to select one of those words, it selects the word with a blank space that is just next to the word.
How can i prevent this?
Cheers.
Well, i use IE 6
And if you understood i was saying the problem was with JS,then I'm sorry maybe i expressed myself poorly.
In the substring i was going to the wrong position, and therefore not retrieving the space.
That is solved i guess.
What about the textarea problem?
Cheers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.