编辑器不换行

This commit is contained in:
fofolee 2020-07-19 21:13:59 +08:00
parent ff56ae788e
commit fa40213e97
3 changed files with 16 additions and 14 deletions

View File

@ -354,7 +354,7 @@
<span id="beautifyCode" class="footBtn robot">格式化</span>
</span>
</p>
<textarea id="cmd" placeholder="◆基础◆\nquickcommand环境下点击“﹢按键”来执行模拟按键的操作;点击“﹢动作”添加打开软件,访问网址等常用动作\n◆进阶◆\nquickcommand可使用nodejs、electron、uTools、quickCommand的api详情查看文档\n其他脚本本机装了相应环境即可执行可以直接拖放脚本文件至此处可在脚本参数输入框处填写传递给脚本的参数\ncustom可以手动设置解释器路径、参数、脚本后缀及编码方式\n◆快捷键◆\n支持VSCode快捷键\nAlt+Enter 全屏\nCtrl+B 运行\nCtrl+F 搜索\nShift+Alt+F 格式化仅JS/PY"></textarea>
<textarea id="cmd" placeholder="◆基础◆\nquickcommand环境下点击“﹢按键”来执行模拟按键的操作;点击“﹢动作”添加打开软件,访问网址等常\n用动作\n◆进阶◆\nquickcommand可使用nodejs、electron、uTools、quickCommand的api详情查看文档\n其他脚本本机装了相应环境即可执行可以直接拖放脚本文件至此处可在脚本参数输入框处填写传递\n给脚本的参数\ncustom可以手动设置解释器路径、参数、脚本后缀及编码方式\n◆快捷键◆\n支持VSCode快捷键\nAlt+Enter 全屏\nCtrl+B 运行\nCtrl+F 搜索\nShift+Alt+F 格式化仅JS/PY"></textarea>
<p class="bottom">
<img id="win32" class="platform" src="./img/win32.svg">
<img id="darwin" class="platform" src="./img/darwin.svg">
@ -439,7 +439,7 @@
window.editor = CodeMirror.fromTextArea(document.getElementById("cmd"), {
lineNumbers: true,
matchBrackets: true,
lineWrapping: true,
// lineWrapping: true,
autoCloseBrackets: true,
styleActiveLine: true,
keyMap: "sublime",
@ -467,7 +467,6 @@
"Shift-Alt-Down": "duplicateLine"
}
});
window.editor.on("change", showHint);
window.editor.setOption("mode", 'javascript');
}

View File

@ -114,18 +114,18 @@
/*滚动条*/
::-webkit-scrollbar {
width: 6px;
width: 4px;
height: 4px;
}
::-webkit-scrollbar-thumb {
background-color: rgb(153, 153, 153);
height: 30px;
border-radius: 7px;
background-color: #616161;
border: none;
}
::-webkit-scrollbar-track-piece {
background-color: rgb(87, 87, 87);
::-webkit-scrollbar-track-piece,
.CodeMirror-scrollbar-filler {
background-color: #0000
}
/*swal2*/
@ -164,4 +164,4 @@ body.swal2-no-backdrop .swal2-container > .swal2-modal {
background: #242729;
color: #e4e4e4;
border: 1px solid #403f3f;
}
}

View File

@ -505,11 +505,14 @@ input::-webkit-input-placeholder {
z-index: 9;
}
#options #customize .CodeMirror-scroll {
box-sizing: unset;
#options #customize .CodeMirror-hscrollbar,
#options #customize .CodeMirror-vscrollbar {
outline: none;
}
#options #customize .CodeMirror * {
box-sizing: initial;
}
#options #customize .CodeMirror:hover {
border: 1px solid #9e9e9ec7;
@ -562,7 +565,7 @@ input::-webkit-input-placeholder {
}
#options #customize .platform {
max-width: 30px;
max-width: 26px;
cursor: pointer;
}