mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add editor textareas maximize
This commit is contained in:
@@ -377,6 +377,25 @@ jQuery(function () {
|
||||
embedMessageFile(messageId, messageBlock);
|
||||
});
|
||||
|
||||
$(document).on('click', '.editor_maximize', function () {
|
||||
const broId = $(this).data('for');
|
||||
const bro = $(`#${broId}`);
|
||||
|
||||
if (!bro.length) {
|
||||
console.error('Could not find editor with id', broId);
|
||||
return;
|
||||
}
|
||||
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = String(bro.val());
|
||||
textarea.classList.add('height100p');
|
||||
textarea.oninput = function () {
|
||||
bro.val(textarea.value).trigger('input');
|
||||
};
|
||||
|
||||
callPopup(textarea, 'text', '', { wide: true, large: true });
|
||||
});
|
||||
|
||||
$('#file_form_input').on('change', onFileAttach);
|
||||
$('#file_form').on('reset', function () {
|
||||
$('#file_form').addClass('displayNone');
|
||||
|
Reference in New Issue
Block a user