AIO 編輯器
LineHeight
行高。
段落行高(輸出 line-height style),自製 extension。
- config key:
AioEditorCoreExtension.LineHeight - 來源:自製
載入途徑:Basic 恆載(可經 exclude 關閉)。按鈕未宣告但要保留能力 → include: [AioEditorCoreExtension.LineHeight]。
排除影響(exclude: [LineHeight]): 無按鈕與依賴者受影響; 以 extraExtensions 補上同名 extension(lineHeight)即為替換。
選項
| 欄位 | 型別 | 預設值 | 說明 |
|---|---|---|---|
types | string[] | ['paragraph'] | 可調行高之節點型別 |
heights | string[] | ['1', '1.1', …, '2.0'] | 允許值清單;setLineHeight 帶入清單外的值會失敗 |
defaultLineHeight | string | '' | 預設行高;含 -- 時輸出 var()(可接 CSS 變數),空字串則不輸出 style |
Commands
| Command | 說明 |
|---|---|
setLineHeight(height) | 設定行高(須在 heights 清單內) |
unsetLineHeight() | 重設為預設行高 |
覆寫範例
const config: AioEditorConfig = { extensionsConfig: { LineHeight: { heights: ['1', '1.5', '2'], defaultLineHeight: '1.5' } }}