mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
19 lines
453 B
Plaintext
19 lines
453 B
Plaintext
<script>
|
|
module.exports = {
|
|
onInput: function(attrs) {
|
|
this.state = { code: '// Your code here', errorText: '' }
|
|
},
|
|
submit: function() {
|
|
this.state.errorText = 'Placeholder error'
|
|
}
|
|
}
|
|
</script>
|
|
<div class="code-editor">
|
|
<h3>Code Editor</h3>
|
|
<div>
|
|
<textarea>${state.code}</textarea>
|
|
</div>
|
|
<button on-click('submit')>Run Code</button>
|
|
<pre class="error-message">${state.errorText}</pre>
|
|
</div>
|