mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Better blockquote button in Markdown editor when non-traditional markdown linebreaks
are enabled.
This commit is contained in:
22
vendor/assets/javascripts/Markdown.Editor.js
vendored
22
vendor/assets/javascripts/Markdown.Editor.js
vendored
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user