Fixed Insert button for uploads inserting with the wrong markup format if the setting was changed after upload.

This commit is contained in:
flash 2023-05-04 17:20:56 +00:00
parent 8038f61470
commit 5d602bd56f

View file

@ -149,6 +149,11 @@ Misuzu.Forum.Editor.init = function() {
};
uploadTask.onComplete = function(fileInfo) {
uploadElem.classList.add('eeprom-widget-file-done');
uploadElemName.href = fileInfo.url;
uploadElemProgressText.textContent = '';
const insertTheLinkIntoTheBoxEx2 = function() {
const parserMode = parseInt(postingParser.value);
let insertText = location.protocol + fileInfo.url;
@ -164,11 +169,6 @@ Misuzu.Forum.Editor.init = function() {
insertText = '![](' + fileInfo.url + ')';
}
uploadElem.classList.add('eeprom-widget-file-done');
uploadElemName.href = fileInfo.url;
uploadElemProgressText.textContent = '';
const insertTheLinkIntoTheBoxEx2 = function() {
$insertTags(postingText, insertText, '');
postingText.value = postingText.value.trim();
};