Skip to content

wiki - editor - add buttons 'inline code', 'empty checkbox', 'checked checkbox' #7243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 7, 2019
Merged
Prev Previous commit
Next Next commit
consistent usage of let/const in added code
  • Loading branch information
Cherrg authored Jun 29, 2019
commit 4217ad208dd1e17c1fea4ccd7373f887f8599c15
4 changes: 2 additions & 2 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1164,10 +1164,10 @@ function initWikiForm() {
name: "code-inline",
action: function(e){
let cm = e.codemirror;
var selection = cm.getSelection();
let selection = cm.getSelection();
cm.replaceSelection("`" + selection + "`");
if (!selection) {
var cursorPos = cm.getCursor();
let cursorPos = cm.getCursor();
cm.setCursor(cursorPos.line, cursorPos.ch - 1);
}
cm.focus();
Expand Down