Try the fastest and simplest way to install ONLYOFFICE

Using AJAX to load/save documents??

Using AJAX to load/save documents??

Postby 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.
capn
 
Posts: 2
Joined: Tue Nov 14, 2017 1:08 pm

Re: Using onlyoffice as wysiwyg editor?

Postby Maxim » Wed Jan 17, 2018 7:48 am

Hello capn!
I suppose you should visit our API.
Maxim
 
Posts: 1558
Joined: Tue Oct 11, 2016 2:34 pm

Re: Using onlyoffice as wysiwyg editor?

Postby 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?
capn
 
Posts: 2
Joined: Tue Nov 14, 2017 1:08 pm

Re: Using AJAX to load/save documents??

Postby 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.
Maxim
 
Posts: 1558
Joined: Tue Oct 11, 2016 2:34 pm


Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 2 guests