右上角那个有,叫 FormulaTextBox,左上角那个只有在线表格编辑器有
首先,在你的 HTML 中,加入一个 DIV,比如:
<div id="formulabox" contenteditable="true" spellcheck="false" style="line-height: 16px;
border: 1px solid #808080; overflow: hidden; padding: 3px; height: 16px; margin: 0;">
然后,使用这个 DIV 创建一个 FormulaTextBox,然后绑定到 spread 上即可
var fbx = new GcSpread.Sheets.FormulaTextBox(document.getElementById('formulabox'));
fbx.spread(spread); |