Initialising editor with CR LF causes two extra spaces
matthewbloch opened this issue · 0 comments
matthewbloch commented
I've been using EpicEditor as a souped-up textarea, like this:
var editor = new EpicEditor({
textarea: "approach_cover_letter",
clientSideStorage: false,
basePath: '',
container: 'cover_letter_editor',
}).load();
i.e. I'm not using the localstorage option, and am just using the synchronised data as part of a normal form submission in Rails.
So I've encoded my form value in that defaultContent, but I find that CR LF is replaced by "CR LF SPACE SPACE", so round trips keep adding more and more spaces.
I can avoid this by stripping the CRs on submission, but it seemed like an obvious enough workflow with an odd-enough side effect that it might be considered a bug :)