scratch
/quickload/text.html |
@@ -70,25 +70,17 @@ |
<script> |
$(document).ready(() => { |
$('#trumbowyg').trumbowyg({ |
autogrow: true, |
disabled: true |
}).on('tbwchange', () => { |
$('#editor').trumbowyg('disable'); |
$.post('share-text.php', { |
data: $('#trumbowyg').trumbowyg('html'), |
}).done((data) => { |
$('#trumbowyg').trumbowyg('enable'); |
}).fail(() => { |
$('#trumbowyg').trumbowyg('enable'); |
autogrow: true |
}).on("tbwchange", () => { |
$.post("store-text.php", |
{ |
text: $('#trumbowyg').trumbowyg('html'), |
action: 'save' |
}, |
function(data, status){ |
//alert("Data: " + data + "\nStatus: " + status); |
}); |
}); |
$.get('share-text.php').done((data) => { |
$('#trumbowyg') |
.trumbowyg('html', data); |
$('#trumbowyg').trumbowyg('enable'); |
}).fail(() => { |
$('#trumbowyg').trumbowyg('enable'); |
}); |
}); |
</script> |
</body> |