You are not logged in.

#1 2008-11-27 08:14:25

chrisryantaylor
Member
Registered: 2008-11-27
Posts: 2

TinyMCE in Flex/Air Sample

After some tweaking, I managed to get TinyMCE working with a Flex version of Adobe Air.

http://chrisryantaylor.com/files/air/tinymce.air (1.27m)

It still has some issue with the dialog boxes, but I manage to create a custom toolbar button and have a JS events fire to Actionscript where you can take over and customise the UI. Try the HTML button for an example.

Of course this could be a pain to re-create every TinyMCE dialog and pop-up box in Flex, but I'm open to suggestions if anyone has any pointers.

Source is contained in the .air file.

Offline

 

#2 2009-01-09 07:44:02

bytespring
Member
Registered: 2009-01-09
Posts: 1

Re: TinyMCE in Flex/Air Sample

Hi Chris,
thanks for posting this. I've been trying to get your example running from the source, but it doesn't want to work. Any chance you could post a zipped version? The app runs, but tinymce isn't being displayed.

Cheers

Offline

 

#3 2009-01-14 01:34:00

chrisryantaylor
Member
Registered: 2008-11-27
Posts: 2

Re: TinyMCE in Flex/Air Sample

The app seems to run fine on the PC's I have tried, can anyone else confirm that the tinymce editor doesn't initiate? Could explain why the topic was so quiet.

Also you can unzip the .air file and see the source.
Try building the files yourself, just make sure you include the tinymce lib files when you want to make a build.

Last edited by chrisryantaylor (2009-01-14 01:38:03)

Offline

 

#4 2009-04-09 12:30:07

NamelessOne
Member
Registered: 2009-04-09
Posts: 3

Re: TinyMCE in Flex/Air Sample

Thanx for your work Chris. But I also was not able to compile your application from the sources you provided. Apparently, there are some tricks in the initital Flex Project creation (adding librarires, setting up project properties, etc.) Could you please write them here? Or simply post zipped folder with you project.

Offline

 

#5 2009-04-09 13:22:24

NamelessOne
Member
Registered: 2009-04-09
Posts: 3

Re: TinyMCE in Flex/Air Sample

Here is my project's structure and the exception.
I imported TinyMCE lib so that it would appear in 'bin-debug\libs\tiny_mce\' folder. Is this the right way?

http://img2.imageshack.us/img2/674/49625273.png

Offline

 

#6 2009-04-09 17:58:19

NamelessOne
Member
Registered: 2009-04-09
Posts: 3

Re: TinyMCE in Flex/Air Sample

OK, after almost 3 hours of investigation I've managed to find the solution.
Apperantly, security model in Flex SDK 3.2+ is slightly changed.
Now you need to set property "placeLoadStringContentInApplicationSandbox" of HTMLLoader's to 'true' if you want to execute some external JS-files.

In this chrisryantaylor's project you need to change 'htmlInit' function like this:

Code:

            private function htmlInit():void{
                html.loadString(tinymce);
                html.addEventListener(Event.HTML_DOM_INITIALIZE, function(e:Event):void {
                    htmlContainer.htmlLoader.placeLoadStringContentInApplicationSandbox = true;
                    htmlContainer.htmlText = tinymce;
                    setTimeout(jsLoaded, 1000);
                });
            }

For further information see discussion here: http://bugs.adobe.com/jira/browse/SDK-17088

Last edited by NamelessOne (2009-04-09 18:05:04)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB