Implement Ctrl+S or Command+S for save draft (#1628)

* Implement Ctrl+S or Command+S for save draft

* rename

* add Typecho.savePost

* fix upload file size

* add new uploader

* replace new uploader

* fix textarea change

* fix preview

* refactor post edit

* fix issue

* fix page edit

---------

Co-authored-by: joyqi <joyqi@segmentfault.com>
Co-authored-by: joyqi <magike.net@gmail.com>
This commit is contained in:
Lu Fei
2023-10-01 16:51:09 +08:00
committed by GitHub
parent ff1fde5c4b
commit 438ac35487
39 changed files with 3215 additions and 21098 deletions
+1 -5
View File
@@ -20,7 +20,7 @@ $(document).ready(function () {
$(this).remove();
});
$(this).parents('form').trigger('field');
$(this).parents('form').trigger('change');
}
});
}
@@ -40,10 +40,6 @@ $(document).ready(function () {
+ '<td><button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></td></tr>',
el = $(html).hide().appendTo('#custom-field table tbody').fadeIn();
$(':input', el).bind('input change', function () {
$(this).parents('form').trigger('field');
});
attachDeleteEvent(el);
});
});