Hi,
I was trying your plugin, and it seems to have a bug in the insertcode/ppInsertAtCursor functions.
In ppInsertAtCursor:
sel = document.selection.createRange()
That line, I believe creates a range from the *popup* window, not from the post window. So I made some changes:
In insertcode change:
openerhandle = window.opener.document.post.content
to:
openerhandle = window.opener.document;
In ppInsertAtCursor, change these lines:
64 - if (document.selection) {
66 - sel = document.selection.createRange();
69 - else if (myField.selectionStart
myField.selectionStart == "0") {
70* - insert new code before current line 70
74* - insert new code before current line 74
to:
64 - if (myField.selection) {
66 - sel = myField.selection.createRange();
69 - else if (myField.post.content.selectionStart | myField.post.content.selectionStart == "0") {
70 - myField = myField.post.content;
74 (at this point, it becomes line 75) - myField = myField.post.content;
I don't know if those changes have any problems, but it now works for me.
Regards,
Ivan V.
Change History
Download in other formats:
|