mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
fix: The content format is not reset on create a new or clone document
This commit is contained in:
parent
5a067e893f
commit
ed9b3d1aa0
3 changed files with 11 additions and 2 deletions
|
|
@ -4632,7 +4632,11 @@ jQuery.PrivateBin = (function($) {
|
|||
*/
|
||||
me.setFormat = function(format)
|
||||
{
|
||||
$formatter.parent().find(`a[data-format="${format}"]`).click();
|
||||
if (Helper.isBootstrap5()) {
|
||||
$formatter.find(`select`).val(format);
|
||||
} else {
|
||||
$formatter.parent().find(`a[data-format="${format}"]`).click();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5792,6 +5796,10 @@ jQuery.PrivateBin = (function($) {
|
|||
AttachmentViewer.removeAttachment();
|
||||
TopNav.resetInput();
|
||||
|
||||
// reset format
|
||||
PasteViewer.setFormat('plaintext');
|
||||
TopNav.setFormat('plaintext');
|
||||
|
||||
TopNav.showCreateButtons();
|
||||
|
||||
// newPaste could be called when user is on document clone editing view
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue