home / samples / Sanitize Combinator
Automatically converts tabs to spaces and normalizes problematic Unicode characters.
BuffeeSanitize(new Buffee(el, {}))
The content below was loaded with tabs and Unicode spaces. Sanitize converted them:
\t) become 4 spacesTry pasting text with tabs - they'll be converted automatically.
When setting Model._ directly, use the Sanitize utilities:
editor.Model._ = editor.Sanitize.lines(["a\tb", "c\td"]); editor.View.render();