📜 ⬆️ ⬇️

Teamlab distributes API for free integration of office applications and allows you to deploy them on your server


The habraeffect from our previous article is still not over, and we are already in a hurry to share with you one more, no less joyful news: the online editors of Teamlab Office documents can now be deployed on your server and embedded in a website or application. Is free.

It was a spoiler, but the details, as usual, under the cut.

Everyone wants to edit documents!


Even at Moscow TechCrunch in 2012, we talked about how many around a variety of applications that would be in the way of editing documents directly in the browser. Mail services, cloud file storages, internal workflow systems, again CRM.

Now let's see what options sufferers have ... Oops! Of all existing editors, only Zoho Docs provide their applications for embedding. The integration cost is calculated depending on the UDS (unique document session) indicator, which equates to the number of open files.
')

(calculation of tariff plans for Zoho API. Prices are available on request)

Thus, there is one single service throughout the Internet that allows you to integrate document editors. Zoho offers connection through SaaS, and it is not possible to install applications on your server.

“Here it is, the very moment to break into the market with an offer that no one can refuse!” , We thought. By the way, we already had a ready online document editor, fundamentally different from Zoho, both in terms of technology and formatting quality. And what to hide, we started receiving letters a year ago with similar requests from various companies.

We integrate Teamlab editors through the API. Excerpts from the documentation


You can integrate Teamlab Office Apps using the API, the documentation for which is on the official website.

The JavaScript API file is usually located in the following editors folder:

/apps/api/documents/api.js 

The target HTML file into which editors are embedded must contain a div placeholder tag, to which all information about editors' parameters will be passed:

Code example:

 <div id="placeholder"></div> <script type="text/javascript" src="/apps/api/documents/api.js"></script> 

Page code contains editable parameters and looks like this:

Code example:

 var docEditor = new DocsAPI.DocEditor('placeholder', config) 

Where config is an object:

 config = { type: 'desktop', documentType: 'spreadsheet', document: { title: 'Example Document Title.xlsx', url: 'http://www.examplesite.com/url-to-example-document/', fileType: 'xlsx', key: 'Khirz6zTPdfd7riF8lgCc56Rya_ejbfYJSA=', info: { author: 'Jessie Jamieson', folder: 'Example Files', created: '15/04/2013 1:06 PM', }, permissions: { edit: true, download: false } }, editorConfig: { mode: 'edit', lang: 'en-US', user: { id: '78e1e841-8314-48465-8fc0-e7d6451b6475', name: 'John Smith' }, }, events: { 'onReady': onDocEditorReady, 'onDocumentStateChange': onDocumentStateChange, 'onSave': onDocumentSave, 'onError': onError, } }; 

Of course, we did not forget about the test examples. Today, examples for C # and JavaScript are available, which can be downloaded here . In the further preparation of examples we promise to focus on requests from users.

Monetization model and deployment methods


Unlike Zoho editors, Teamlab Office Apps can be deployed on your own server, and monetization is not based on the number of open documents, but on the number of active * users, which, in our opinion, is much more reasonable. For those who are not yet ready to afford paid editors, we have released the Common version, which is a bit limited in functionality, but free.

To clarify, here is a description of both available versions:


Feedback needed!


Habr, by tradition, became the first platform where we talk about new features, solutions and plans. This time was no exception. The integration of editors with third-party applications is a very big and important step for our team, and we will be very grateful if you share your opinion in the comments.
Thank you in advance!

* By “active users” we mean the number of accounts using the Teamlab Office Apps Enterprise version within 24 hours (every day this number is reset)

Source: https://habr.com/ru/post/219761/


All Articles