gdrive support

This commit is contained in:
benweet 2013-03-28 23:35:32 +00:00
parent 924646c6e9
commit 78807b01c9

View File

@ -333,11 +333,15 @@ 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();
}
firstChange = false;
return text; return text;
}); });
var editor = new Markdown.Editor(converter); var editor = new Markdown.Editor(converter);