tiptap/docs/src/docPages/api/overview.md

26 lines
2.2 KiB
Markdown
Raw Normal View History

# Overview
2020-11-17 04:36:18 +08:00
tiptap is a friendly wrapper around [ProseMirror](https://ProseMirror.net). Although tiptap tries to hide most of the complexity of ProseMirror, its built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage.
2020-10-28 23:49:44 +08:00
### Structure
ProseMirror works with a strict [Schema](/api/schema), which defines the allowed structure of a document. A document is a tree of headings, paragraphs and others elements, so called nodes. Marks can be attached to a node, e. g. to emphasize part of it. [Commands](/api/commands) change that document programmatically.
2020-09-26 04:22:44 +08:00
2020-10-28 23:49:44 +08:00
### Content
The document is stored in a state. All changes are applied as transactions to the state. The state has details about the current content, cursor position and selection. You can hook into a few different [events](/api/events), for example to alter transactions before they get applied.
2020-09-26 04:22:44 +08:00
2020-10-28 23:49:44 +08:00
### Extensions
Extensions add [nodes](/api/nodes), [marks](/api/marks) and/or [functionalities](/api/extensions) to the editor. A lot of those extensions bound their commands to common [keyboard shortcuts](/api/keyboard-shortcuts).
2021-01-21 19:35:06 +08:00
## Vocabulary
2021-01-22 06:41:28 +08:00
ProseMirror has its own vocabulary and youll stumble upon all those words now and then. Here is a short overview of the most common words we use in the documentation.
2021-01-21 19:35:06 +08:00
| Word | Description |
| ----------- | ------------------------------------------------------------------------ |
2021-01-22 06:41:28 +08:00
| Schema | Configures the structure your content can have. |
| Document | The actual content in your editor. |
| State | Everything to describe the current content and selection of your editor. |
| Transaction | A change to the state (updated selection, content, …) |
| Extension | Registeres new functionality. |
| Node | Adds blocks, like heading, paragraph. |
| Mark | Adds inline formatting, for example bold or italic. |
| Command | Execute an action inside the editor, that somehow changes the state. |