I have a textarea where I want to highlight some text to have a black background and white font color for that words.
I've thought a bit about this and looked into a lot of jquery highlight textarea plugins and it seems this it really not a trivial task...
I could use a full featured text editor like Ace but that's really a bit too much for my needs :)
One alternative is to remove the textarea and just a div with contenteditable. That has some drawbacks because then you have to parse the HTML on the backend to remove it and just get the text. Another one is if people copy-paste rich text (with images for example) they will pasted as rich text and not just plain text
I have a textarea where I want to highlight some text to have a black background and white font color for that words.
I've thought a bit about this and looked into a lot of jquery highlight textarea plugins and it seems this it really not a trivial task... I could use a full featured text editor like Ace but that's really a bit too much for my needs :)
Anyone has any ideas how to achieve this easily?