Customizing the SharePoint 2013 Rich Text Editor

Download Report

Transcript Customizing the SharePoint 2013 Rich Text Editor

Customizing the SharePoint 2013 Rich
Text Editor
Agenda
The basics of a rich text editor
Creating a basic editor
The SharePoint Rich Text Editor
Features of the RTE
Non-features of the RTE
What does publishing add
Embeddings
Loading up RTE scripts
Loading up RTE scripts
Rich Text Events
Canvas Events
Simple text insertion
Finding the current location
RTE.Canvas.getEditableRegion(element);
RTE.Canvas.currentEditableRegion();
RTE.Cursor.getCurrentElement();
RTE.Cursor.get_range();
RTE.Selection.getSelection();
RTE.Selection.getSelectionRange();
Using Ranges
var range = RTE.Cursor.get_range();
var text = range.get_innerText();
range.clear();
var paragraph = document.createElement(RTE.HtmlTagName.p);
paragraph.innerText = "Hi There";
range.insertNode(paragraph)
range.WrapRange(document.createElement(RTE.HtmlTagName.DIV));
Taking snapshots
RTE.SnapshotManager.takeSnapshot();
RTE.SnapshotManager.undo();
RTE.SnapshotManager.redo();
Inserting text and takin snapshots
Modifying hyperlinks
Internals
Retargeting paste
Advanced stuff
THANK YOU