From 83eac2ddd8cef5de176d5d20ae23ed443c13ddff Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 28 Oct 2020 17:31:51 +0100 Subject: [PATCH] rename demo, add more content --- .../{GenerateHtml => GenerateHTML}/index.vue | 15 ++------------- docs/src/docPages/api/schema.md | 10 ++++------ 2 files changed, 6 insertions(+), 19 deletions(-) rename docs/src/demos/Api/Schema/{GenerateHtml => GenerateHTML}/index.vue (63%) diff --git a/docs/src/demos/Api/Schema/GenerateHtml/index.vue b/docs/src/demos/Api/Schema/GenerateHTML/index.vue similarity index 63% rename from docs/src/demos/Api/Schema/GenerateHtml/index.vue rename to docs/src/demos/Api/Schema/GenerateHTML/index.vue index e0e9226d..875fe64a 100644 --- a/docs/src/demos/Api/Schema/GenerateHtml/index.vue +++ b/docs/src/demos/Api/Schema/GenerateHTML/index.vue @@ -1,13 +1,9 @@ diff --git a/docs/src/docPages/api/schema.md b/docs/src/docPages/api/schema.md index a0bc6b8b..6db22020 100644 --- a/docs/src/docPages/api/schema.md +++ b/docs/src/docPages/api/schema.md @@ -126,15 +126,13 @@ const schema = getSchema([ ## Generate HTML from ProseMirror JSON -If you need to render the content on the server side, e. g. for a blog post that was written with tiptap, you’ll probably need a way to do just that without an actual editor instance. +If you need to render the content on the server side, for example to render a blog post which was written with tiptap, you’ll probably need a way to do just that without an actual editor instance. That’s what `generateHTML()` is for. It’s a utility function that renders HTML without an actual editor instance. -That’s what `generategetHTML()` is for. It’s a utility function that renders HTML without an actual editor instance. - -:::warning Work in progress -Currently, that works only in the browser (client side), but we plan to bring this to Node.js (to use it on the server side). +:::info Browser-only rendering +Import a lightweight implementation from `@tiptap/core` if you’re using the function in a browser context only. ::: - + ### Converting JSON<>HTML with PHP