Skip to content

Commit

Permalink
docs: update framework intro
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlewind committed Jan 11, 2024
1 parent fa817e6 commit a827ef2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({
},
lang: 'en-US',
title: 'BlockSuite',
description: 'Toolkit for Diverse Content Editing',
description: 'The Editor Framework',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
Expand Down
10 changes: 9 additions & 1 deletion packages/docs/component-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ export class SimpleDocEditor extends LitElement {
}
```

As long as there is a corresponding `host` implementation, you can use the component model of frameworks like react or vue to implement your BlockSuite editors:
In other words, you can think of the BlockSuite editor as being composed in this way:

```ts
type Editor = BlockSpec[];
```

With very little overhead.

So, as long as there is a corresponding `host` implementation, you can use the component model of frameworks like react or vue to implement your BlockSuite editors:

![framework-agnostic](./images/framework-agnostic.png)

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/design-philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Motivation

For years, web frameworks such as React and Vue have promoted a mental model of component based development. This approach allows us to break down complex front-end applications into components for better composition and maintenance.
For years, web frameworks such as React and Vue have popularized the mental model of component based development. This approach allows us to break down complex front-end applications into components for better composition and maintenance.

Hence, when discussing front-end collaborative editing (or rich text editing), the first thought is often to define an `<Editor/>` component, then design the corresponding data flow and APIs around this editor. This method seems intuitive and has been adopted by many open-source editors in the front-end community. Everything sounds natural, but are there limitations or room for improvement?

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

BlockSuite is a toolkit for building collaborative editors and applications. It embraces the [**_document-centric_**](./design-philosophy) approach to facilitate the development of more flexible, diverse, and scalable editable interfaces.

We believe that for modern collaborative editing applications, the overall application data flow should be consistently modeled and reused on a larger scale, reducing the interoperability cost between editor and non-editor components. **Hence, BlockSuite completely separates the collaborative document model from the editor**. This separation allows any UI component, whether part of an editor or not, to function effectively by simply attaching it to the same document, offering a more flexible editing experience.
We believe that for modern collaborative editing applications, the overall application data flow should be consistently modeled and reused on a larger scale, reducing the interoperability cost between editor and non-editor components. **This is why BlockSuite completely separates the collaborative document model from the editor**. This separation allows any UI component, whether part of an editor or not, to function effectively by simply attaching it to the same document, offering a more flexible editing experience.

![showcase-doc-edgeless-editors](./images/showcase-doc-edgeless-editors.jpg)

Expand Down

1 comment on commit a827ef2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Size Report

Bundles

Entry Size Gzip Brotli
examples/basic 12.6 MB (+8.47 kB) 2.61 MB (+1.87 kB) 1.64 MB (+413 B)

Packages

Name Size Gzip Brotli
blocks 2.1 MB (+1.09 kB) 482 kB (+238 B) 362 kB (-120 B)
editor 84 B 89 B 63 B
store 62 kB 17.7 kB 15.8 kB
inline 32.5 kB 8.94 kB 8.01 kB

Please sign in to comment.