mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Indenting;
Add horizontalRule to the replaceTexts option
This commit is contained in:
parent
07196a532f
commit
f8fc4d2b12
@ -266,7 +266,7 @@ function toggleOrderedList(editor) {
|
|||||||
function drawLink(editor) {
|
function drawLink(editor) {
|
||||||
var cm = editor.codemirror;
|
var cm = editor.codemirror;
|
||||||
var stat = getState(cm);
|
var stat = getState(cm);
|
||||||
var options = editor.options;
|
var options = editor.options;
|
||||||
_replaceSelection(cm, stat.link, options.replaceTexts.link);
|
_replaceSelection(cm, stat.link, options.replaceTexts.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,8 +276,8 @@ function drawLink(editor) {
|
|||||||
function drawImage(editor) {
|
function drawImage(editor) {
|
||||||
var cm = editor.codemirror;
|
var cm = editor.codemirror;
|
||||||
var stat = getState(cm);
|
var stat = getState(cm);
|
||||||
var options = editor.options;
|
var options = editor.options;
|
||||||
_replaceSelection(cm, stat.image, options.replaceTexts.image);
|
_replaceSelection(cm, stat.image, options.replaceTexts.image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -286,8 +286,8 @@ function drawImage(editor) {
|
|||||||
function drawHorizontalRule(editor) {
|
function drawHorizontalRule(editor) {
|
||||||
var cm = editor.codemirror;
|
var cm = editor.codemirror;
|
||||||
var stat = getState(cm);
|
var stat = getState(cm);
|
||||||
_replaceSelection(cm, stat.image, "", "\n\n-----\n\n");
|
var options = editor.options;
|
||||||
}
|
_replaceSelection(cm, stat.image, options.replaceTexts.HorizontalRule);}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -792,7 +792,8 @@ var toolbarBuiltInButtons = {
|
|||||||
|
|
||||||
var replaceTexts = {
|
var replaceTexts = {
|
||||||
link: ["[", "](http://)"],
|
link: ["[", "](http://)"],
|
||||||
image: [""]
|
image: [""],
|
||||||
|
horizontalRule: ["", "\n\n-----\n\n"]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user