2014-12-11 08:30:27 +01:00
|
|
|
<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">
|
2014-12-07 14:12:50 +01:00
|
|
|
<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'};"
|
2014-12-07 14:12:50 +01:00
|
|
|
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'};"
|
2014-12-07 14:12:50 +01:00
|
|
|
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">
|
2014-12-07 14:12:50 +01:00
|
|
|
<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;"
|
2014-12-07 14:12:50 +01:00
|
|
|
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>
|
2014-12-07 14:12:50 +01:00
|
|
|
</div>
|
2014-12-04 10:15:19 +01:00
|
|
|
</div>
|
2014-12-07 14:12:50 +01:00
|
|
|
<!--<br style="clear:both">-->
|
2014-12-04 10:15:19 +01:00
|
|
|
</div>
|