We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7aedb86 + 62caea6 commit 91a27e3Copy full SHA for 91a27e3
src/js/simplemde.js
@@ -166,6 +166,12 @@ function getState(cm, pos) {
166
ret.strikethrough = true;
167
} else if(data === "comment") {
168
ret.code = true;
169
+ } else if(data === "link") {
170
+ ret.link = true;
171
+ } else if(data === "tag") {
172
+ ret.image = true;
173
+ } else if(data.match(/^header(\-[1-6])?$/)) {
174
+ ret[data.replace("header", "heading")] = true;
175
}
176
177
return ret;
@@ -1545,4 +1551,10 @@ SimpleMDE.prototype.isFullscreenActive = function() {
1545
1551
return cm.getOption("fullScreen");
1546
1552
};
1547
1553
1554
+SimpleMDE.prototype.getState = function() {
1555
+ var cm = this.codemirror;
1556
+
1557
+ return getState(cm);
1558
+};
1559
1548
1560
module.exports = SimpleMDE;
0 commit comments