Droppables not defined, and no scrollbar!
opened this issue · comments
Choosing the wymeditor filter, it seems to work. However - there is no scrollbar to scroll the editor's content!
I get a javascript error:
"Droppables not defined"
function bind_droppability(box) {
Droppables.add(box, { <<<<<<<<< FIREBUG BREAKS HERE
accept: 'asset',
/* An element has been dropped into the iframe
*
* @param element - the dropped element
*/
onDrop: function(element) {
// get asset information
var classes = element.className.split(' ');
var tag_type = classes[0];
var link = element.select('a.bucket_link')[0];
if(tag_type == 'image') {
// copy the original image to WYM
var tag = '<img src="'+ link.href +'" alt="'+ link.title +'" />';
}
else {
// copy a link to WYM
var asset_id = element.id.split('_').last();
var tag = '<a href="'+ link.href +'">'+ link.title +'</a>'
}
you are totally right about 'Droppables' not being defined.. This presumes that the paperclipped extension is being used as well. I'm very busy at the moment, but I'll do my best to iron this out asap.
About the scroll bar; the editor will grow in height as soon as the end of the input area is reached. This probably stopped working for you because of the javascript error about Droppables not being defined..
Not sure if this is the same error, but I ran into something similar (within Droppables.add) and fixed it over in my fork.
the regex currently tests for /part-([\w\d-]+)/ against box.ancestors()[2].ancestors()[1].id but after some digging I noticed box.ancestors()[2].ancestors()[1].id was returning a string with "page_" instead of "part-".
Changing that has pretty much fixed things.
After thinking about it some more I thought this might be a case of inconsistencies between pre-0.9.0 versions of radiant and 0.9.x, so I updated to account for both page_* and part-* in the regular expression. Tested with 0.9.0 and it's working well.
Only use Droppables when paperclipped is present. Closed by 787dd95
Different bug, but I pulled your commits as well jayroh, thanks!