Merge pull request #6932 from redpersongpt/codex/skill-editor-source-height

fix(skills): size the raw editor from its source lines
This commit is contained in:
Alexandre Teixeira
2026-10-30 19:46:04 +00:00
committed by GitHub
2 changed files with 79 additions and 0 deletions
+3
View File
@@ -1288,6 +1288,9 @@ function _toggleSkillEdit(card, name) {
ta.className = 'skill-md-editor';
ta.spellcheck = false;
ta.value = (card._md != null ? card._md : (pre ? pre.textContent : '')) || '';
// Let the source set the intrinsic height; the card's existing flex/max
// height keeps long files bounded and the Save footer reachable.
ta.rows = Math.max(ta.rows, ta.value.split(/\r\n|\r|\n/).length);
ta.addEventListener('click', (e) => e.stopPropagation());
if (pre) pre.style.display = 'none';
preview.insertBefore(ta, preview.querySelector('.doclib-card-expanded-actions'));