views:

10

answers:

1

Maybe someone has some idea what I'm doing wrong here. I'm writing an AIR application and I'm trying to embed a dijit.Editor on my page - I've tried both with a simple:

<div dojoType="dijit.Editor"></div> 

And doing it programmaticly:

<div id="editor"></div>

...
// in the onLoad function
var editorwidget = new dijit.Editor({height: '400px'}, 'editor');
editorwidget.startup();

But neither seem to work right. In both cases I see both the toolbar and an appropriately sized IFRAME, but the IFRAME doesn't seem to be loading its content. I've tried forcibly seeing the src param and calling

editorwidget.iframe.contentWindow.location.reload(true); 

but all to no effect - Editor.onLoad() never gets called.

I tried manually calling

editorwidget.iframe._loadFunc(editorwidget.iframe.contentWindow);

And that seems to trigger some things to happen - however what it seems to trigger is the disabling of the Editor widget altogether.

I'm sure I'm missing something dumb, but I'm at a loss for what it could be that I'm missing.

Has anyone else used dijit.Editor in an Adobe AIR application (I'm using the latest 2.0 runtime/2.0 RC SDK).

A: 

As near as I can tell the problem seems to be that the IFRAME which gets added to the page with an 'src=javascript:...' violates the security sandbox policy in Adobe AIR. I tried setting the src= what it would eventually be if the javascript got executed, but that just doesn't seem to help either. Not sure why that won't work.

Chris Boran