Space normalization on to-model conversion #3827
Labels
package:engine
type:feature
This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone
As exemplified here: https://github.com/ckeditor/ckeditor5-markdown-gfm/issues/4#issuecomment-248614316
In the view produced by the DP we may have excessive whitespaces which should be removed when that content is being converted to the model.
Note: In the view, spaces which should be preserved must be a mix of
s and normal spaces. So in this case the view must reflect how they'd behave in the DOM. In the model, though, if we have a text node with multiple subsequent spaces we treat all of them as visible, so when converting to the view, they should be converted into a mix of
s and normal spaces. See https://github.com/ckeditor/ckeditor5-engine/issues/379.This e.g. means that when typing multiple spaces, even though the browser will create mutations with either " " or " ", we'll insert normals spaces into the model. In order to support intentional non-breaking spaces, we must support Alt+Space keystroke.
The text was updated successfully, but these errors were encountered: