配置/覆盖食人鱼CMS的HTML编辑器,以免添加&安培; NBSP对HTML [英] Configure / override Piranha CMS html editor so as not to add &nbsp's to html

查看:223
本文介绍了配置/覆盖食人鱼CMS的HTML编辑器,以免添加&安培; NBSP对HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有配置食人鱼CMS不添加&放的方式; NBSP的通过编辑器的源$ C ​​$ C的看法时,编辑HTML?复制和粘贴HTML缩进可能会导致一些非常丑恶的内容,如果空格/缩进不粘贴之前删除。

Is there a way to configure Piranha CMS not to add &nbsp's when editing html via the editor's "Source code" view? Copying and pasting indented html can result in some very ugly content if the white space / indenting isn't removed before pasting.

或许HTML编辑器可以覆盖一些方法来prevent这种行为?

Or perhaps the html editor can be overridden some way to prevent this behaviour?

推荐答案

在食人鱼CMS使用的编辑器是微小的MCE 4.0,其中有相当多的配置选项。您可以检查出的文档,这里的编辑器!

The editor used in Piranha CMS is Tiny MCE 4.0, which has quite a lot of configuration options. You can check out the documentation for the editor here!

http://www.tinymce.com

至于覆盖缺省配置,可以使嵌入式局部视图的副本:

As for overriding the default configuration, you can make a copy of the embedded partial view:

<一个href=\"https://github.com/PiranhaCMS/Piranha/blob/master/Core/Piranha/Areas/Manager/Views/Shared/Partial/TinyMCE.cshtml\" rel=\"nofollow\">https://github.com/PiranhaCMS/Piranha/blob/master/Core/Piranha/Areas/Manager/Views/Shared/Partial/TinyMCE.cshtml

并将其放置在你的应用程序下:

and place it in your application under:

〜/地区/经理/查看/共享/部分

~/Areas/Manager/Views/Shared/Partial

您的本地文件将被使用,而不是默认的。

Your local file will then be used instead of the default one.

祺!

这篇关于配置/覆盖食人鱼CMS的HTML编辑器,以免添加&安培; NBSP对HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆