I want to implement a simple (at least it looks this way) functionality: when user is pasting a text, copied from MS word or Open office writer, I want to wrap all the text that have been made bold in the copied document in <b></b>
tags.
For example, if Word document looks like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras velit mi, facilisis sodales facilisis sit amet, vehicula vitae urna. Sed arcu velit, eleifend et luctus a, gravida vel nulla. Etiam dapibus enim fermentum diam rutrum id hendrerit elit tincidunt. Nam enim ante, feugiat pretium iaculis id, luctus sit amet diam.
Then, if user copies and pastes it into text area, pasted text will look like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras velit
mi, facilisis sodales <b>facilisis</b> sit amet, vehicula vitae urna. Sed
arcu velit, eleifend et luctus a, gravida vel nulla. Etiam dapibus
enim fermentum diam rutrum id hendrerit <b>elit</b> tincidunt. Nam enim ante,
feugiat pretium iaculis id, luctus sit amet diam.
I know livejournal.com used to have this functionality, so it's definetly possible. What are the principles of achieving this using javascript/jquery?
P.S. I am aware of WYSIWYG editors, but they are mostly an overkill for what I'm trying to do.