diff --git a/plugins/index.json b/plugins/index.json index c07f437..44f23cc 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -64,9 +64,9 @@ }, { "id": "sticky", - "file": "plugin-sticky.d56d16b30743.js", - "version": "1.0.3", - "integrity": "sha256-1W0WswdDfppndPhoc4ODRKzLLhSq6fc6J3MLNC/o3Lw=" + "file": "plugin-sticky.909dcab8168c.js", + "version": "1.0.4", + "integrity": "sha256-kJ3KuBaM5Qs7law9aYJxbEfeYWs3I1F2eMtexuibVOc=" }, { "id": "style-source", diff --git a/plugins/runtime/plugin-sticky.d56d16b30743.js b/plugins/runtime/plugin-sticky.909dcab8168c.js similarity index 97% rename from plugins/runtime/plugin-sticky.d56d16b30743.js rename to plugins/runtime/plugin-sticky.909dcab8168c.js index 5d2fc83..ed01fa0 100644 --- a/plugins/runtime/plugin-sticky.d56d16b30743.js +++ b/plugins/runtime/plugin-sticky.909dcab8168c.js @@ -151,7 +151,10 @@ var dot = el('button', { className: 'iwb-sticky-dot', type: 'button', title: '背景色', 'data-act': 'palette' }) var pal = el('div', { className: 'iwb-sticky-pal', hidden: true }) var colorInput = el('input', { type: 'color', className: 'iwb-sticky-color-input', 'data-act': 'color' }) - var body = el('textarea', { className: 'iwb-sticky-body', spellcheck: 'false', placeholder: '双击编辑…' }) + // rows=1 是关键:textarea 默认 rows=2,fitBody() 把高度设 auto 读 scrollHeight 时, + // 单行文字也会被算成两行高(用户报的“预留了一行文本高度”)。显式 1 行后, + // scrollHeight 才等于真实内容行数——多行文本仍会自动换行、高度跟着涨。 + var body = el('textarea', { className: 'iwb-sticky-body', rows: '1', spellcheck: 'false', placeholder: '双击编辑…' }) // 对齐宿主文本节点:默认只读。宿主 CSS `.iwb-node textarea[readonly]{pointer-events:none}` // ⇒ 单击穿透给节点卡片(选中/拖动);双击由本插件在 root 上接管进入编辑。 body.readOnly = true @@ -413,7 +416,7 @@ global.IWBPluginHost.register({ id: 'sticky', name: '便利贴', - version: '1.0.3', + version: '1.0.4', apiVersion: 1, capabilities: ['panels', 'nodeTypes', 'canvas'], }, function (ctx) {