Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor.setContents adds additional '\n' #246

Closed
benbro opened this issue Nov 4, 2014 · 0 comments
Closed

editor.setContents adds additional '\n' #246

benbro opened this issue Nov 4, 2014 · 0 comments

Comments

@benbro
Copy link
Contributor

benbro commented Nov 4, 2014

Additional '\n\ is appended which breaks OT for me:

editor.setContents([
  { insert: 'Hello ' },
  { insert: 'World!', attributes: { bold: true } },
  { insert: '\n' }
]);
console.log(editor.getContents().ops);

There are two '\n\n' at the end instead of one:

[Object { insert="Hello "}, Object { attributes={bold: true}, insert="World!"}, Object { insert="\n\n"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants