Frage

Is there a way to limit content editors on sites to just text? I would like to have them not inject any styles by using inline styling in HTML, or using any buttons in the editor.

I have a few rogue editors that go color and style crazy, and for the next iteration of the public facing site I run, I don't want any chance of that happening.

Thanks all!

War es hilfreich?

Lösung

There are a couple options I've used in the past - neither is ideal but they may help you.

  1. You can disable features from the rich text editor. Read through this article - it should apply to SP 2013 the same but basically, you can disable color, font, etc from being applied in the RTE.

  2. You can use jquery to remove all styles after the fact. $("#element").removeAttr("style");

Andere Tipps

I don't think you can accomplish this limitation using a content editor. According to Microsoft, content editor's are designed for HTML so any setting to disable HTML input would be counter intuitive.

http://office.microsoft.com/en-us/windows-sharepoint-services-help/about-the-content-editor-web-part-HA001160897.aspx

"The Content Editor Web Part is intended for adding HTML content to a Web Part Page"

I'm not sure from your post what you are trying to accomplish holistically, or what business need these content editors solve. Could you build a static page/template that fits your need (and maybe even looks like the normal content editor) but utilizes the rich text box feature?

using rich textbox in Sharepoint 2013

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top