We have been using Prosemirror for writing mails, and then we are sending that HTML to mails. But the thing is this “white-space: break-spaces;” CSS rule is being stripped off by some mail clients (such as gmail, etc) from the HTML that is being sent. So we are planning to remove this white-space: break-spaces css rule from prosemirror.css file in our code. We would want to know whether removing this CSS rule have any implications in the editor?
Asking this because in your previous replies for questions regarding whitespace, you told that people should put white-space: pre-wrap; and white-space: break-spaces in their CSS file or else use prosemirror.css file. So now for sending mails if we remove this, would these cause any issues?
Yes. It will break editing of multiple adjacent spaces. Don’t remove it from the editor. Just change the way you render the emails outside of the editor.
Can you elaborate on how it will break editing on multiple adjacent spaces?
I have did some basic testing in FireFox and chrome, both ensure that if there is no white-space: break-spaces CSS rule, they represent continuous set of whitespaces by a combination of space character(" ") and “&nb sp;” character. (I have intentionally added space in between &nb and sp characters because for some reason when I post the comment, that particular word is converted into space and getting rendered).
So I’m expecting a valid reason to why white-space: break-spaces; CSS rule is needed.
I already did. The browser will collapse sequences of whitespace while editing, which is very annoying. Again, the style you use in the editor must not be the style you use in the email. There’s no reason to remove this from your editor just because it’s not email-safe.