gdrive support
This commit is contained in:
parent
924646c6e9
commit
b65813486d
@ -333,15 +333,19 @@ var core = (function($) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
core.createEditor = function(textChangeCallback) {
|
core.createEditor = function(onTextChange) {
|
||||||
$("#wmd-button-bar").empty();
|
$("#wmd-button-bar").empty();
|
||||||
var converter = Markdown.getSanitizingConverter();
|
var converter = Markdown.getSanitizingConverter();
|
||||||
|
var firstChange = true;
|
||||||
converter.hooks.chain("preConversion", function (text) {
|
converter.hooks.chain("preConversion", function (text) {
|
||||||
textChangeCallback();
|
if(!firstChange) {
|
||||||
|
onTextChange();
|
||||||
|
}
|
||||||
return text;
|
return text;
|
||||||
});
|
});
|
||||||
var editor = new Markdown.Editor(converter);
|
var editor = new Markdown.Editor(converter);
|
||||||
editor.run();
|
editor.run();
|
||||||
|
firstChange = false;
|
||||||
|
|
||||||
$(".wmd-button-row").addClass("btn-group").find("li:not(.wmd-spacer)")
|
$(".wmd-button-row").addClass("btn-group").find("li:not(.wmd-spacer)")
|
||||||
.addClass("btn").css("left", 0).find("span").hide();
|
.addClass("btn").css("left", 0).find("span").hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user