equal
deleted
inserted
replaced
1 import { Editor, Plain } from 'slate' |
1 import { Editor, Plain, Raw } from 'slate' |
2 import React from 'react' |
2 import React from 'react' |
3 |
3 |
4 /** |
4 /** |
5 * Define the default node type. |
5 * Define the default node type. |
6 */ |
6 */ |
104 |
104 |
105 asPlain = () => { |
105 asPlain = () => { |
106 return Plain.serialize(this.state.state); |
106 return Plain.serialize(this.state.state); |
107 } |
107 } |
108 |
108 |
|
109 asRaw = () => { |
|
110 return Raw.serialize(this.state.state); |
|
111 } |
|
112 |
109 clear = () => { |
113 clear = () => { |
110 const state = Plain.deserialize(''); |
114 const state = Plain.deserialize(''); |
111 this.onChange(state); |
115 this.onChange(state); |
112 } |
116 } |
113 |
117 |