AIR中使用FCKeditor

    技术2022-06-09  47

    FCKeditor2.6发布了,支持adobe AIR,两段代码就可以搞定在AIR中使用FCKeditor1.<mx:HTML id="fck" location="fckeditor/_samples/adobeair/sample01.html" x="10" y="96" width="626"></mx:HTML><mx:Button x="88" y="66" label="FCK" click="getHtml();"/>2.private function getHtml():void{trace(this.fck.htmlLoader.window.FCKeditorAPI.GetInstance('FCKeditor1').GetHTML());}FCKeditor1这个id是sample01.html里面的var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;oFCKeditor.BasePath = sBasePath ;oFCKeditor.Height = 400 ;oFCKeditor.Value = '<p>FCKeditor is in the <strong>AIR</strong>!<//p>' ;oFCKeditor.Create() ;

     

     

    在插件的js代码中要获取到根页面中的函数可以: window.parent.test();  test为你的函数,要得到里面的元素可以:window.parent.document.getElementById("myButtin")


    最新回复(0)