Changeset ff3b8ce in Klonkt for src/assets/js
- Timestamp:
- 07/19/2026 11:36:33 PM (7 weeks ago)
- Branches:
- main
- Children:
- 8ed65a6
- Parents:
- e9c9ae1
- git-author:
- Robin <roboburr@…> (07/19/2026 11:36:10 PM)
- git-committer:
- Robin <roboburr@…> (07/19/2026 11:36:33 PM)
- File:
-
- 1 edited
-
src/assets/js/reply-editor.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/js/reply-editor.js
re9c9ae1 rff3b8ce 107 107 } 108 108 }); 109 110 // Reflect the current formatting on the toolbar (bold/italic/list active), 111 // like the post editor, while the caret is inside this editor. 112 function syncToolbar() { 113 if (document.activeElement !== ed) return; 114 var map = { bold: 'bold', italic: 'italic', list: 'insertUnorderedList' }; 115 bar.querySelectorAll('button[data-cmd]').forEach(function (b) { 116 var c = map[b.getAttribute('data-cmd')]; 117 if (!c) return; 118 var on = false; try { on = document.queryCommandState(c); } catch (e) { on = false; } 119 b.classList.toggle('is-active', on); 120 }); 121 } 122 document.addEventListener('selectionchange', syncToolbar); 123 ed.addEventListener('keyup', syncToolbar); 124 ed.addEventListener('mouseup', syncToolbar); 125 109 126 if (fileInput) fileInput.addEventListener('change', function () { 110 127 uploadFiles(fileInput.files);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)