Skip to content

Commit 21fab1d

Browse files
Merge dimodi-patch-1-editor-3036 into production (#3038)
* docs(Editor): Improve schema overview * Update overview.md --------- Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
1 parent 988a9ad commit 21fab1d

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

components/editor/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The Blazor HTML Editor has a `Value` parameter, similar to other input component
5656

5757
An empty string is a valid initial Editor `Value`, but after the user interacts with the component, the minimal component `Value` is at least an empty element (usually `"<p></p>"`). Note that [the Editor and the browser treat empty paragraphs differently](slug:editor-kb-missing-br-tags-in-value).
5858

59-
The Editor manages its content and `Value` depending on a [customizable schema](#prosemirror-schema-and-plugins), which defines the allowed HTML tags and attributes. The component strips all other tags and attributes for compliance and security reasons.
59+
The Editor manages its content and `Value` depending on a [customizable schema](#prosemirror-schema-and-plugins). The component strips all other tags and attributes for compliance and security reasons.
6060

6161

6262
## Security
@@ -90,7 +90,7 @@ The Telerik UI for [Blazor Editor](https://www.telerik.com/blazor-ui/editor) use
9090

9191
## ProseMirror Schema and Plugins
9292

93-
The Editor uses a built-in <a href="https://prosemirror.net/docs/guide/#schema" target="_blank">ProseMirror Schema</a> containing some of the most common HTML tags and a set of predefined <a href="https://prosemirror.net/docs/ref/#state.Plugin_System" target="_blank">ProseMirror Plugins</a> for its basic functionalities. You can customize the default ProseMirror [Schema](slug:editor-prosemirror-schema-overview) and [Plugins](slug:editor-prosemirror-plugins) to achieve the desired functionality in the Editor for Blazor.
93+
The Editor uses a built-in [ProseMirror Schema](https://prosemirror.net/docs/guide/#schema) that includes most of the common HTML tags and a set of predefined [ProseMirror Plugins](https://prosemirror.net/docs/ref/#state.Plugin_System) for its basic functionalities. Find out how to customize the default ProseMirror [Schema](slug:editor-prosemirror-schema-overview) and [Plugins](slug:editor-prosemirror-plugins) to achieve the desired functionality in the Editor for Blazor.
9494

9595
## Editor Parameters
9696

components/editor/prosemirror-schema/overview.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@ position: 0
1010

1111
# ProseMirror Schema Overview
1212

13-
The Telerik UI for Blazor Editor component is based on the <a href="https://prosemirror.net/" target="_blank">ProseMirror library</a>. ProseMirror provides a set of tools and concepts for building rich textual editors, using user interface inspired by the What-You-See-Is-What-You-Get (WYSIWYG).
13+
The Telerik UI for Blazor Editor component is based on the [ProseMirror library](https://prosemirror.net/). ProseMirror provides a set of tools and concepts for building rich textual editors, using user interface inspired by the What-You-See-Is-What-You-Get (WYSIWYG).
1414

1515
## Schema Concept
1616

17-
ProseMirror defines its own data structure, the <a href="https://prosemirror.net/docs/ref/#model.Node" target="_blank">`Node`</a>, to represent content documents. The <a href="https://prosemirror.net/docs/guide/#doc" target="_blank">ProseMirror document</a> is a tree-like structure comprised of nodes. A document is an instance of `Node` with children that are also instances of `Node`.
17+
ProseMirror defines its own data structure, the [`Node`](https://prosemirror.net/docs/ref/#model.Node), to represent content documents. The [ProseMirror document](https://prosemirror.net/docs/guide/#doc) is a tree-like structure comprised of nodes. A document is an instance of `Node` with children that are also instances of `Node`.
1818

19-
Each ProseMirror `document` conforms to a specific <a href="https://prosemirror.net/docs/guide/#schema" target="_blank">schema</a>. Document schemas allow you to edit documents with a custom structure without writing your own editor from scratch.
19+
Each ProseMirror `document` conforms to a specific [schema](https://prosemirror.net/docs/guide/#schema). Document schemas allow you to edit documents with a custom structure without writing your own editor from scratch.
2020

21-
The schema describes all nodes that may occur in the document, the way they are nested, and any marks applied to them. A mark is a piece of information that can be attached to a node. For example, emphasized text, text in code block or a link. It has a type and optionally a set of attributes that provide further information (such as the target of the link).
21+
The Prosemirror schema describes:
2222

23-
For more details, refer to the <a href="https://prosemirror.net/docs/guide/#schema" target="_blank">ProseMirror schema guide</a>.
23+
* All HTML elements and attributes that may occur in the document.
24+
* What tag nesting is allowed.
25+
* What is the order or the HTML attributes.
26+
* What marks can be applied to a HTML node. A mark is a piece of information that can be attached to a node. For example, emphasized text, text in code block or a link. It has a type and optionally a set of attributes that provide further information (such as the target of the link).
27+
28+
As a result, the Editor may automatically modify its initial `Value` on first user interaction.
29+
30+
For more details, refer to the [ProseMirror schema guide](https://prosemirror.net/docs/guide/#schema).
2431

2532
## Editor Schema
2633

0 commit comments

Comments
 (0)