You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you show example your slate with Next.js?
Markdown with Toolbar and serialize/deserializer into Markdown (or HTML) format
My sample doesn't work:
// @flow
import React from "react";
import ReactDOM from "react-dom";
import { Value } from "slate";
import Editor from "slate-md-editor";
const initialValue = Value.fromJSON({
document: {
nodes: [
{
object: "block",
type: "paragraph",
nodes: [
{
object: "text",
leaves: [
{
text: "A line of text in a paragraph."
}
]
}
]
}
]
}
});
class DemoEditor extends React.Component {
// Set the initial state when the app is first constructed.
state = {
value: initialValue
};
render() {
const { value } = this.state;
const onChange = ({ value }) => this.setState({ value });
return (
<div style={{ margin: "20px" }}>
<Editor value={value} onChange={this.onChange} />;
</div>
);
}
}
export default DemoEditor
The text was updated successfully, but these errors were encountered:
Can you show example your slate with Next.js?
Markdown with Toolbar and serialize/deserializer into Markdown (or HTML) format
My sample doesn't work:
The text was updated successfully, but these errors were encountered: