我正在使用stackoverflow markdown编辑器,但问题是编辑器启动时光标已经前进了几个空格,并且处于代码输入模式。代码是
var converter1 = Markdown.getSanitizingConverter();
converter1.hooks.chain("preBlockGamut", function (text, rbg) {
return text.replace(/^ {0,3}""" *\n((?:.*?\n)+?) {0,3}""" *$/gm, function (whole, inner) {
return "<blockquote>" + rbg(inner) + "</blockquote>\n";
});
});
var editor1 = new Markdown.Editor(converter1);
editor1.run();
为什么会这样?