Skip to content

Commit a4b273b

Browse files
committed
docs: ➕ update docs index.md and methods.md
1 parent 3d7f809 commit a4b273b

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

docs/content/api/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
- **Type:** `Delta | String`
1616
- **Default:** `{}`
1717

18-
Contents for the editor, can be plain `string` or `Delta` object, see [Quill Delta docs](https://quilljs.com/docs/delta/) for more details.
18+
Contents for the editor, can be `Delta` object, plain `text`, or `html` string, see [Quill Delta docs](https://quilljs.com/docs/delta/) for more details.
19+
20+
## contentType
21+
- **Type:** `"delta" | "html" | "text"`
22+
- **Default:** `delta`
23+
24+
VueQuill supports three content type `delta`, `html`, and `text`, and make sure to set contentType if you want to use `html` or plain `text` as your content
1925

2026
## enable
2127
- **Type:** `Boolean`

docs/content/api/methods.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ We highly recommend to call method when the quill editor ready, use @ready event
2222

2323
Returns the Quill instance that backs the editor. While you can freely use this to access methods such as `getText()`, `focus()`, and much [more](https://quilljs.com/docs/api/).
2424

25+
## getContents()
26+
27+
- **Return:** `content: string | Delta`
28+
29+
Returns the contents of the editor.
30+
31+
## setContents(content)
32+
33+
- **Parameter** `content: string | Delta`
34+
35+
To set the contents of the editor.
36+
2537
## getHTML()
2638

2739
- **Return:** `html: string`
@@ -33,3 +45,15 @@ We highly recommend to call method when the quill editor ready, use @ready event
3345
- **Parameter** `html: string`
3446

3547
To set the HTML contents of the editor.
48+
49+
## getText()
50+
51+
- **Return:** `text: string`
52+
53+
Returns the full text contents of the editor.
54+
55+
## setText(text)
56+
57+
- **Parameter** `text: string`
58+
59+
To set the text contents of the editor.

0 commit comments

Comments
 (0)