home / samples / Sanitize Combinator

Sanitize Combinator

Automatically converts tabs to spaces and normalizes problematic Unicode characters.

BuffeeSanitize(new Buffee(el, {}))

Ln , Col |

Demo

The content below was loaded with tabs and Unicode spaces. Sanitize converted them:

Try pasting text with tabs - they'll be converted automatically.

Manual Sanitization

When setting Model._ directly, use the Sanitize utilities:

editor.Model._ = editor.Sanitize.lines(["a\tb", "c\td"]);
editor.View.render();