Forum closed. New forum available at http://community.wymeditor.org/
var wym = $.wymeditors(0);
// After the selected element
var elem = wym.selected();
$('<img>', wym._doc).insertAfter(elem);
// or appending to the body
$('<img>', wym._doc).appendTo(wym._doc.body);
tilzinger wrote:Thanks. It works, but as soon as I hit Enter to go to the next line, thus creating a new <p>, it wraps the image in a <p> automatically. Anyway to avoid this?
Users browsing this forum: No registered users and 2 guests