Try the fastest and simplest way to install ONLYOFFICE

insert into document without carriage return

Integration questions/issues

insert into document without carriage return

Postby robertotomas » Mon Oct 01, 2018 1:03 pm

Some time ago I built a general purpose plugin for my company to insert materials to a document on demand. At the time, it was impossible to perform an insert without adding a carriage return. Is this still the case?
robertotomas
 
Posts: 26
Joined: Thu Aug 31, 2017 4:05 pm

Re: insert into document without carriage return

Postby Maxim » Fri Oct 05, 2018 9:33 am

Hello robertotomas!
Is this still the case?

Yes, still
Maxim
 
Posts: 1747
Joined: Tue Oct 11, 2016 2:34 pm

Re: insert into document without carriage return

Postby robertotomas » Fri Oct 19, 2018 9:02 pm

Hey Maxim - I was playing with triggering a keypress event to get around this issue. Like perhaps we could:

1. insert programmatically with plugin
2. trigger a "backspace" keypress event.

.. I found that I can even do that _directly_ on the front end, without a plugin. I just: document.querySelector('#area_id´).dispatchEvent( myKeyboardEvent ) -- *but* ... this appears only to work for normal input, like A-Z characters. Not for Enter, Backspace etc. I am probably targeting the wrong element. What is the element that is listening for keydown ?
robertotomas
 
Posts: 26
Joined: Thu Aug 31, 2017 4:05 pm


Return to API

Who is online

Users browsing this forum: No registered users and 2 guests

cron