Created
May 26, 2018 17:51
-
-
Save mariapaulinar/cd8a0835cf021d159fe4fa596fb23131 to your computer and use it in GitHub Desktop.
Uso de editor ACE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<textarea name="contenido" style="display: none;"></textarea> | |
</form> | |
<div id="editor-codigo" style="height: 500px; width: 100%"></div> | |
<script> | |
var editor = ace.edit("editor-codigo"); | |
editor.setTheme("ace/theme/monokai"); | |
editor.session.setMode("ace/mode/html"); | |
editor.session.setMode("ace/mode/css"); | |
$("form").on("submit", function (e) { | |
$('textarea[name="contenido"]').val(editor.getValue()); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment