Skip to content

Commit 7d3da8d

Browse files
committed
Don't select all editor text on render in admin
ACE editor selects all text on setValue by default unless a cursor position is passed as second param. This patch positions the cursor at the beginning of the document instead.
1 parent d8b2ea0 commit 7d3da8d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

martor/static/martor/js/martor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@
831831

832832
// Set initial value if has the content before.
833833
if (textareaId.val() != '') {
834-
editor.setValue(textareaId.val());
834+
editor.setValue(textareaId.val(), -1);
835835
}
836836
});// end each `mainMartor`
837837
};

0 commit comments

Comments
 (0)