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

syn.type("[enter]") not working in contenteditable div #160

Open
RainerSchwarze opened this issue Apr 27, 2018 · 0 comments
Open

syn.type("[enter]") not working in contenteditable div #160

RainerSchwarze opened this issue Apr 27, 2018 · 0 comments

Comments

@RainerSchwarze
Copy link

syn.type("[enter]", el) does not insert a line break in a contenteditable div; it works in a textarea.

To reproduce create a page with a div like so:

<div contenteditable="true" id="elem" style="width: 300px; height: 400px; border: 2px solid green;">
</div>

Call syn.type like so:

var el = document.getElementById("elem");
syn.type("hi[enter]ho", el);

The div will contain "hiho", but not the line break. When changing the div to a textarea, it will contain the line break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant