WIP: toolbars
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<title>Editor</title>
|
||||
<style type="text/css" media="screen">
|
||||
@@ -28,7 +28,7 @@
|
||||
<script src="src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var buildDom = ace.require("ace/lib/dom").buildDom;
|
||||
var editor = ace.edit();
|
||||
var editor = ace.edit("editor");
|
||||
editor.setOptions({
|
||||
mode: "ace/mode/text",
|
||||
theme: "ace/theme/twilight",
|
||||
@@ -88,21 +88,7 @@
|
||||
onclick: function() {
|
||||
editor.redo();
|
||||
}
|
||||
}, "redo"],
|
||||
["button", {
|
||||
style: "font-weight: bold",
|
||||
onclick: function() {
|
||||
editor.insertSnippet("**${1:$SELECTION}**");
|
||||
editor.renderer.scrollCursorIntoView()
|
||||
}
|
||||
}, "bold"],
|
||||
["button", {
|
||||
style: "font-style: italic",
|
||||
onclick: function() {
|
||||
editor.insertSnippet("*${1:$SELECTION}*");
|
||||
editor.renderer.scrollCursorIntoView()
|
||||
}
|
||||
}, "Italic"],
|
||||
}, "redo"]
|
||||
], document.body, refs);
|
||||
document.body.appendChild(editor.container)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user