I have this HTML code with pre-written message. My goal is to highlight text between [quote] [/quote] in a yellow background once I focus/click on the text area.
<textarea>
This is a test message.
[quote]Wise man said he is wise.[/quote] There could be more quotes too:
[quote]this is second quote [/quote]
He is correct.
</textarea>
Is it possible to do it with pure Javascript? I think it should be something like:
textarea onfocus="function()">
....
(and if there is no [quote] [/quote] found then it should do nothing, ie. no warnings).
Scenario I am having a functionality in my project in which we have to add a note in a section and then it can be moved to the other sections. It is a sort of task tracking. I am able to add a note ...
Scenario I am having a functionality in my project in which we have to add a note in a section and then it can be moved to the other sections. It is a sort of task tracking. I am able to add a note ...
I Have a jquery export table to excel code. But the problem is that it changes the value is export file of xls. my table td has a value 810101E001 when I export it it changes the value like 8.10E+06. ...
I Have a jquery export table to excel code. But the problem is that it changes the value is export file of xls. my table td has a value 810101E001 when I export it it changes the value like 8.10E+06. ...
this is a pure academic question. is it better practice to add new elements to the dom this way with create new element <div id="div1"> <p id="p1">This is a paragraph.</p> <p id="...
this is a pure academic question. is it better practice to add new elements to the dom this way with create new element <div id="div1"> <p id="p1">This is a paragraph.</p> <p id="...
A basic function: function myStuff(a,b,c){ var _c = _c || c || {}; console.log(_c); } The idea is to use a cached value if used before, or a new value if new/different. The question is: if ...
A basic function: function myStuff(a,b,c){ var _c = _c || c || {}; console.log(_c); } The idea is to use a cached value if used before, or a new value if new/different. The question is: if ...