KindEditor使用wellFormatMode美化HTML数据
💡
原文中文,约700字,阅读约需2分钟。
📝
内容提要
在KindEditor中插入js代码时,切换到源代码会自动缩进到一行,可能导致js错误。通过设置wellFormatMode为true可以解决此问题。
🎯
关键要点
- 在KindEditor中插入js代码时,切换到源代码会自动缩进到一行。
- 自动缩进会导致js代码难以阅读,并可能引发js错误。
- 可以通过设置wellFormatMode为true来解决自动缩进的问题。
- 当wellFormatMode为true时,html代码会缩进字符;为false时则不会。
- 提供了示例代码以实现wellFormatMode的功能。
🏷️
标签
➡️