Hey guys,
I'm using multiple wp-editors on one of my plugin pages. I want to drop a draggable html element into the editor and make the content appear where the cursor is(or where it's pointed to.) The content will be html not text.
This is the function I use to make the editors: wp_editor
There are some screenshots attached.. they're showing the html dom tree..
The draggable li-elements are ajax loaded but they're already done. they can be dragged around.
all that is left is making the iframe droppable.
I tried this one:
$.ajax({
url: ajaxUrl
})
.done(function(data) {
[login to view URL](data);
$(".draggable").draggable({
revert: true
});
$('textarea.friendly_editor')
.prev('.mce-container')
.find('.mce-edit-area')
.droppable({
drop: function(event, ui) {
[login to view URL]('mceInsertContent', false,'<p>'+[login to view URL]()+'</p>');
}
});
});
to the point where ajax call is made, tinymce is already loaded and the iframe exists
All I want is making the iframe droppable and that's it. I will take over from there. If you do a good job, I can give you other tasks down the road.
Thanks