将 CKEditor 窗口包裹在额外的标记层中?
有没有办法将编辑器窗口包装在额外的标记层中,以便我可以模拟特定的 CSS 上下文?
例如,在我的样式表中,我可能有一个像这样的选择器
.container #articleBody h2{/* some styles */},
: #articleBody 的内容,以及一个名为 .container 的类的包装器,用于从我网站的样式表中获取样式,以便在 CKEditor 编辑 iframe 中正确应用。
(注意:这是CKEditor的后续问题——查看样式在编辑器窗口中,但我觉得这个问题非常明显,足以保证它自己的问题。)
Is there a way to wrap the editor window in extra layers of markup, so that I can simulate particular css contexts?
For example, I in my stylesheet, I might have a selector like:
.container #articleBody h2{/* some styles */},
But I'm applying CKeditor to a textarea that edits what goes into #articleBody, so I'd need a way to apply a wrapper around the editor container with an id of #articleBody, and a wrapper around that with a class called .container to get styles from my site's stylesheet to apply correctly within the CKEditor editing iframe.
(Note: This is a follow-up question to CKEditor -- seeing styles in editor window, but I felt the issue was significantly distinct enough to warrant its own question.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 bodyId 和 bodyClass,尽管它们对于该选择器来说还不够。
最简单的选择是仅使用
Id 选择器应该足以在原始页面中确定该规则的范围,然后您可以使用 config.bodyId
You can use the bodyId and bodyClass, although they won't be enough for that selector.
The easiest option would be to use just
As the Id selector should be enough to scope that rule in the original page and you can use then the config.bodyId