Is there any way to edit the content shown in the EditModePanel in SharePoint 2013? I am editing a wiki that provides documentation for our company's application. As such, I am writing a lot of code snippets. I would like to place some extra buttons similar to the existing Bold, Italc, etc. that could be used to quickly format code snippets.

有帮助吗?

解决方案

You can add a new Ribbon button by targeting two areas Ribbon.EditingTools.CPEditTab and Ribbon.EditingTools.CPEditTab.Font

Once you place the button, the button should use JavaScript or Other API's to format the text.

http://www.webdesignbooth.com/9-useful-javascript-syntax-highlighting-scripts/

其他提示

This seems to be what you're looking for: How to: Add an Edit Mode Panel snippet in SharePoint 2013. As it's HTML, you can author JavaScript to locate the focused control, selected text and modify it according to your needs.

许可以下: CC-BY-SA归因
scroll top