Forum closed. New forum available at http://community.wymeditor.org/
lamy wrote:However, it would be great to have pre-written elements you can insert. For instance, one image with text floating around it. And another element that has 3 images next to each other and so on. But how could I do that?
lamy wrote:Now, I have got some new Elements in my list. But how can I trigger an action when someone clicks on it? I don't see a way to easily add a class to that element in the list so that I can just access it with $(".listItem1").click().
Next thing is that I would like to trigger an event when someone clicks on an image, for instance. How could I do that?
$.wymeditors(<insert the id of your editor instance>)._doc
var myDoc = $.wymeditors(0)._doc;
jQuery(wym._doc.body).find('img').click(function () {
[You callback here]
});
jQuery(wym._doc.body).click(function (e) {
if ($(e.target).is('img')) {
// Your code here
}
});
Users browsing this forum: No registered users and 1 guest