I have a contenteditable div that I want users to be able to select a portion of, and then click a button to wrap a div with some class and styles around.
The div I want to wrap around:
var newNode = $('<div class=\'selectedFont\' style=\'text-align=center;\'>');
The methods I need to use are in the title, I'm looking for an example.
Thanks.