Fix Playground's gutter overflow

This commit is contained in:
Liang Ding 2015-03-25 16:00:59 +08:00
parent 003a94ba3f
commit 39c85c03a1
2 changed files with 8 additions and 6 deletions

View File

@ -184,8 +184,8 @@ var playground = {
".": "autocompleteAfterDot"
}
});
$("#editorDiv").show();
playground.editor.setOption("gutters", ["CodeMirror-lint-markers", "CodeMirror-foldgutter"]);
$(window).resize(function () {
playground._resize();
@ -196,7 +196,7 @@ var playground = {
} else {
playground.editor.setSize("auto", $("#editor").height() + "px");
}
var hovered = false;
$(".menu .ico-share").hover(function () {
$(".menu .share-panel").show();

View File

@ -9,8 +9,10 @@
<meta name="author" content="B3log">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/codemirror.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{$.conf.StaticServer}}/static/js/overwrite/codemirror/theme/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/hint/show-hint.css">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/foldgutter.css">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/dialog/dialog.css">
<link rel="stylesheet" href="{{$.conf.StaticServer}}/static/js/overwrite/codemirror/theme/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/dialog.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/base.css?{{.conf.StaticResourceVersion}}">
@ -63,8 +65,8 @@
</div>
</div>
<div class="fn-clear">
<div id="editorDiv" class="fn-none">
<textarea rows="20" id='editor'>{{.code}}</textarea>
<div id="editorDiv">
<textarea rows="20" id='editor' class="fn-none">{{.code}}</textarea>
</div>
<textarea id="output" rows="20" readonly="readonly" ></textarea>
</div>