wiki.Colivre.net/Aurium/Games/ Esse site é Legal Demais para Internet Explorer

Aurium :: Games :: EditTemplate

%TMPL:DEF{"this-topic-only"}%
%TMPL:END%
%TMPL:INCLUDE{"edit"}%

%TMPL:DEF{"formend"}%%TMPL:P{"formparameters"}%
</form></div><!-- /foswikiFormHolder-->
<script src="jar:%PUBURL%/%WEB%/EditTemplate/ace-0.2.0.jar!/ace-0.2.0/src/ace.js"></script>
<script src="jar:%PUBURL%/%WEB%/EditTemplate/ace-0.2.0.jar!/ace-0.2.0/src/theme-twilight.js"></script>
<script src="jar:%PUBURL%/%WEB%/EditTemplate/ace-0.2.0.jar!/ace-0.2.0/src/mode-javascript.js"></script>
<script src="jar:%PUBURL%/%WEB%/EditTemplate/ace-0.2.0.jar!/ace-0.2.0/src/mode-css.js"></script>
<style>
#ace-box {
  height: 500px;
  position: relative;
}
#ace-editor {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background: #F4F4F4;
}
</style>
<script>
var textarea = $('#topic');
var editBox = $('<div id="ace-box"></div>').insertBefore('#topic')[0];
var editor = ace.edit( $('<div id="ace-editor"></div>').appendTo(editBox)[0] );
//editor.setTheme("ace/theme/twilight");
if ( /JS$/.test('%TOPIC%') ) {
  var JavaScriptMode = require("ace/mode/javascript").Mode;
  editor.getSession().setMode(new JavaScriptMode());
}
if ( /CSS$/.test('%TOPIC%') ) {
  var CSSMode = require("ace/mode/css").Mode;
  editor.getSession().setMode(new CSSMode());
}
editor.getSession().setValue(textarea.val());
editor.getSession().on('change', function(){
  textarea.val(editor.getSession().getValue());
});
textarea.hide();
</script>
%TMPL:END%
%TMPL:DEF{"this-topic-only"}%
%TMPL:END%

DiggThis

Copyright © 2004 - 2019 Aurélio A. Heckert
Conteúdo licenciado sob Creative Commons by-nc-sa