mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-03-05 13:30:32 -05:00
fix: The content format is not reset on create a new or clone document
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user