tiptap/docs/src/docPages/guide/advanced-node-views.md

59 lines
735 B
Markdown
Raw Normal View History

2020-11-06 21:49:40 +08:00
# Advanced node views
2020-11-06 23:25:46 +08:00
## toc
## Introduction
2020-11-28 00:25:32 +08:00
TODO
2020-11-27 21:58:28 +08:00
## Simple
2020-11-28 00:25:01 +08:00
```html
<div class="Prosemirror" contenteditable="true">
<p>text</p>
<node-view>text</node-view>
<p>text</p>
</div>
```
2020-11-27 21:58:28 +08:00
## Without content
2020-11-28 00:25:01 +08:00
```html
<div class="Prosemirror" contenteditable="true">
<p>text</p>
<node-view contenteditable="false">text</node-view>
<p>text</p>
</div>
```
2020-11-27 21:58:28 +08:00
## Advanced node views with content
2020-11-28 00:25:01 +08:00
```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>
```
2020-11-27 21:58:28 +08:00
<!--
2020-11-06 23:25:46 +08:00
## Node views with plain JavaScript
### HTML
### Content
### JavaScript
### Events
## Use Vue.js components
2020-11-27 21:58:28 +08:00
-->