AIO 編輯器

Indent

區塊縮排。

區塊縮排(輸出 margin-left style),自製 extension。清單內會優先操作 sinkListItem / liftListItem,離開清單後才走縮排;清單項上的縮排值會被自動歸零。

  • config key:AioEditorCoreExtension.Indent
  • 來源:自製

載入途徑:跟隨 features 宣告:Indent、Outdent。按鈕未宣告但要保留能力 → include: [AioEditorCoreExtension.Indent]。

排除影響(exclude: [Indent]): 按鈕 Indent、Outdent 將自動隱藏; 以 extraExtensions 補上同名 extension(indent)即為替換。

選項

欄位型別預設值說明
namesstring[]['heading', 'paragraph']可縮排之節點型別
indentRangenumber24每次縮排之增減量(px)
minIndentLevelnumber0縮排下限(px)
maxIndentLevelnumber240縮排上限(px)
defaultIndentLevelnumber0預設縮排值
HTMLAttributesRecord<string, never>{}保留欄位,目前未使用

Commands

Command說明
indent()增加縮排
outdent()減少縮排

快捷鍵

按鍵行為
Tab增加縮排(清單內為降層)
Shift-Tab減少縮排(清單內為升層)
Backspace行首時減少縮排
Mod-]增加縮排
Mod-[減少縮排

解析既有 HTML 時會合併 margin-left 與 text-indent(支援 px / pt 單位)作為初始縮排值。