Docs
Server-Side

Server-Side

Use Plate in server environment

Using Plate in a Server Environment

Plate can be utilized in server-side environments, enabling operations like content manipulation without a browser. This is particularly useful for scenarios such as generating static content, processing editor content on the server, or working with React Server Components.

Creating a Server-Side Editor

To use Plate on the server, you can leverage the createSlateEditorfunction. This allows you to create and manipulate Slate documents without a DOM environment.

Example: Generating Markdown in a React Server Component

Here's the output of Plate generating Markdown from a Slate value within a React Server Component:

🌳 Blocks

Easily create headings of various levels, from H1 to H6, to structure your content and make it more organized.

Create blockquotes to emphasize important information or highlight quotes from external sources.

javascript
1// Use code blocks to showcase code snippets 2function greet() { 3 console.info('Hello World!'); 4}

🌱 Marks

Add style and emphasis to your text using the mark plugins, which offers a variety of formatting options.

Make text bold, italic, underlined, or apply a combination of these styles for a visually striking effect.

Add ~~strikethrough~~ to indicate deleted or outdated content.

Write code snippets with inline code formatting for easy readability.