문제

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 ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top