mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +08:00
chore(editor): move helper to playground (#9498)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { AffineSchemas } from '@blocksuite/blocks/schemas';
|
import { AffineSchemas } from '@blocksuite/blocks';
|
||||||
import { DocCollection, Schema } from '@blocksuite/store';
|
import { DocCollection, Schema } from '@blocksuite/store';
|
||||||
|
|
||||||
export function createEmptyDoc() {
|
export function createEmptyDoc() {
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import '../../../style.css';
|
import '../../../style.css';
|
||||||
|
|
||||||
import { createEmptyDoc, EdgelessEditor } from '@blocksuite/presets';
|
import { EdgelessEditor } from '@blocksuite/presets';
|
||||||
|
|
||||||
|
import { createEmptyDoc } from '../../../apps/_common/helper';
|
||||||
|
|
||||||
const doc = createEmptyDoc().init();
|
const doc = createEmptyDoc().init();
|
||||||
const editor = new EdgelessEditor();
|
const editor = new EdgelessEditor();
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import '../../../style.css';
|
import '../../../style.css';
|
||||||
|
|
||||||
import { createEmptyDoc, PageEditor } from '@blocksuite/presets';
|
import { PageEditor } from '@blocksuite/presets';
|
||||||
import { Text } from '@blocksuite/store';
|
import { Text } from '@blocksuite/store';
|
||||||
|
|
||||||
|
import { createEmptyDoc } from '../../../apps/_common/helper';
|
||||||
|
|
||||||
const doc = createEmptyDoc().init();
|
const doc = createEmptyDoc().init();
|
||||||
const editor = new PageEditor();
|
const editor = new PageEditor();
|
||||||
editor.doc = doc;
|
editor.doc = doc;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import '../../../style.css';
|
import '../../../style.css';
|
||||||
|
|
||||||
import { createEmptyDoc, EdgelessEditor } from '@blocksuite/presets';
|
import { EdgelessEditor } from '@blocksuite/presets';
|
||||||
|
|
||||||
|
import { createEmptyDoc } from '../../../apps/_common/helper';
|
||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.style.display = 'flex';
|
container.style.display = 'flex';
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import '../../../style.css';
|
import '../../../style.css';
|
||||||
|
|
||||||
import {
|
import { EdgelessEditor, PageEditor } from '@blocksuite/presets';
|
||||||
createEmptyDoc,
|
|
||||||
EdgelessEditor,
|
import { createEmptyDoc } from '../../../apps/_common/helper';
|
||||||
PageEditor,
|
|
||||||
} from '@blocksuite/presets';
|
|
||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.style.display = 'flex';
|
container.style.display = 'flex';
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import '../../../style.css';
|
import '../../../style.css';
|
||||||
|
|
||||||
import { createEmptyDoc, PageEditor } from '@blocksuite/presets';
|
import { PageEditor } from '@blocksuite/presets';
|
||||||
|
|
||||||
|
import { createEmptyDoc } from '../../../apps/_common/helper';
|
||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.style.display = 'flex';
|
container.style.display = 'flex';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import '@blocksuite/affine-block-surface/effects';
|
|||||||
|
|
||||||
export * from './editors';
|
export * from './editors';
|
||||||
export * from './fragments';
|
export * from './fragments';
|
||||||
export * from './helpers';
|
|
||||||
|
|
||||||
const env =
|
const env =
|
||||||
typeof globalThis !== 'undefined'
|
typeof globalThis !== 'undefined'
|
||||||
|
|||||||
Reference in New Issue
Block a user