pull/510/head
WittBulter 7 years ago
parent ca6b87f016
commit 827300b1ed

@ -1,25 +1,25 @@
{
"rules": {
"indent": [
2,
"tab"
],
// "indent": [
// 2,
// "tab"
// ],
"strict": 0,
"no-console": 0,
"quotes": [
2,
"double"
],
"semi": [
2,
"always"
]
"no-console": 0
// "quotes": [
// 2,
// "double"
// ],
// "semi": [
// 2,
// "never"
// ]
},
"env": {
"browser": true,
"node":true
},
"extends": "eslint:recommended",
// "extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -27,7 +27,7 @@ export default class Action {
*/
static drawLink (editor){
const cm = editor.codemirror;
const stat = getState(cm);
const stat = Base.getState(cm);
const options = editor.options;
let url = "http://";
if (options.promptURLs){
@ -181,8 +181,10 @@ export default class Action {
if (is_code === "single"){
// similar to some SimpleMDE _toggleBlock logic
let start = line.text.slice(0, cur_start.ch).replace("`", ""),
end = line.text.slice(cur_start.ch).replace("`", "");
let start = line.text.slice(0, cur_start.ch)
.replace("`", ""),
end = line.text.slice(cur_start.ch)
.replace("`", "");
cm.replaceRange(start + end, {
line: cur_start.line,
ch: 0
@ -542,10 +544,12 @@ export default class Action {
const cm = editor.codemirror;
Base.toggleHeading(cm, undefined, 1);
}
static toggleHeading2 (editor){
const cm = editor.codemirror;
Base.toggleHeading(cm, undefined, 2);
}
static toggleHeading3 (editor){
const cm = editor.codemirror;
Base.toggleHeading(cm, undefined, 3);
@ -598,10 +602,4 @@ export default class Action {
}
}

@ -4,7 +4,7 @@ import CodeMirrorSpellChecker from 'codemirror-spell-checker'
import marked from 'marked'
import 'codemirror/addon/edit/continuelist'
import 'codemirror/addon/display/fullscreen'
import 'codemirror/addon/mode/overla'
import 'codemirror/addon/mode/overlay'
import 'codemirror/addon/display/placeholder'
import 'codemirror/addon/selection/mark-selection'
import './codemirror/tablist'
@ -53,10 +53,14 @@ const createSep = () => {
}
const createTootlip = (title, action, shortcuts) => {
let actionName;
let tooltip = title;
if(action && shortcuts[utils.getBindingName(action)]) {
tooltip += " (" + utils.fixShortcut(shortcuts[actionName]) + ")"
if(action) {
actionName = utils.getBindingName(action);
if(shortcuts[actionName]) {
tooltip += " (" + utils.fixShortcut(shortcuts[actionName]) + ")";
}
}
return tooltip;
@ -69,6 +73,7 @@ const createTootlip = (title, action, shortcuts) => {
export class SimpleMDE extends Action {
constructor(options = {}) {
super()
// Used later to refer to it"s parent
options.parent = this;

Loading…
Cancel
Save