Configure / override Piranha CMS html editor so as

2019-08-15 06:40发布

问题:

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.

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

回答1:

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:

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.

Regards!