You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I have Vue app with blocksuite. I want to use editor but I have error with importing css file. Below I pase the error, when I comment this line "import '@blocksuite/presets/themes/affine.css';" the editor is working, just not looking very good, cause of some css lacks.
I would be very grateful for help, thanks!
[plugin:vite:import-analysis] Missing "./themes/affine.css" specifier in "@blocksuite/presets" package
Pre-transform error: Missing "./themes/affine.css" specifier in "@blocksuite/presets" package
Here is my editor.ts file:
import '@blocksuite/presets/themes/affine.css';
import { AffineEditorContainer } from '@blocksuite/presets';
import { Doc, Schema } from '@blocksuite/store';
import { DocCollection } from '@blocksuite/store';
import { AffineSchemas } from '@blocksuite/blocks';
import { effects as blocksEffects } from '@blocksuite/blocks/effects';
import { effects as presetsEffects } from '@blocksuite/presets/effects';
export function initEditor() {
blocksEffects();
presetsEffects();
const schema = new Schema().register(AffineSchemas);
const collection = new DocCollection({ schema });
collection.meta.initialize();
const doc = collection.createDoc({ id: 'page1' });
doc.load(() => {
const pageBlockId = doc.addBlock('affine:page', {});
doc.addBlock('affine:surface', {}, pageBlockId);
const noteId = doc.addBlock('affine:note', {}, pageBlockId);
doc.addBlock('affine:paragraph', {}, noteId);
});
const editor = new AffineEditorContainer();
editor.doc = doc;
return { editor, collection };
}
The text was updated successfully, but these errors were encountered:
Hello!
I have Vue app with blocksuite. I want to use editor but I have error with importing css file. Below I pase the error, when I comment this line "import '@blocksuite/presets/themes/affine.css';" the editor is working, just not looking very good, cause of some css lacks.
I would be very grateful for help, thanks!
Here is my editor.ts file:
The text was updated successfully, but these errors were encountered: