我正在使用自定义文本格式化程序组件。我使用下面的代码来实现其他功能(粗体、斜体、缩进等),但是我在这里没有发现减少缩进。
document.execCommand(aCommandName, aShowDefaultUI, aValueArgument)
我该如何实现这个?
最佳答案
有用于制表符的 indent 和 outdent execCommand 函数。像这样:
缩进 -- doc.execCommand('indent', true, null);
Outdent -- doc.execCommand('outdent', true, null);
关于javascript - 如何在 HTML JavaScript 自定义文本格式化程序中实现减少缩进?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40043352/