mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 16:32:40 +00:00
Added QoL, where if errors are present, we run the checker on text input to give quicker feedback
This commit is contained in:
@@ -86,9 +86,15 @@ var EditPage = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleTextChange : function(text){
|
handleTextChange : function(text){
|
||||||
|
|
||||||
|
//If there are errors, run the validator on everychange to give quick feedback
|
||||||
|
var htmlErrors = this.state.htmlErrors;
|
||||||
|
if(htmlErrors.length) htmlErrors = Markdown.validate(text);
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
text : text,
|
text : text,
|
||||||
isPending : true
|
isPending : true,
|
||||||
|
htmlErrors : htmlErrors
|
||||||
});
|
});
|
||||||
|
|
||||||
(this.hasChanges() ? this.debounceSave() : this.debounceSave.cancel());
|
(this.hasChanges() ? this.debounceSave() : this.debounceSave.cancel());
|
||||||
|
|||||||
Reference in New Issue
Block a user