问题
I have found the lot and got one editor which i use in my project (Flex Web application).
I have used CKEditor from this link.
<ckeditor:CKEditor id="editor1" width="100%" height="100%">
<ckeditor:htmlText>
<![CDATA[
]]>
</ckeditor:htmlText>
</ckeditor:CKEditor>
It's working ok in my project. But, there is one issue i am facing.
Problem:
I have one alert message and Custom popup container. I want to display that both on top of the editor. But it hide behind the editor.
I want to display on top of that editor. How can i do this?
Currently look something like:
Thanks.
回答1:
I don't think that will be possible because the CKEditor area is drawn over the swf. So you can do, unfortunately, nothing.
Take a look on your html page source code and you'll see what I mean.
Edit :
I agree with @fsbmain about using ExternalInterface
, but to show a JavaScript alert :
if(ExternalInterface.available){
ExternalInterface.call('alert', 'some message here !');
}
Edit 2 :
To hide your CKEditor, you can use a JavaScript function which you can call via ExternalInterface
:
JS :
<script type="text/javascript">
function hideCKEditor()
{
document.getElementById('ck0').style.display = 'none';
}
</script>
Then in the ActionScript side :
if(ExternalInterface.available){
ExternalInterface.call('hideCKEditor');
}
Alert.show('Your message here !', 'Alert Box', mx.controls.Alert.OK);
Hope that can help.
回答2:
That editor based on html div (so it's a html element above your swf app), that means that you have only three options to show your popup "over" it:
- Hide editor when popup is opened - in my mind best option by risks/time ratio
Actually all other methods are dirty cheats and require quite a lot of work with questionable result with a lot of edge cases and potential issues:
- Show you popup in separate swf above that html, communicate between two swf with
ExternalInterface
- Improve on #1 if you really want to show editor in background - make your editor screenshot with JS (try that Using HTML5/Canvas/JavaScript to take screenshots), send data to flash via
ExternalInterface
and display it inBitmap
来源:https://stackoverflow.com/questions/33476662/ckeditor-display-on-top-of-all-the-content-flex