我试图在此处使用javaScript设置位于tinyMCE body 中的 p 标记的innerText,但似乎无法到达该元素。
Elements Tab of the Developer Tools.
在我看来,iframe中有一个影子DOM。当我在控制台中运行以下命令时,结果为 null 。
document.querySelector("#tinymce");
null
但是,如果我在控制台中从“顶部”切换到“ mce_6_ifr”,则现在可以访问所需数据:
Console Tab of the Developer Tools
我不确定该如何前进。 任何帮助深表感谢!