78 lines
3.7 KiB
Plaintext
78 lines
3.7 KiB
Plaintext
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
|
|
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
|
|
<script runat="server">
|
|
protected override void Init()
|
|
{
|
|
PageTitle = PageCaption = "Coediting";
|
|
MetaDescription = "Статьи документации по API сервера документов.";
|
|
}
|
|
</script>
|
|
<div class="MainHelpCenter">
|
|
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Coediting</h1>
|
|
<p class="dscr">The reference figure and the steps below explain the process of co-editing the document in ONLYOFFICE Document Server.</p>
|
|
<img alt="Co-editing" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/coedit.jpg")%>" />
|
|
<ol>
|
|
<li>User 1 and user 2 open one and the same document in <b>document editor</b>, i.e. when opening the file one and the same <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document.aspx#key")%>">document.key</a> has been used.</li>
|
|
<li>User 1 makes changes to the opened document.</li>
|
|
<li>The <b>document editor</b> sends changes made by user 1 to the <b>document editing service</b>.</li>
|
|
<li>The <b>document editing service</b> sends the changes made by user 1 to the user 2 <b>document editor</b>.</li>
|
|
<li>Now these changes become visible to user 2.</li>
|
|
</ol>
|
|
<img alt="Co-editing" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/coedit-view.png")%>" />
|
|
|
|
<h2 id="apply" class="copy-link">How this can be done in practice</h2>
|
|
<ol>
|
|
<li>Create an empty <em>html</em> file.</li>
|
|
<li>Add the <em>div</em> element as shown below.
|
|
<pre><div id="placeholder"></div></pre>
|
|
</li>
|
|
<li>Specify your ONLYOFFICE Document Server link with the JavaScript API that will be used for your website.
|
|
<pre><script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script></pre>
|
|
Where the <b>documentserver</b> is the name of the server with the ONLYOFFICE Document Server installed.
|
|
</li>
|
|
<li>Add the script initializing the <b>Document Editor</b> for the <em>div</em> element with the configuration for the document you want to open.
|
|
<pre>
|
|
new DocsAPI.DocEditor("placeholder", {
|
|
"document": {
|
|
"fileType": "docx",
|
|
"key": "Khirz6zTPdfd7",
|
|
"title": "Example Document Title.docx",
|
|
"url": "https://example.com/url-to-example-document.docx"
|
|
},
|
|
"documentType": "text",
|
|
"editorConfig": {
|
|
"user": {
|
|
"id": "78e1e841",
|
|
"name": "John Smith"
|
|
}
|
|
}
|
|
});
|
|
</pre>
|
|
Where the <b>example.com</b> is the name of the the server where <b>document manager</b> and <b>document storage service</b> are installed.
|
|
</li>
|
|
<li>Open your <em>html</em> file in the browser.</li>
|
|
<li>Now make a copy of your <em>html</em> file created above.</li>
|
|
<li>Change the script initializing the <b>Document Editor</b> in the copied <em>html</em> file.
|
|
<pre>
|
|
new DocsAPI.DocEditor("placeholder", {
|
|
"document": {
|
|
"fileType": "docx",
|
|
"key": "Khirz6zTPdfd7",
|
|
"title": "Example Document Title.docx",
|
|
"url": "https://example.com/url-to-example-document.docx"
|
|
},
|
|
"documentType": "text",
|
|
"editorConfig": {
|
|
"user": {
|
|
"id": "F89d8069ba2b",
|
|
"name": "Kate Cage"
|
|
}
|
|
}
|
|
});
|
|
</pre>
|
|
Where the <b>example.com</b> is the name of the the server where <b>document manager</b> and <b>document storage service</b> are installed.
|
|
</li>
|
|
<li>Open your copied and edited <em>html</em> file in the browser.</li>
|
|
</ol>
|
|
|
|
</div> |