add node view examples (wip)

This commit is contained in:
Hans Pagel 2020-11-27 17:25:01 +01:00
parent 996c29bcf7
commit 1c43bc89f9

View File

@ -6,10 +6,41 @@
## Simple ## Simple
```html
<div class="Prosemirror" contenteditable="true">
<p>text</p>
<node-view>text</node-view>
<p>text</p>
</div>
```
## Without content ## Without content
```html
<div class="Prosemirror" contenteditable="true">
<p>text</p>
<node-view contenteditable="false">text</node-view>
<p>text</p>
</div>
```
## Advanced node views with content ## Advanced node views with content
```html
<div class="Prosemirror" contenteditable="true">
<p>text</p>
<node-view>
<div>
non-editable text
</div>
<div>
editable text
</div>
</node-view>
<p>text</p>
</div>
```
<!-- <!--
## Node views with plain JavaScript ## Node views with plain JavaScript