Merge pull request #3662 from SillyTavern/enable-md-hotkeys-in-expando Add markdown hotkeys support for expando editor on textareas that support markdown
Signed| @@ -1506,7 +1506,7 @@ jQuery(function () { | ||
| 1506 | 1506 | embedMessageFile(messageId, messageBlock); |
| 1507 | 1507 | }); |
| 1508 | 1508 | |
| 1509 | 1509 | $(document).on('click', '.editor_maximize', async function () { |
| 1510 | 1510 | const broId = $(this).attr('data-for'); |
| 1511 | 1511 | const bro = $(`#${broId}`); |
| 1512 | 1512 | const contentEditable = bro.is('[contenteditable]'); |
| @@ -1525,6 +1525,7 @@ jQuery(function () { | ||
| 1525 | 1525 | textarea.value = String(contentEditable ? bro[0].innerText : bro.val()); |
| 1526 | 1526 | textarea.classList.add('height100p', 'wide100p', 'maximized_textarea'); |
| 1527 | 1527 | bro.hasClass('monospace') && textarea.classList.add('monospace'); |
| 1528 | + bro.hasClass('mdHotkeys') && textarea.classList.add('mdHotkeys'); | |
| 1528 | 1529 | textarea.addEventListener('input', function () { |
| 1529 | 1530 | if (contentEditable) { |
| 1530 | 1531 | bro[0].innerText = textarea.value; |
| @@ -1565,7 +1566,7 @@ jQuery(function () { | ||
| 1565 | 1566 | }); |
| 1566 | 1567 | } |
| 1567 | 1568 | |
| 1568 | 1569 | await callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true }); |
| 1569 | 1570 | }); |
| 1570 | 1571 | |
| 1571 | 1572 | $(document).on('click', 'body.documentstyle .mes .mes_text', function () { |