Typing newline in oxy_textArea
Oxygen general issues.
-
- Posts: 3
- Joined: Tue May 25, 2021 2:09 pm
Typing newline in oxy_textArea
Hello,
I am making a Web Author framework for editing xml documents. I have an oxy_textArea form control to edit the text content in <mainDescription> as follows:
The problem is, I'm unable to type newlines into the text by pressing enter. Pressing the enter key simply does nothing when the caret is inside the text area. Ctrl-enter does nothing either. Interestingly, I can paste newlines into the text from the clipboard. Any idea on how to get the enter key to work?
Best,
Topi
I am making a Web Author framework for editing xml documents. I have an oxy_textArea form control to edit the text content in <mainDescription> as follows:
Code: Select all
metadata > mainDescription {
content:oxy_textArea(
edit, '#text',
contentType, 'text/plain',
rows, 12,
width, 100%);
visibility: -oxy-collapse-text;
}
Best,
Topi
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Typing newline in oxy_textArea
Post by cristi_talau »
Hello,
I managed to reproduce the issue. I registered an issue for it and we will update this forum post once it is implemented.
To fix this problem in your deployment you can paste the following code snippet in the JS code [1] of your framework:
Best,
Cristian
[1] https://www.oxygenxml.com/doc/versions/ ... _framework
I managed to reproduce the issue. I registered an issue for it and we will update this forum post once it is implemented.
To fix this problem in your deployment you can paste the following code snippet in the JS code [1] of your framework:
Code: Select all
document.body.addEventListener('keydown', e => {
if (e.keyCode === 13) {
if (e.target.tagName === 'TEXTAREA') {
e.stopPropagation();
}
}
}, true);
Cristian
[1] https://www.oxygenxml.com/doc/versions/ ... _framework
-
- Posts: 3
- Joined: Tue May 25, 2021 2:09 pm
Re: Typing newline in oxy_textArea
Thanks Cristi, that does the job!
Sorry for the late reply, somehow I didn't notice your reply.
In the meantime I managed to modify the function
in workspace.js to get a temporary solution.
Again, thanks
Best, Topi
Sorry for the late reply, somehow I didn't notice your reply.
In the meantime I managed to modify the function
Code: Select all
sync.formctrls.TextEnhancer.prototype.enterDocument = function(a) {
Again, thanks

Best, Topi
-
- Site Admin
- Posts: 172
- Joined: Tue Mar 20, 2018 5:28 pm
Re: Typing newline in oxy_textArea
Post by Bogdan Dumitru »
Hello,
We have just released version 24 of Web Author that fixes the problem you reported. Thank you again for reporting it.
For more information on the enhancements made on this new version you can checkout the What's New section from our website [1].
[1] https://www.oxygenxml.com/xml_web_author/whats_new.html
Best Regards,
Bogdan Dumitru
We have just released version 24 of Web Author that fixes the problem you reported. Thank you again for reporting it.
For more information on the enhancements made on this new version you can checkout the What's New section from our website [1].
[1] https://www.oxygenxml.com/xml_web_author/whats_new.html
Best Regards,
Bogdan Dumitru
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service