mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-30 05:14:28 -06:00
Fix issue with selection after deselecting italic
This commit is contained in:
parent
df988b2f54
commit
da30c7f08f
2
simplemde.min.css
vendored
2
simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
12
simplemde.min.js
vendored
12
simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
14
source files/README.md
Normal file
14
source files/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# How to compile
|
||||
Minify the JS in this order:
|
||||
|
||||
1. `codemirror/codemirror.js`
|
||||
1. `codemirror/continuelist.js`
|
||||
1. `codemirror/markdown.js`
|
||||
1. `codemirror/xml.js`
|
||||
1. `marked.js`
|
||||
1. `markdownify.js`
|
||||
|
||||
Minify the CSS in this order:
|
||||
|
||||
1. `theme.css`
|
||||
1. `font-awesome.css`
|
@ -334,8 +334,13 @@ function _toggleBlock(editor, type, start_chars, end_chars) {
|
||||
ch: 99999999999999
|
||||
});
|
||||
|
||||
startPoint.ch -= 2;
|
||||
endPoint.ch -= 2;
|
||||
if (type == "bold") {
|
||||
startPoint.ch -= 2;
|
||||
endPoint.ch -= 2;
|
||||
} else if (type == "italic") {
|
||||
startPoint.ch -= 1;
|
||||
endPoint.ch -= 1;
|
||||
}
|
||||
} else {
|
||||
text = cm.getSelection();
|
||||
if (type == "bold") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user