Skip to content

Commit dfac1ef

Browse files
committed
fix: update wss url to fix co-editing
1 parent 6547d98 commit dfac1ef

File tree

2 files changed

+17
-28
lines changed

2 files changed

+17
-28
lines changed

packages/docs/fluent-editor/demos/collaborative-editing.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ onMounted(async () => {
9393
provider: {
9494
type: 'websocket',
9595
options: {
96-
serverUrl: 'wss://120.26.92.145:1234',
96+
serverUrl: 'wss://ai.opentiny.design/tiny-editor/',
9797
roomName: ROOM_NAME,
9898
},
9999
},

packages/projects/src/views/yuque/YuQue.vue

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<script setup lang="ts">
2-
import LogicFlow from '@logicflow/core'
3-
import { DndPanel, SelectionSelect, Snapshot } from '@logicflow/extension'
42
import FluentEditor, { CollaborationModule, generateTableUp, generateTableUpShortKeyMenu } from '@opentiny/fluent-editor'
53
import HeaderList from 'quill-header-list'
64
import { createSelectBox, defaultCustomSelect, TableMenuContextmenu, TableResizeLine, TableResizeScale, TableSelection, TableUp } from 'quill-table-up'
7-
import SimpleMindMap from 'simple-mind-map'
8-
import Themes from 'simple-mind-map-plugin-themes'
9-
import Drag from 'simple-mind-map/src/plugins/Drag.js'
10-
import Export from 'simple-mind-map/src/plugins/Export.js'
11-
import { nodeIconList } from 'simple-mind-map/src/svg/icons'
125
import { onMounted, ref } from 'vue'
13-
import '@logicflow/core/lib/style/index.css'
14-
import '@logicflow/extension/lib/style/index.css'
6+
7+
// 协同编辑
8+
import * as Y from 'yjs'
9+
import { IndexeddbPersistence } from 'y-indexeddb'
10+
import { Awareness } from 'y-protocols/awareness'
11+
import { QuillBinding } from 'y-quill'
12+
import { WebsocketProvider } from 'y-websocket'
13+
import QuillCursors from 'quill-cursors'
1514
1615
FluentEditor.register({ 'modules/header-list': HeaderList }, true)
1716
FluentEditor.register({ 'modules/table-up': generateTableUp(TableUp) }, true)
@@ -107,7 +106,6 @@ const TOOLBAR_CONFIG = [
107106
],
108107
[{ list: 'check' }, 'link', 'blockquote', 'divider'],
109108
[{ 'table-up': [] }, 'header-list'],
110-
['mind-map', 'flow-chart'],
111109
]
112110
113111
onMounted(() => {
@@ -142,28 +140,19 @@ onMounted(() => {
142140
return result
143141
},
144142
},
145-
'mind-map': {
146-
deps: {
147-
SimpleMindMap,
148-
Themes,
149-
Drag,
150-
Export,
151-
nodeIconList,
152-
},
153-
},
154-
'flow-chart': {
143+
'collaborative-editing': {
155144
deps: {
156-
LogicFlow,
157-
DndPanel,
158-
SelectionSelect,
159-
Snapshot,
145+
Y,
146+
Awareness,
147+
QuillBinding,
148+
QuillCursors,
149+
WebsocketProvider,
150+
IndexeddbPersistence,
160151
},
161-
},
162-
'collaborative-editing': {
163152
provider: {
164153
type: 'websocket',
165154
options: {
166-
serverUrl: 'wss://120.26.92.145:1234',
155+
serverUrl: 'wss://ai.opentiny.design/tiny-editor/',
167156
roomName: ROOM_NAME,
168157
},
169158
},

0 commit comments

Comments
 (0)