react-templates/playground/playground-fiddle.rt

37 lines
1.6 KiB
Plaintext
Raw Normal View History

<rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/>
2014-12-04 10:15:19 +01:00
<!--suppress ALL -->
<div class="playground">
2014-12-08 11:45:32 +01:00
<div class="fiddle-row">
<div class="code-area">
2014-12-10 13:14:22 +01:00
<CodeEditor ref="editorRT" id="editor-rt" class="large-text-area" style="border: {this.validHTML ? '1px solid black' : '2px solid red'};"
value="{this.state.templateHTML}"
mode="html"
onChange="(evt) => this.setState({'templateHTML':evt.target.value})" />
</div>
<div class="code-area">
2014-12-10 13:14:22 +01:00
<CodeEditor ref="editorCode" id="editor-code" class="large-text-area" style="border: {this.validProps ? '1px solid black' : '2px solid red'};"
value="{this.state.templateProps}"
mode="javascript"
onChange="(evt) => this.setState({'templateProps':evt.target.value})" />
</div>
2014-12-04 10:15:19 +01:00
</div>
2014-12-08 11:45:32 +01:00
<div class="fiddle-row">
<div class="code-area">
2014-12-08 11:45:32 +01:00
<CodeEditor id="editor-generated" class="large-text-area" style="border:1px solid black;"
value="{this.templateSource}"
mode="javascript"
readOnly="{true}" />
</div>
2014-12-09 14:31:25 +01:00
<div id="result-container" class="result-area">
2014-12-08 13:48:12 +01:00
<div id="result-area" key="result-area" class="well">
<h2>Preview:</h2>
<form class="sample-view" onSubmit="(e) => e.preventDefault();">
<this.sample key="sample">
</this.sample>
</form>
</div>
</div>
2014-12-04 10:15:19 +01:00
</div>
<!--<br style="clear:both">-->
2014-12-04 10:15:19 +01:00
</div>