mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 10:51:44 +02:00
rename Node.text
to Node.string
(#3341)
This commit is contained in:
@@ -116,8 +116,8 @@ import { Node } from 'slate'
|
||||
const serialize = value => {
|
||||
return (
|
||||
value
|
||||
// Return the text content of each paragraph in the value's children.
|
||||
.map(n => Node.text(n))
|
||||
// Return the string content of each paragraph in the value's children.
|
||||
.map(n => Node.string(n))
|
||||
// Join them all with line breaks denoting paragraphs.
|
||||
.join('\n')
|
||||
)
|
||||
|
Reference in New Issue
Block a user