mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-17 08:38:18 +00:00
add line height for ace
This commit is contained in:
@@ -798,6 +798,7 @@ LeaAce = {
|
|||||||
$pre.attr("contenteditable", false); // ? 避免tinymce编辑
|
$pre.attr("contenteditable", false); // ? 避免tinymce编辑
|
||||||
var aceEditor = ace.edit(id);
|
var aceEditor = ace.edit(id);
|
||||||
|
|
||||||
|
aceEditor.container.style.lineHeight = 1.5;
|
||||||
aceEditor.setTheme("ace/theme/tomorrow");
|
aceEditor.setTheme("ace/theme/tomorrow");
|
||||||
|
|
||||||
var brush = me.getPreBrush($pre);
|
var brush = me.getPreBrush($pre);
|
||||||
@@ -808,6 +809,9 @@ LeaAce = {
|
|||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
b = b || "javascript";
|
b = b || "javascript";
|
||||||
|
if (b == 'false') {
|
||||||
|
b = 'javascript';
|
||||||
|
}
|
||||||
aceEditor.session.setMode("ace/mode/" + b);
|
aceEditor.session.setMode("ace/mode/" + b);
|
||||||
aceEditor.session.setOption("useWorker", false); // 不用语法检查
|
aceEditor.session.setOption("useWorker", false); // 不用语法检查
|
||||||
// retina
|
// retina
|
||||||
@@ -817,6 +821,9 @@ LeaAce = {
|
|||||||
else {
|
else {
|
||||||
aceEditor.setFontSize("14px");
|
aceEditor.setFontSize("14px");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
aceEditor.getSession().setUseWorker(false); // 不用语法检查
|
aceEditor.getSession().setUseWorker(false); // 不用语法检查
|
||||||
aceEditor.setOption("showInvisibles", false); // 不显示空格, 没用
|
aceEditor.setOption("showInvisibles", false); // 不显示空格, 没用
|
||||||
aceEditor.setShowInvisibles(false); // OK 不显示空格
|
aceEditor.setShowInvisibles(false); // OK 不显示空格
|
||||||
@@ -825,6 +832,7 @@ LeaAce = {
|
|||||||
aceEditor.setAutoScrollEditorIntoView(true);
|
aceEditor.setAutoScrollEditorIntoView(true);
|
||||||
aceEditor.setReadOnly(Note.readOnly);
|
aceEditor.setReadOnly(Note.readOnly);
|
||||||
aceEditor.setOption("maxLines", 10000);
|
aceEditor.setOption("maxLines", 10000);
|
||||||
|
|
||||||
aceEditor.commands.addCommand({
|
aceEditor.commands.addCommand({
|
||||||
name: "undo",
|
name: "undo",
|
||||||
bindKey: {win: "Ctrl-z", mac: "Command-z"},
|
bindKey: {win: "Ctrl-z", mac: "Command-z"},
|
||||||
|
Reference in New Issue
Block a user