Better blockquote button in Markdown editor when non-traditional markdown linebreaks

are enabled.
This commit is contained in:
Robin Ward
2013-10-28 12:44:10 -04:00
parent 098673ecc0
commit 26a8156f08
2 changed files with 47 additions and 1 deletions

View File

@@ -18,6 +18,17 @@
// ]
// };
//
// To extend actions:
//
// window.PagedownCustom = {
// customActions: {
// "doBlockquote": function(chunk, postProcessing, oldDoBlockquote) {
// console.log('custom blockquote called!');
// return oldDoBlockquote.call(this, chunk, postProcessing);
// }
// }
// };
(function () {
@@ -1470,6 +1481,17 @@
}
function bindCommand(method) {
if (typeof PagedownCustom != "undefined" && PagedownCustom.customActions) {
var custom = PagedownCustom.customActions[method];
if (custom) {
return function() {
var args = Array.prototype.slice.call(arguments);
args.push(commandManager[method]);
return custom.apply(commandManager, args);
};
}
}
if (typeof method === "string")
method = commandManager[method];
return function () { method.apply(commandManager, arguments); }