@@ -274,6 +274,20 @@ export default {
274
274
}
275
275
const syncProvider = shallowRef (null )
276
276
277
+ const extensions = [
278
+ Autofocus .configure ({ fileId: props .fileId }),
279
+ Collaboration .configure ({ document : ydoc }),
280
+ CollaborationCursor .configure ({ provider: { awareness } }),
281
+ ]
282
+ editor .value = isRichEditor
283
+ ? createRichEditor ({
284
+ ... wrappedConnection,
285
+ relativePath: props .relativePath ,
286
+ extensions,
287
+ isEmbedded: props .isEmbedded ,
288
+ })
289
+ : createPlainEditor ({ language, extensions })
290
+
277
291
return {
278
292
awareness,
279
293
baseVersionEtag,
@@ -422,21 +436,6 @@ export default {
422
436
this .$attachmentResolver = null
423
437
if (this .active && this .hasDocumentParameters ) {
424
438
this .initSession ()
425
- const extensions = [
426
- Autofocus .configure ({ fileId: this .fileId }),
427
- Collaboration .configure ({ document : this .ydoc }),
428
- CollaborationCursor .configure ({
429
- provider: { awareness: this .awareness },
430
- }),
431
- ]
432
- this .editor = this .isRichEditor
433
- ? createRichEditor ({
434
- ... this .wrappedConnection ,
435
- relativePath: this .relativePath ,
436
- extensions,
437
- isEmbedded: this .isEmbedded ,
438
- })
439
- : createPlainEditor ({ language: this .language , extensions })
440
439
this .listenEditorEvents ()
441
440
}
442
441
},
0 commit comments