Using AJAX to load/save documents??

Post Reply
capn
Posts: 2
Joined: Tue Nov 14, 2017 1:08 pm

Using AJAX to load/save documents??

Post by capn » Tue Jan 16, 2018 3:53 pm

HI,
I have a webpage with wysiwyg editor. Right now I'm using summernote. I want to use onlyoffice, but didn't figure it out yet...

How my application works is that it has about 20 or so pieces of innerHTML's that are saved in Javascript variables, and then placed into the summernote editor when they need to be edited, and then saved into javascript when they are done being edited. I did this by saving and reloading the innerHTML of the summernote iframe's editor div. Then at some point when user is ready, they press save, and all 20 or so pieces are saved through AJAX POST.

I examined the html of the onlyoffice editor iframe, and it looks like very complicated SVG. I tried to copy the innerHTML of the iframe in similar way as the summernote, but was not able to figure it out. IS there hackish way of loading/saving the iframe innerHTML's of the onlyoffice editor or some API'ish way of saving/loading on client side?
Last edited by capn on Wed Jan 17, 2018 5:03 pm, edited 1 time in total.

Maxim
Posts: 1817
Joined: Tue Oct 11, 2016 2:34 pm

Re: Using onlyoffice as wysiwyg editor?

Post by Maxim » Wed Jan 17, 2018 7:48 am

Hello capn!
I suppose you should visit our API.

capn
Posts: 2
Joined: Tue Nov 14, 2017 1:08 pm

Re: Using onlyoffice as wysiwyg editor?

Post by capn » Wed Jan 17, 2018 5:02 pm

Hey Maxim,

I want to use Ajax to load and save documents to an onlyoffice html editor. In those examples on API site, the editor window loads per each document. I wanted to see if it's possible to load the html editor once, and then load and save the documents in and out of the editor via AJAX?

Maxim
Posts: 1817
Joined: Tue Oct 11, 2016 2:34 pm

Re: Using AJAX to load/save documents??

Post by Maxim » Tue Jan 23, 2018 11:49 am

Hello capn!
I wanted to see if it's possible to load the html editor once, and then load and save the documents in and out of the editor via AJAX?
As i was informed it's possible. It will help you.

Post Reply