简体   繁体   English

CK编辑器即使在Inline模式下也破坏了页面样式。.如何禁用?

[英]CK editor destroy the style of the page even in Inline mode.. how to disable?

what i think to do for my cms is this 我想为我的CMS做的是

<script type=javascript...... src=ckeditor.js>    
<div contentditable=true>
\all of Site code\
</div>

then submit it to database.. 然后将其提交到数据库。

the problem is that when i do this the ckeditor disables iframes, swfs, list styles and destroy the style of the page 问题是当我这样做时,ckeditor会禁用iframe,swfs,列表样式并破坏页面的样式

My goal is like: 我的目标是:

Inline Edit with that acts like codeditable="true" with the toolbars of the ckeditor... 内联编辑的行为类似于codeditable="true"的工具栏的codeditable="true"

it destroys alignments especially make navbars in UL into default list style and others 它会破坏对齐方式,尤其是使UL中的导航栏成为默认列表样式等

You're doing it the wrong way. 您做错了方法。 CKEditor is not a website editor, therefore it cannot be used to edit entire website with full spectrum of CSS/HTML/JS used. CKEditor不是网站编辑器,因此不能使用完整的CSS / HTML / JS来编辑整个网站。

It should be rather understood as a "documents" editor. 应该将其理解为“文档”编辑器。 So it should be used to edit semantically consistent, more atomic fragments of the web page. 因此,应使用它来编辑网页上语义一致的原子片段。 Check the CKEditor integrations for popular CMSes like for example for Drupal . 检查CKEditor集成中流行的CMS,例如Drupal

Also, make sure that you know about the Advanced Content Filter . 另外,请确保您了解“ 高级内容过滤器”

而是在具有contentEditable = true的div上,应将要编辑的页面作为文本区域的内容放置(当然,对其进行正确编码),然后将CKEditor设置为使用fullPage模式,这样您就可以进行编辑整个页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM