mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 18:30:34 +00:00
update `.raw-content
` when edit issue/comment content (#16021)
* update ``.raw-content`` when edit issue/comment content fix #16000 Signed-off-by: a1012112796 <1012112796@qq.com> * handle empty content Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
5de01e21a1
commit
072df3ff87
1 changed files with 2 additions and 0 deletions
|
@ -1098,8 +1098,10 @@ async function initRepository() {
|
||||||
}, (data) => {
|
}, (data) => {
|
||||||
if (data.length === 0 || data.content.length === 0) {
|
if (data.length === 0 || data.content.length === 0) {
|
||||||
$renderContent.html($('#no-content').html());
|
$renderContent.html($('#no-content').html());
|
||||||
|
$rawContent.text('');
|
||||||
} else {
|
} else {
|
||||||
$renderContent.html(data.content);
|
$renderContent.html(data.content);
|
||||||
|
$rawContent.text($textarea.val());
|
||||||
}
|
}
|
||||||
const $content = $segment;
|
const $content = $segment;
|
||||||
if (!$content.find('.dropzone-attachments').length) {
|
if (!$content.find('.dropzone-attachments').length) {
|
||||||
|
|
Loading…
Reference in a new issue