Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown editor improvements #574

Merged
merged 3 commits into from
Sep 1, 2017
Merged

Conversation

erquhart
Copy link
Contributor

@erquhart erquhart commented Sep 1, 2017

@@ -1,5 +1,6 @@
import uuid from 'uuid';
import { actions as notifActions } from 'redux-notifications';
import { serializeValues } from '../lib/serializeEntryValues';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this in #254.

@erquhart erquhart force-pushed the markdown-editor-improvements branch from 7d8e5b9 to efd0110 Compare September 1, 2017 19:05
Copy link
Contributor

@Benaiah Benaiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to fix the two comments I noted, but other than that LGTM.

@@ -13,9 +13,8 @@ export default class RawEditor extends React.Component {
* to plain text before Slate's Plain serializer can convert it to the
* Slate AST.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is no longer accurate, since there's no stringification in this method anymore.

@@ -27,15 +26,16 @@ export default class RawEditor extends React.Component {
this.setState({ editorState });
}

onChange = debounce(this.props.onChange, 250);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -27,15 +26,16 @@ export default class RawEditor extends React.Component {
this.setState({ editorState });
}

onChange = debounce(this.props.onChange, 250);

/**
* When the document value changes, serialize from Slate's AST back to plain
* text (which is Markdown), and then deserialize from that to a Remark MDAST,
* before passing up as the new value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is no longer accurate.

@erquhart erquhart force-pushed the markdown-editor-improvements branch from efd0110 to a05f876 Compare September 1, 2017 19:13
@erquhart erquhart force-pushed the markdown-editor-improvements branch from a05f876 to 75023d9 Compare September 1, 2017 19:16
@erquhart erquhart merged commit 86b094b into master Sep 1, 2017
@erquhart erquhart deleted the markdown-editor-improvements branch September 1, 2017 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants