包装所见即所得编辑器的iframe

问题描述:

我在一个项目中使用了sceditor,我需要用div包装iframe.但是,当我这样做时,内容将被删除,当然我也不知道为什么.

I'm using sceditor in one my projects, and I need to wrap the iframe with a div. However, when I do that, the content gets erased and of course I don't know why.

有人可以解释为什么会这样吗?

Can someone throw some light on why is this happening?

要对此进行测试,只需进入 http://www.sceditor.com/并使用萤火虫执行此操作在控制台中

To test this, just go http://www.sceditor.com/ and with firebug execute this in the console

$(".sceditor-container iframe").wrap("<div class='some_class'></div>");

我也尝试过更改源代码,但是没有运气.

I've also tried to alter the source code with no luck.

SCE的CSS和js要求将所有内容放置在正确的位置.
你为什么需要这样的东西?

SCE's CSS and js requires that everything is placed in the correct place.
Why do you need such thing?