mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-08-06 13:38:49 +08:00
docs: rename all the things
This commit is contained in:
parent
4c34bfd8d2
commit
f2a39743e1
@ -1,6 +1,6 @@
|
||||
context('/demos/Guide/StoreContent/ExportHTML', () => {
|
||||
context('/demos/Guide/Content/ExportHTML', () => {
|
||||
before(() => {
|
||||
cy.visit('/demos/Guide/StoreContent/ExportHTML')
|
||||
cy.visit('/demos/Guide/Content/ExportHTML')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
@ -1,6 +1,6 @@
|
||||
context('/demos/Guide/StoreContent/ExportJSON', () => {
|
||||
context('/demos/Guide/Content/ExportJSON', () => {
|
||||
before(() => {
|
||||
cy.visit('/demos/Guide/StoreContent/ExportJSON')
|
||||
cy.visit('/demos/Guide/Content/ExportJSON')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
7
docs/src/demos/Guide/Content/GenerateHTML/index.spec.js
Normal file
7
docs/src/demos/Guide/Content/GenerateHTML/index.spec.js
Normal file
@ -0,0 +1,7 @@
|
||||
context('/demos/Guide/Content/GenerateHTML', () => {
|
||||
before(() => {
|
||||
cy.visit('/demos/Guide/Content/GenerateHTML')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
@ -1,6 +1,6 @@
|
||||
context('/demos/Guide/StoreContent/ReadOnly', () => {
|
||||
context('/demos/Guide/Content/ReadOnly', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/demos/Guide/StoreContent/ReadOnly')
|
||||
cy.visit('/demos/Guide/Content/ReadOnly')
|
||||
})
|
||||
|
||||
it.skip('should be read-only', () => {
|
8
docs/src/docPages/api/utilities/html.md
Normal file
8
docs/src/docPages/api/utilities/html.md
Normal file
@ -0,0 +1,8 @@
|
||||
# HTML
|
||||
TODO
|
||||
|
||||
## Source code
|
||||
[packages/html/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/html/)
|
||||
|
||||
## Usage
|
||||
<demo name="Guide/Content/GenerateHTML" highlight="6,43-48"/>
|
@ -1,4 +1,4 @@
|
||||
# Store content
|
||||
# Export content
|
||||
|
||||
## toc
|
||||
|
||||
@ -40,7 +40,7 @@ editor.setContent({
|
||||
|
||||
Here is an interactive example where you can see that in action:
|
||||
|
||||
<demo name="Guide/StoreContent/ExportJSON" :show-source="false"/>
|
||||
<demo name="Guide/Content/ExportJSON" :show-source="false"/>
|
||||
|
||||
### Option 2: HTML
|
||||
HTML can be easily rendered in other places, for example in emails and it’s wildly used, so it’s probably easier to switch the editor at some point. Anyway, every editor instance provides a method to get HTML from the current document:
|
||||
@ -64,7 +64,7 @@ editor.commands.setContent(`<p>Example Text</p>`)
|
||||
|
||||
Use this interactive example to fiddle around:
|
||||
|
||||
<demo name="Guide/StoreContent/ExportHTML" :show-source="false"/>
|
||||
<demo name="Guide/Content/ExportHTML" :show-source="false"/>
|
||||
|
||||
### Not an option: Markdown
|
||||
Unfortunately, **tiptap doesn’t support Markdown as an input or output format**. We considered to add support for it, but those are the reasons why we decided to not do it:
|
||||
@ -101,7 +101,7 @@ const editor = new Editor({
|
||||
### Option 1: Read-only instance of tiptap
|
||||
To render the saved content, set the editor to read-only. That’s how you can achieve the exact same rendering as it’s in the editor, without duplicating your CSS and other code.
|
||||
|
||||
<demo name="Guide/StoreContent/ReadOnly" highlight="3-6,22,28,41-47" />
|
||||
<demo name="Guide/Content/ReadOnly" highlight="3-6,22,28,41-47" />
|
||||
|
||||
### Option 2: Generate HTML from ProseMirror JSON
|
||||
If you need to render the content on the server side, for example to generate the HTML for a blog post which has been written in tiptap, you’ll probably want to do just that without an actual editor instance.
|
||||
@ -112,7 +112,7 @@ That’s what the `generateHTML()` is for. It’s a helper function which render
|
||||
Import a lightweight implementation of `generateHTML()` from `@tiptap/core` if you’re using the function in a browser context only.
|
||||
:::
|
||||
|
||||
<demo name="Api/Schema/GenerateHTML" highlight="6,43-48"/>
|
||||
<demo name="Guide/Content/GenerateHTML" highlight="6,43-48"/>
|
||||
|
||||
## Migration
|
||||
If you’re migrating existing content to tiptap we would recommend to get your existing output to HTML. That’s probably the best format to get your initial content into tiptap, because ProseMirror ensures there is nothing wrong with it. Even if there are some tags or attributes that aren’t allowed (based on your configuration), tiptap just throws them away quietly.
|
@ -37,7 +37,7 @@ The same applies to every aspect of an existing extension, except to the name. L
|
||||
### Name
|
||||
The extension name is used in a whole lot of places and changing it isn’t too easy. If you want to change the name of an existing extension, we would recommended to copy the whole extension and change the name in all occurrences.
|
||||
|
||||
The extension name is also part of the JSON. If you [store your content as JSON](/guide/store-content#option-1-json), you need to change the name there too.
|
||||
The extension name is also part of the JSON. If you [store your content as JSON](/guide/content#option-1-json), you need to change the name there too.
|
||||
|
||||
### Settings
|
||||
All settings can be configured through the extension anyway, but if you want to change the default settings, for example to provide a library on top of tiptap for other developers, you can do it like that:
|
||||
|
@ -83,8 +83,8 @@
|
||||
- title: Accessibility
|
||||
link: /guide/accessibility
|
||||
type: draft
|
||||
- title: Store content
|
||||
link: /guide/store-content
|
||||
- title: Export content
|
||||
link: /guide/content
|
||||
- title: Collaborative editing
|
||||
link: /guide/collaborative-editing
|
||||
type: pro
|
||||
@ -208,10 +208,14 @@
|
||||
link: /api/extensions/typography
|
||||
- title: Utilities
|
||||
link: /api/utilities
|
||||
redirect: /api/utilities/suggestion
|
||||
redirect: /api/utilities/html
|
||||
items:
|
||||
- title: HTML
|
||||
link: /api/utilities/html
|
||||
type: draft
|
||||
- title: Suggestion
|
||||
link: /api/utilities/suggestion
|
||||
type: new
|
||||
- title: Events
|
||||
link: /api/events
|
||||
- title: Schema
|
||||
|
Loading…
Reference in New Issue
Block a user