New to React, please point out if I've headed down the wrong track: I'm trying to build an HTML editor component, which so far looks like this:
var CopyEditor = React.createClass({
render: function(){
var pageBody = "<p>My HTML string ...";
return (
<form id="editForm" method="POST">
<textarea id="editor" name="body" value=pageBody />
<input type="submit" id="saveBt" value="save" class="button-primary" />
</form>
);
}
});
But I'm getting the following error in the console:
Uncaught Error: Parse Error: Line 6: Unexpected token ILLEGAL at http://localhost:8000/index.html
var pageBody = '
^
My HTML string is being generated on the Server, and there's a newline where the carot is pointing in the error message. What SHOULD I be doing?