Repository: SillyTavern/SillyTavern (language: javascript)

Issue:
[FEATURE_REQUEST] Markdown hotkeys in expanded text boxes.
### Have you searched for similar requests?

No

### Is your feature request related to a problem? If so, please describe.

When editing, for example, the character description field in the expanded mode, you can't use hotkeys such as Ctrl-B, Ctrl-I, etc for markdown. By contrast, in the normal mode you can use these hotkeys.

### Describe the solution you'd like

Markdown hotkeys should function in the text editor when in expanded mode.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

### Priority

Medium

### Are you willing to test this on staging/unstable branch if this is implemented?

None


Discussion / hints:

Fix patch:
diff --git a/public/scripts/chats.js b/public/scripts/chats.js
index a6f2432d26..4584bfc8af 100644
--- a/public/scripts/chats.js
+++ b/public/scripts/chats.js
@@ -1506,7 +1506,7 @@ jQuery(function () {
         embedMessageFile(messageId, messageBlock);
     });
 
-    $(document).on('click', '.editor_maximize', function () {
+    $(document).on('click', '.editor_maximize', async function () {
         const broId = $(this).attr('data-for');
         const bro = $(`#${broId}`);
         const contentEditable = bro.is('[contenteditable]');
@@ -1525,6 +1525,7 @@ jQuery(function () {
         textarea.value = String(contentEditable ? bro[0].innerText : bro.val());
         textarea.classList.add('height100p', 'wide100p', 'maximized_textarea');
         bro.hasClass('monospace') && textarea.classList.add('monospace');
+        bro.hasClass('mdHotkeys') && textarea.classList.add('mdHotkeys');
         textarea.addEventListener('input', function () {
             if (contentEditable) {
                 bro[0].innerText = textarea.value;
@@ -1565,7 +1566,7 @@ jQuery(function () {
             });
         }
 
-        callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true });
+        await callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true });
     });
 
     $(document).on('click', 'body.documentstyle .mes .mes_text', function () {


Test patch: