jrottman
Programmer
- Jun 17, 2005
- 47
I am working on a plugin for tinymce and I have run into one little snag. The plugin I am working on is an advanced preview plugin. When the user clicks the preview icon, it pops up a new window. Normally I would get the content from the editor from the popup. However I am using coldfusion to generate a pdf print view of the content the user has entered. Since pdf's will not parse javascript code, I am forced to do it another way.
what I am trying to accomplish is when the user clicks the preview button, it populates the popup from the parent instead of the child. As of yet, everything I have tried has failed. I end up with this error every time.
win.document.getElementById("pvData") has no properties
Here is the code I am using to create my popup and attempting to populate the popup window. Everything works right up until I get to this point win.document.getElementById("pvData").innerHTML = tinyMCE.getContent();
Any help with this is greatly appreciated.
switch (command) {
case "mceAdvPreview":
file = 'tinymce/jscripts/tiny_mce/plugins/advpreview/preview.cfm'; // Relative to theme
var win = window.open(file, "mceAdvPreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=1024',height=768");
win.document.getElementById("pvData").innerHTML = tinyMCE.getContent();
return true;
}
what I am trying to accomplish is when the user clicks the preview button, it populates the popup from the parent instead of the child. As of yet, everything I have tried has failed. I end up with this error every time.
win.document.getElementById("pvData") has no properties
Here is the code I am using to create my popup and attempting to populate the popup window. Everything works right up until I get to this point win.document.getElementById("pvData").innerHTML = tinyMCE.getContent();
Any help with this is greatly appreciated.
switch (command) {
case "mceAdvPreview":
file = 'tinymce/jscripts/tiny_mce/plugins/advpreview/preview.cfm'; // Relative to theme
var win = window.open(file, "mceAdvPreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=1024',height=768");
win.document.getElementById("pvData").innerHTML = tinyMCE.getContent();
return true;
}