MCPcopy
hub / github.com/tinymce/tinymce / RtcRuntimeApi

Interface RtcRuntimeApi

modules/tinymce/src/core/main/ts/Rtc.ts:23–70  ·  view source on GitHub ↗

API implemented by the RTC plugin

Source from the content-addressed store, hash-verified

21
22/** API implemented by the RTC plugin */
23interface RtcRuntimeApi {
24 init: {
25 bindEvents: () => void;
26 };
27 undoManager: {
28 beforeChange: () => void;
29 add: () => UndoLevel;
30 undo: () => UndoLevel;
31 redo: () => UndoLevel;
32 hasUndo: () => boolean;
33 hasRedo: () => boolean;
34 transact: (fn: () => void) => UndoLevel;
35 reset: () => void;
36 clear: () => void;
37 ignore: (fn: () => void) => void;
38 extra: (fn1: () => void, fn2: () => void) => void;
39 };
40 formatter: {
41 canApply: (format: string) => boolean;
42 match: (format: string, vars: FormatVars, similar?: boolean) => boolean;
43 matchAll: () => string[];
44 matchNode: () => Format | undefined;
45 closest: (formats: string[]) => string;
46 apply: (format: string, vars: FormatVars) => void;
47 remove: (format: string, vars: FormatVars) => void;
48 toggle: (format: string, vars: FormatVars) => void;
49 formatChanged: (formats: string, callback: FormatChangeCallback, similar?: boolean, vars?: FormatVars) => UnbindFormatChanged;
50 };
51 editor: {
52 getContent: (args: GetContentArgs) => Content;
53 setContent: (content: Content, args: SetContentArgs) => Content;
54 insertContent: (content: string) => void;
55 addVisual: () => void;
56 };
57 selection: {
58 getContent: (args: Partial<GetSelectionContentArgs>) => Content;
59 };
60 raw: {
61 getRawModel: () => any;
62 };
63 autocompleter: {
64 addDecoration: (range: Range) => void;
65 removeDecoration: () => void;
66 };
67 rtc: {
68 isRemote: boolean;
69 };
70}
71
72/** A copy of the TinyMCE api definitions that the plugin overrides */
73interface RtcAdaptor {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…