fix(commons): extract name of markdown content yjs channel into the commons package

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-02-09 14:21:26 +01:00
parent 329a4d4e55
commit 11c2f57e4b
6 changed files with 22 additions and 13 deletions

View file

@ -3,8 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { MARKDOWN_CONTENT_CHANNEL_NAME } from './use-markdown-content-y-text'
import { YDocMessageTransporter } from '@hedgedoc/commons'
import { MARKDOWN_CONTENT_CHANNEL_NAME, YDocMessageTransporter } from '@hedgedoc/commons'
import type { Awareness } from 'y-protocols/awareness'
import type { Doc } from 'yjs'

View file

@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { MARKDOWN_CONTENT_CHANNEL_NAME } from '@hedgedoc/commons'
import { useMemo } from 'react'
import type { Doc } from 'yjs'
import type { YText } from 'yjs/dist/src/types/YText'
export const MARKDOWN_CONTENT_CHANNEL_NAME = 'markdownContent'
import type { Text as YText } from 'yjs'
/**
* Extracts the y-text channel that saves the markdown content from the given yDoc.