@@ -85,7 +85,7 @@ export interface ISharedBase extends IObservableDisposable {
85
85
* Implement an API for Context information on the shared information.
86
86
* This is used by, for example, docregistry to share the file-path of the edited content.
87
87
*/
88
- export interface ISharedDocument extends ISharedBase {
88
+ interface ISharedDocumentNoSource extends ISharedBase {
89
89
/**
90
90
* Document version
91
91
*/
@@ -117,6 +117,26 @@ export interface ISharedDocument extends ISharedBase {
117
117
readonly changed : ISignal < this, DocumentChange > ;
118
118
}
119
119
120
+ /**
121
+ * Implement an API for Context information on the shared information.
122
+ * This is used by, for example, docregistry to share the file-path of the edited content.
123
+ */
124
+ export interface ISharedDocument extends ISharedDocumentNoSource {
125
+ /**
126
+ * Get the document source.
127
+ *
128
+ * @returns Source.
129
+ */
130
+ getSource ( ) : string | JSONValue ;
131
+
132
+ /**
133
+ * Set the document source.
134
+ *
135
+ * @param value New source.
136
+ */
137
+ setSource ( value : string | JSONValue ) : void ;
138
+ }
139
+
120
140
/**
121
141
* The ISharedText interface defines models that can be bound to a text editor like CodeMirror.
122
142
*/
@@ -158,7 +178,7 @@ export interface ISharedText extends ISharedBase {
158
178
/**
159
179
* Text/Markdown/Code files are represented as ISharedFile
160
180
*/
161
- export interface ISharedFile extends ISharedDocument , ISharedText {
181
+ export interface ISharedFile extends ISharedDocumentNoSource , ISharedText {
162
182
/**
163
183
* The changed signal.
164
184
*/
0 commit comments