R7-Office: updated API documentation

This commit is contained in:
alexandervnuchkov 2019-03-07 15:11:42 +03:00
parent e01cded314
commit f9a343f413
5 changed files with 131 additions and 210 deletions

View File

@ -1,6 +1,4 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
<%@ Control Language="C#" Inherits="BaseContentUserControls" %> <%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %><script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Callback handler";
@ -8,13 +6,10 @@
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Callback handler</h1>
<p class="dscr">
The <b>document editing service</b> informs the <b>document storage service</b> about the status of the document editing using the <em>callbackUrl</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/basic.aspx")%>">JavaScript API</a>.
The <b>document editing service</b> use the POST request with the information in body.
</p>
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Обработчик обратных вызовов</h1>
<p class="dscr"><b>Сервис редактирования документов</b> оповещает <b>сервис хранения документов</b> о статусе редактирования документа, используя <em>callbackUrl</em> из <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/basic.aspx")%>">JavaScript API</a>. <b>Сервис редактирования документов</b> использует POST запросы с параметрами в теле.</p>
<h2>Parameters and their description:</h2>
<h2>Параметры и их описание:</h2>
<table class="table">
<colgroup>
<col style="width: 100px;" />
@ -24,99 +19,95 @@
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
<td>Параметр</td>
<td>Описание</td>
<td>Тип</td>
<td>Наличие</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="actions" class="copy-link">actions</td>
<td>Defines the object received if the new user connected to the document co-editing or disconnected from it. In the first case the <em>type</em> field value is <b>1</b>, in the other case - <b>0</b>. The <em>userid</em> field value is the identifier of the user who connected to or disconnected from the document co-editing.</td>
<td>array of object</td>
<td>optional</td>
<td>Определяет полученный объект, если новый пользователь, был подключен к совместному редактированию документа или отключен от него. В первом случае значение поля <em>тип</em> равно <b>1</b>, во втором - <b>0</b>. Значение поля <em>userid</em> является идентификатором пользователя, который был подключен к совместному редактированию документа, или отключен от него.</td>
<td>массив объектов</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="changeshistory" class="copy-link">changeshistory</td>
<td>Defines the array of objects with the document changes history. The object is present when the <em>status</em> value is equal to <b>2</b> or <b>3</b> only. Must be sent as a property <em>changes</em> of the object sent as the argument to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a> method. Deprecated since version 4.2, please use <a href="#history">history</a> instead.</td>
<td>array of object</td>
<td>optional</td>
<td>Определяет массив объектов с историей изменения документа. Объект присутствует только если значение параметра <em>status</em> равно <b>2</b> или <b>3</b>. Должен быть отправлен как свойство <em>changes</em>, объекта, который был передан методу <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a> в качестве аргумента. Удалено, начиная с версии 4.2, пожалуйста, используйте <a href="#history">history</a>.</td>
<td>массив объектов</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="changesurl" class="copy-link">changesurl</td>
<td>Defines the link to the file with the document editing data used to track and display the document changes history. The link is present when the <em>status</em> value is equal to <b>2</b> or <b>3</b> only. The file must be saved and its address must be sent as <i>changesUrl</i> parameter using the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#setHistoryData")%>">setHistoryData</a> method to show the changes corresponding to the specific document version.</td>
<td>string</td>
<td>optional</td>
<td>Определяет ссылку на файл с данными об изменениях документа, используемый для отображения истории изменения этого документа. Ссылка присутствует только если значение параметра <em>status</em> равно <b>2</b> или <b>3</b>. Файл должен быть сохранён, а его адрес должен быть отправлен как параметр <i>changesUrl</i>, используя метод <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#setHistoryData")%>">setHistoryData</a>, чтобы показать изменения, относящиеся к конкретной версии документа.</td>
<td>строка</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="forcesavetype" class="copy-link">forcesavetype</td>
<td>Defines the type of initiator when the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx#forcesave")%>">force saving</a> request is performed. Can have the following values:
<ul>
<li><b>0</b> - the force saving request is performed to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">command service</a>,</li>
<li><b>1</b> - the force saving request is performed each time the saving is done (e.g. the <b>Save</b> button is clicked), which is only available when the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/customization.aspx#forcesave")%>">forcesave</a> option is set to <em>true</em>.</li>
<li><b>2</b> - the force saving request is performed by timer with the settings from the server config.</li>
</ul>
The type is present when the <em>status</em> value is equal to <b>6</b> or <b>7</b> only.
</td>
<td>integer</td>
<td>optional</td>
<td>Определяет тип инициатора запроса на выполнение <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx#forcesave")%>">принудительного сохранения</a>. Может быть равным следующим значениям:<ul>
<li><b>0</b> - запрос на принудительное сохранение отправляется к <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">командному сервису</a>.</li>
<li><b>1</b> - запрос на принудительное сохранение выполняется каждый раз, когда производится сохранение (например, нажимается кнопка <b>Сохранить</b>), что доступно лишь в случае, если значение параметра <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/customization.aspx#forcesave")%>">forcesave</a> равно <em>true</em>.</li>
<li><b>2</b> - запрос на принудительное сохранение выполняется таймером с настройками от конфигурации сервера.</li>
</ul>Тип присутствует только если значение параметра <em>status</em> равно <b>6</b> или <b>7</b>.</td>
<td>целочисленный</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="history" class="copy-link">history</td>
<td>Defines the object with the document changes history. The object is present when the <em>status</em> value is equal to <b>2</b> or <b>3</b> only. It contains the object <em>serverVersion</em> and <em>changes</em>, which must be sent as properties <em>serverVersion</em> and <em>changes</em> of the object sent as the argument to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a> method.</td>
<td>object</td>
<td>optional</td>
<td>Определяет объект с информацией об истории изменения документа. Объект присутствует только если значение параметра <em>status</em> равно <b>2</b> или <b>3</b>. Содержит объекты <em>serverVersion</em> и <em>changes</em>, которые должны быть отправлены как свойства <em>serverVersion</em> и <em>changes</em> объекта, который был передан в качестве аргумента методу <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a>.</td>
<td>объект</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="key" class="copy-link">key</td>
<td>Defines the edited document identifier.</td>
<td>string</td>
<td>required</td>
<td>Определяет идентификатор отредактированного документа.</td>
<td>строка</td>
<td>обязательный</td>
</tr>
<tr class="tablerow">
<td id="status" class="copy-link">status</td>
<td>Defines the status of the document. Can have the following values:
<ul>
<li><b>0</b> - no document with the key identifier could be found,</li>
<li><b>1</b> - document is being edited,</li>
<li><b>2</b> - document is ready for saving,</li>
<li><b>3</b> - document saving error has occurred,</li>
<li><b>4</b> - document is closed with no changes,</li>
<li><b>6</b> - document is being edited, but the current document state is saved,</li>
<li><b>7</b> - error has occurred while force saving the document.</li>
<td>Определяет статус документа. Может быть равным следующим значениям:<ul>
<li><b>0</b> - не найден документ с данным идентификатором,</li>
<li><b>1</b> - документ редактируется,</li>
<li><b>2</b> - документ готов к сохранению,</li>
<li><b>3</b> - во время сохранения документа произошла ошибка,</li>
<li><b>4</b> - документ был закрыт без изменений,</li>
<li><b>6</b> - документ редактируется, но текущее его состояние сохранено,</li>
<li><b>7</b> - во время принудительного сохранения документа произошла ошибка.</li>
</ul>
</td>
<td>integer</td>
<td>required</td>
<td>целочисленный</td>
<td>обязательный</td>
</tr>
<tr class="tablerow">
<td id="url" class="copy-link">url</td>
<td>Defines the link to the edited document to be saved with the document storage service. The link is present when the <em>status</em> value is equal to <b>2</b> or <b>3</b> only.</td>
<td>string</td>
<td>optional</td>
<td>Определяет ссылку на отредактированный документ, который будет сохранён сервисом хранения документов. Ссылка присутствует только если значение параметра <em>status</em> равно <b>2</b> или <b>3</b>.</td>
<td>строка</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="userdata" class="copy-link">userdata</td>
<td>Defines the custom information sent to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx#userdata")%>">command service</a> in case it was present in the request.</td>
<td>string</td>
<td>optional</td>
<td>Определяет пользовательскую информацию, отправляемую <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx#userdata")%>">командному сервису</a> в случае, если она была передана в запросе.</td>
<td>строка</td>
<td>необязательный</td>
</tr>
<tr class="tablerow">
<td id="users" class="copy-link">users</td>
<td>Defines the list of the identifiers of the users who opened the document for editing; when the document has been changed the <b>users</b> will return the identifier of the user who was the last to edit the document (for status <b>2</b> and status <b>6</b> replies).</td>
<td>array of string</td>
<td>optional</td>
<td>Определяет список идентификаторов пользователей, который открыли документ для редактирования; когда документ был изменён, объект <b>users</b> вернёт идентификатор пользователя, который последним редактировал документ (для ответов со статусами <b>2</b> и <b>6</b>).</td>
<td>массив строк</td>
<td>необязательный</td>
</tr>
</tbody>
</table>
<p><em>Status</em> <b>1</b> is received every user connection to or disconnection from document co-editing.</p>
<p><em>Status</em> <b>2</b> (<b>3</b>) is received <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx#savedelay")%>">10 seconds</a> after the document is closed for editing with the identifier of the user who was the last to send the changes to the document editing service.</p>
<p><em>Status</em> <b>4</b> is received after the document is closed for editing with no changes by the last user.</p>
<p><em>Status</em> <b>6</b> (<b>7</b>) is received when the force saving request is performed.</p>
<p><em>Статус</em> <b>1</b> будет получен каждый раз, когда пользователь подключается к совместному редактированию документа или отключается от него.</p>
<p><em>Статус</em> <b>2</b> (<b>3</b>) будет получен через <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx#savedelay")%>">10 секунд</a> после закрытия документа, с идентификатором пользователя, от которого сервисом редактирования документов в последний раз были получены изменения.</p>
<p><em>Статус</em> <b>4</b> будет получен после закрытия документа, если пользователь не вносил в него никаких изменений.</p>
<p><em>Статус</em> <b>6</b> (<b>7</b>) будет получен при выполнении запроса на принудительное сохранение.</p>
<div id="status-1" class="header-gray copy-link">Sample of JSON object sent to the "callbackUrl" address by document editing service when two users are co-editing the document</div>
<div id="status-1" class="header-gray copy-link">Пример JSON объекта, отправляемого на адрес "callbackUrl" сервисом редактирования документов, когда 2 пользователя редактируют документ совместно</div>
<pre>
{
"actions": [{"type": 1, "userid": "78e1e841"}],
@ -126,7 +117,7 @@
}
</pre>
<div id="status-2" class="header-gray copy-link">Sample of JSON object sent to the "callbackUrl" address by document editing service when the user changed the document and closed it for editing</div>
<div id="status-2" class="header-gray copy-link">Пример JSON объекта, отправляемого "callbackUrl" сервисом редактирования документов, когда пользователь изменил документ и закрыл его</div>
<pre>
{
"actions": [{"type": 0, "userid": "78e1e841"}],
@ -142,7 +133,7 @@
}
</pre>
<div id="status-4" class="header-gray copy-link">Sample of JSON object sent to the "callbackUrl" address by document editing service when the last user closed the document for editing without changes</div>
<div id="status-4" class="header-gray copy-link">Пример JSON объекта, отправляемого на адрес "callbackUrl" сервисом редактирования документов, когда последний пользователь закрыл документ без изменений</div>
<pre>
{
"key": "Khirz6zTPdfd7",
@ -150,7 +141,7 @@
}
</pre>
<div id="status-6" class="header-gray copy-link">Sample of JSON object sent to the "callbackUrl" address by document editing service after the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">forcesave</a> command had been received</div>
<div id="status-6" class="header-gray copy-link">Пример JSON объекта, отправляемого на адрес "callbackUrl" сервисом редактирования документов, после того, как была получена команда <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">forcesave</a>.</div>
<pre>
{
"changesurl": "https://documentserver/url-to-changes.zip",
@ -167,18 +158,18 @@
}
</pre>
<div id="error-0" class="header-gray copy-link">Response from the document storage service</div>
<div id="error-0" class="header-gray copy-link">Ответ от сервиса хранения документов</div>
<p>The <b>document storage service</b> must return the following response, otherwise the <b>document editor</b> will display an error message:</p>
<p><b>Сервис хранения документов</b> должен отправить следующий ответ, в противном случае, <b>редактор документов</b> покажет сообщение об ошибке:</p>
<pre>
{
"error": 0
}
</pre>
<p id="implement">The <b>document manager</b> and <b>document storage service</b> are either included to Community Server or must be implemented by the software integrators who use ONLYOFFICE Document Server on their own server.</p>
<p id="implement"><b>Менеджер документов</b> и <b>сервис хранения документов</b> включены в Сервер совместной работы или должны быть реализованы разработчиками, использующими Сервер документов на своих собственных серверах.</p>
<div id="csharp" class="header-gray copy-link">.Net (C#) document save example</div>
<div id="csharp" class="header-gray copy-link">Пример сохранения документа на .Net (C#)</div>
<pre>
public class WebEditor : IHttpHandler
{
@ -206,9 +197,9 @@ public class WebEditor : IHttpHandler
}
}
</pre>
<div class="note"><em>PATH_FOR_SAVE</em> is the absolute path to your computer folder where the file will be saved including the file name.</div>
<div class="note"><em>PATH_FOR_SAVE</em> - абсолютный путь к папке на вашем компьютере, включая имя файла, в которую будет сохранён этот файл.</div>
<div id="java" class="header-gray copy-link">Java document save example</div>
<div id="java" class="header-gray copy-link">Пример сохранения документа на Java</div>
<pre>
public class IndexServlet extends HttpServlet {
@Override
@ -245,9 +236,9 @@ public class IndexServlet extends HttpServlet {
}
}
</pre>
<div class="note"><em>pathForSave</em> is the absolute path to your computer folder where the file will be saved including the file name.</div>
<div class="note"><em>pathForSave</em> - абсолютный путь к папке на вашем компьютере, включая имя файла, в которую будет сохранён этот файл.</div>
<div id="nodejs" class="header-gray copy-link">Node.js document save example</div>
<div id="nodejs" class="header-gray copy-link">Пример сохранения документа на Node.js</div>
<pre>
var fs = require("fs");
@ -282,9 +273,9 @@ app.post("/track", function (req, res) {
}
});
</pre>
<div class="note"><em>pathForSave</em> is the absolute path to your computer folder where the file will be saved including the file name.</div>
<div class="note"><em>pathForSave</em> - абсолютный путь к папке на вашем компьютере, включая имя файла, в которую будет сохранён этот файл.</div>
<div id="php" class="header-gray copy-link">PHP document save example</div>
<div id="php" class="header-gray copy-link">Пример сохранения документа на PHP</div>
<pre>
&lt;?php
@ -307,9 +298,9 @@ echo "{\"error\":0}";
?&gt;
</pre>
<div class="note"><em>$path_for_save</em> is the absolute path to your computer folder where the file will be saved including the file name.</div>
<div class="note"><em>$path_for_save</em> - абсолютный путь к папке на вашем компьютере, включая имя файла, в которую будет сохранён этот файл.</div>
<div id="ruby" class="header-gray copy-link">Ruby document save example</div>
<div id="ruby" class="header-gray copy-link">Пример сохранения документа на Ruby</div>
<pre>
class ApplicationController < ActionController::Base
def index
@ -340,5 +331,5 @@ class ApplicationController < ActionController::Base
end
end
</pre>
<div class="note"><em>path_for_save</em> is the absolute path to your computer folder where the file will be saved including the file name.</div>
<div class="note"><em>path_for_save</em> - абсолютный путь к папке на вашем компьютере, включая имя файла, в которую будет сохранён этот файл.</div>
</div>

View File

@ -1,6 +1,4 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
<%@ Control Language="C#" Inherits="BaseContentUserControls" %> <%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %><script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Document Permissions";
@ -8,12 +6,12 @@
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Document Permissions</h1>
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Разрешения документа</h1>
<div class="header-gray">Description</div>
<p class="dscr">The document permission section allows to change the permission for the document to be edited and downloaded or not.</p>
<div class="header-gray">Описание</div>
<p class="dscr">Раздел разрешений документа позволяет изменять права на его редактирование и скачивание.</p>
<div class="header-gray">Parameters</div>
<div class="header-gray">Параметры</div>
<table class="table">
<colgroup>
<col class="table-name" />
@ -23,80 +21,66 @@
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
<td>Имя</td>
<td>Описание</td>
<td>Тип</td>
<td>Пример</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="comment" class="copy-link">comment</td>
<td>Defines if the document can be commented or not. In case the commenting permission is set to <b>"true"</b> the document <b>side bar</b> will contain the <b>Comment</b> menu option; the document commenting will only be available for the document editor if the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> parameter is set to <b>edit</b>. The default value coincides with the value of the <a href="#edit">edit</a> parameter.</td>
<td>boolean</td>
<td>Определяет, можно ли оставлять комментарии к документу. В случае, если вышеописанный параметр установлен в значение <b>"true"</b>, <b>боковая панель</b> в редакторе документов будет иметь пункт меню <b>Комментирование</b>; комментирование документа будет доступно в редакторе документов только если параметр <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> установлен в значение <b>edit</b>. Значение по умолчанию совпадает со значением параметра <a href="#edit">edit</a>.</td>
<td>логический</td>
<td>true</td>
</tr>
</tbody>
</table>
<div class="note">
In case <em>edit</em> is set to <b>"true"</b> and <em>comment</em> is also set to <b>"true"</b>, the user will be able to edit the document and comment.
In case <em>edit</em> is set to <b>"true"</b> and <em>comment</em> is set to <b>"false"</b>, the user will be able to edit only, the corresponding commenting functionality will be available for viewing only, the adding and editing of comments will be unavailable.
In case <em>edit</em> is set to <b>"false"</b> and <em>comment</em> is set to <b>"true"</b>, the document will be available for commenting only.
In case <em>edit</em> is set to <b>"false"</b> and <em>review</em> is set to <b>"false"</b> and <em>comments</em> is set to <b>"true"</b> the <em>fillForms</em> value is not considered and filling the forms is not available.
</div>
<div class="note">В случае, если параметр <em>edit</em> установлен в значение <b>"true"</b> и параметр <em>comment</em> также установлен в значение <b>"true"</b>, пользователь сможет редактировать и комментировать документ. В случае, если параметр <em>edit</em> установлен в значение <b>"true"</b>, а параметр <em>comment</em> установлен в значение <b>"false"</b>, пользователь сможет лишь редактировать документ, добавление или редактирование комментариев будет невозможным. В случае, если параметр <em>edit</em> установлен в значение <b>"false"</b>, а параметр <em>comment</em> установлен в значение <b>"true"</b>, документ будет доступен только для комментирования. В случае, если параметр <em>edit</em> установлен в значение <b>"false"</b> и параметр <em>review</em> также имеет значение <b>"false"</b>, а параметр <em>comments</em> установлен в значение <b>"true"</b>, значение параметра <em>fillForms</em> не принимается во внимание и заполнение форм невозможно.</div>
<table class="table">
<tbody>
<tr class="tablerow">
<td id="download" class="copy-link">download</td>
<td>Defines if the document can be downloaded or only viewed or edited online. In case the downloading permission is set to <b>"false"</b> the <b>Download as...</b> menu option will be absent from the <b>File</b> menu. The default value is <b>true</b>.</td>
<td>boolean</td>
<td id="download" class="copy-link">скачать</td>
<td>Определяет, может ли документ быть скачан, или лишь может быть просмотрен и отредактирован онлайн. В случае если параметр разрешения на скачивание установлен в значение <b>"false"</b>, пункт меню <b>Скачать как...</b> не будет отображён в меню <b>Файл</b>. Значением по умолчанию является <b>true</b>.</td>
<td>логический</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="edit" class="copy-link">edit</td>
<td>Defines if the document can be edited or only viewed. In case the editing permission is set to <b>"true"</b> the <b>File</b> menu will contain the <b>Edit Document</b> menu option; please note that if the editing permission is set to <b>"false"</b> the document will be opened in viewer and you will <b>not</b> be able to switch it to the editor even if the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> parameter is set to <b>edit</b>. The default value is <b>true</b>.</td>
<td>boolean</td>
<td>Определяет, может ли документ быть отредактирован или лишь просмотрен. В случае если параметр разрешения на редактирование установлен в значение <b>"true"</b>, меню <b>Файл</b> будет содержать пункт <b>Редактировать документ</b>; учтите, пожалуйста, что, если параметр разрешения на редактирование установлен в значение <b>"false"</b>, документ будет открыт в режиме просмотра, и вы <b>не сможете</b> переключиться в режим редактирования, даже если параметр <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> установлен в значение <b>edit</b>. Значением по умолчанию является <b>true</b>.</td>
<td>логический</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="print" class="copy-link">print</td>
<td>Defines if the document can be printed or not. In case the printing permission is set to <b>"false"</b> the <b>Print</b> menu option will be absent from the <b>File</b> menu. The default value is <b>true</b>.</td>
<td>boolean</td>
<td>Определяет, можно ли распечатать документ. В случае если параметр разрешения на печать установлен в значение <b>"false"</b>, пункт меню <b>Распечатать</b> не будет отображён в меню <b>Файл</b>. Значением по умолчанию является <b>true</b>.</td>
<td>логический</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="fillForms" class="copy-link">fillForms</td>
<td>Defines if the forms can be filled. Filling in forms will only be available for the document editor if the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> parameter is set to <b>edit</b>. The default value coincides with the value of the <a href="#edit">edit</a> or the <a href="#review">review</a> parameter.</td>
<td>boolean</td>
<td>Определяет, могут ли формы быть заполнены. Заполнение форм будет доступно в редакторе документов только если параметр <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> установлен в значение <b>edit</b>. Значение по умолчанию совпадает со значением параметра <a href="#edit">edit</a> или параметра <a href="#review">review</a>.</td>
<td>логический</td>
<td>true</td>
</tr>
</tbody>
</table>
<div class="note">
In case <em>edit</em> is set to <b>"true"</b> or <em>review</em> is set to <b>"true"</b>, the <em>fillForms</em> value is not considered and the form filling is possible.
In case <em>edit</em> is set to <b>"false"</b> and <em>review</em> is set to <b>"false"</b> and <em>fillForms</em> is also set to <b>"true"</b>, the user can only fill forms in the document.
In case <em>edit</em> is set to <b>"false"</b> and <em>review</em> is set to <b>"false"</b> and <em>fillForms</em> is set to <b>"true"</b> the <em>comments</em> value is not considered and the commenting is not available.
The form filling only mode is currently available for <b>Document Editor</b> only.
</div>
<div class="note">В случае, если параметр <em>edit</em> установлен в значение <b>"true"</b> или параметр <em>review</em> установлен в значение <b>"true"</b>, значение параметра <em>fillForms</em> не принимается во внимание, и заполнение форм возможно. В случае, если параметр <em>edit</em> установлен в значение <b>"false"</b> и параметр <em>review</em> также имеет значение <b>"false"</b>, а значение параметра <em>fillForms</em> равно <b>"true"</b>, пользователь может заполнять лишь формы в документе. В случае, если параметр <em>edit</em> установлен в значение <b>"false"</b> и параметр <em>review</em> также имеет значение <b>"false"</b>, а параметр <em>fillForms</em> установлен в значение <b>"true"</b>, значение параметра <em>comments</em> не принимается во внимание и комментирование недоступно. На данный момент режим "Только заполнение форм" доступен лишь для <b>Редактора Документов</b>.</div>
<table class="table">
<tbody>
<tr class="tablerow">
<td id="review" class="copy-link">review</td>
<td>Defines if the document can be reviewed or not. In case the reviewing permission is set to <b>"true"</b> the document <b>status bar</b> will contain the <b>Review</b> menu option; the document review will only be available for the document editor if the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> parameter is set to <b>edit</b>. The default value coincides with the value of the <a href="#edit">edit</a> parameter.</td>
<td>boolean</td>
<td>Определяет, можно ли рецензировать документ. В случае, если параметр разрешения на рецензирование установлен в значение <b>"true"</b>, <b>строка состояния документа</b> будет иметь пункт меню <b>Рецензирование</b>; рецензирование документа будет доступно лишь в случае, если параметр <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">mode</a> установлен в значение <b>edit</b>. Значение по умолчанию совпадает со значением параметра <a href="#edit">edit</a>.</td>
<td>логический</td>
<td>true</td>
</tr>
</tbody>
</table>
<div class="note">
In case <em>edit</em> is set to <b>"true"</b> and <em>review</em> is also set to <b>"true"</b>, the user will be able to edit the document, accept/reject the changes made and switch to the review mode him-/herself.
In case <em>edit</em> is set to <b>"true"</b> and <em>review</em> is set to <b>"false"</b>, the user will be able to edit only.
In case <em>edit</em> is set to <b>"false"</b> and <em>review</em> is set to <b>"true"</b>, the document will be available in review mode only.
</div>
<div class="note">В случае, если параметр <em>edit</em> установлен в значение <b>"true"</b> и параметр <em>review</em> также установлен в значение <b>"true"</b>, пользователь сможет редактировать документ, принимать или отклонять выполненные в документе изменения и переключаться в режим рецензирования. В случае, если параметр <em>edit</em> установлен в значение <b>"true"</b>, а параметр <em>review</em> установлен в значение <b>"false"</b>, пользователь сможет лишь редактировать документ. В случае, если параметр <em>edit</em> установлен в значение <b>"false"</b>, а параметр <em>review</em> установлен в значение <b>"true"</b>, документ будет доступен только в режиме рецензирования.</div>
<div class="header-gray">Example</div>
<div class="header-gray">Пример</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"document": {

View File

@ -1,6 +1,4 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
<%@ Control Language="C#" Inherits="BaseContentUserControls" %> <%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %><script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Editor config";
@ -8,12 +6,12 @@
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Editor config</h1>
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Конфигурация редактора</h1>
<div class="header-gray">Description</div>
<p class="dscr">The editorConfig section allows to change the parameters pertaining to the editor interface: opening mode (viewer or editor), interface language, additional buttons, etc.).</p>
<div class="header-gray">Описание</div>
<p class="dscr">Раздел конфигурации редактора позволяет изменять параметры, относящиеся к интерфейсу редактора: режим открытия (просмотр или редактирование), язык интерфейса, дополнительные кнопки, и т.д.</p>
<div class="header-gray">Parameters</div>
<div class="header-gray">Параметры</div>
<table class="table">
<colgroup>
<col class="table-name" />
@ -23,125 +21,77 @@
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
<td>Имя</td>
<td>Описание</td>
<td>Тип</td>
<td>Пример</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="callbackUrl" class="copy-link">callbackUrl<span class="required">*</span></td>
<td>Specifies absolute URL to the <b>document storage service</b> (which <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx")%>">must be implemented</a> by the software integrators who use ONLYOFFICE Document Server on their own server).</td>
<td>string</td>
<td>Определяет абсолютную ссылку на <b>сервис хранения документов</b> (который <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx")%>">должнен быть разработан</a> интеграторами, которые используют Сервер документов на своём собственном сервере).</td>
<td>строка</td>
<td>"https://example.com/url-to-callback.ashx"</td>
</tr>
<tr class="tablerow">
<td id="createUrl" class="copy-link">createUrl</td>
<td>Defines the absolute URL of the document where it will be created and available after creation. If not specified, there will be no creation button.
</td>
<td>string</td>
<td>Определяет абсолютную ссылку расположения, по которому документ будет доступен после создания. Если не указано, то кнопка создания не будет отображена.</td>
<td>строка</td>
<td>"https://example.com/url-to-create-document/"</td>
</tr>
<tr class="tablerow">
<td id="lang" class="copy-link">lang</td>
<td>Defines the editor interface language (if some other languages other than English are present). Is set using the two letter (<b>de</b>, <b>ru</b>, <b>it</b>, etc.) or four letter (<b>en-US</b>, <b>fr-FR</b>, etc.) language codes. The default value is <b>"en-US"</b>.</td>
<td>string</td>
<td>"en-US"</td>
<td>Определяет язык интерфейса редактора (если доступны какие-либо другие языки, кроме русского), Устанавливается при помощи двух букв (<b>de</b>, <b>ru</b>, <b>it</b>, и т.д.) или четырёхсимвольных языкрвых кодов (<b>en-US</b>, <b>fr-FR</b>, и т.д.). Значением по умолчанию является <b>"ru-RU"</b>.</td>
<td>строка</td>
<td>"ru-RU"</td>
</tr>
<tr class="tablerow">
<td id="mode" class="copy-link">mode</td>
<td>Defines the editor opening mode. Can be either <b>view</b> to open the document for viewing, or <b>edit</b> to open the document in the editing mode allowing to apply changes to the document data. The default value is <b>"edit"</b>.</td>
<td>string</td>
<td>Определяет режим открытия редактора документов. Может быть равным <b>view</b>, для открытия документа для просмотра, или <b>edit</b> - для открытия на редактирование. Значением по умолчанию является <b>"edit"</b>.</td>
<td>строка</td>
<td>"edit"</td>
</tr>
<tr>
<td id="recent" class="copy-link">recent</td>
<td>Defines the presence or absence of the documents in the <b>Open Recent...</b> menu option where the following document parameters can be set:
<ul>
<li>
<b>folder</b> - the folder where the document is stored (can be empty in case the document is stored in the root folder),
<br />
<b>type</b>: string,
<br />
<b>example</b>: "Example Files";
</li>
<li>
<b>title</b> - the document title that will be displayed in the <b>Open Recent...</b> menu option,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "exampledocument1.docx";
</li>
<li>
<b>url</b> - the absolute URL to the document where it is stored,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com/exampledocument1.docx".
</li>
<td>Определяет наличие или отсутствие документов в пункте меню <b>Открыть последние...</b>, значение которого может быть задано следующим образом:<ul>
<li><b>folder</b> - папка, в которой хранится документ (может быть пустым, в случае, если документ хранится в корневой директории), <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "Примеры файлов";</li>
<li><b>Title</b> - зголовок документа, который будет отображён в пункте меню <b>Открыть последние...</b>, <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "exampledocument1.docx";</li>
<li><b>url</b> - абсолютная ссылка на место расположения файла документа, <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "https://example.com/exampledocument1.docx".</li>
</ul>
</td>
<td>array of object</td>
<td>массив объектов</td>
<td></td>
</tr>
<tr class="tablerow">
<td id="user" class="copy-link">user</td>
<td>Defines the user currently viewing or editing the document:
<ul>
<li>
<b>firstname</b> - the first name of the user. Deprecated since version 4.2, please use name instead,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "John";
</li>
<li>
<b>id</b> - the identification of the user,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "78e1e841";
</li>
<li>
<b>lastname</b> - the last name of the user. Deprecated since version 4.2, please use name instead,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "Smith";
</li>
<li>
<b>name</b> - the full name of the user. Used since version 4.2,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "John Smith".
</li>
<td>Определяет пользователя, который в данный момент просматривает или редактирует документ:<ul>
<li><b>firstname</b> - имя пользователя. Удалено, начиная с версии 4.2, пожалуйста, используйте параметр name, <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "Иван";</li>
<li><b>Id</b> - идентификатор пользователя, <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "78e1e841";</li>
<li><b>lastname</b> - фамилия пользователя. Удалено, начиная с версии 4.2, пожалуйста, используйте параметр name, <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "Smith";</li>
<li><b>name</b> - полное имя пользователя. Используется, начиная с версии 4.2, <br /> <b>тип</b>: строка, <br /> <b>пример</b>: "John Smith".</li>
</ul>
</td>
<td>object</td>
<td>объект</td>
<td></td>
</tr>
</tbody>
</table>
<span class="required-descr"><span class="required">*</span><em> - required field</em></span>
<div class="header-gray">Example</div>
</table><span class="required-descr"><span class="required">*</span><em> - обязательное поле</em></span><div class="header-gray">Пример</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"editorConfig": {
"callbackUrl": "https://example.com/url-to-callback.ashx",
"createUrl": "https://example.com/url-to-create-document/",
"lang": "en-US",
"lang": "ru-RU",
"mode": "edit",
"recent": [
{
"folder": "Example Files",
"folder": "Примеры файлов",
"title": "exampledocument1.docx",
"url": "https://example.com/exampledocument1.docx"
},
{
"folder": "Example Files",
"folder": "Примеры файлов",
"title": "exampledocument2.docx",
"url": "https://example.com/exampledocument2.docx"
},
@ -149,12 +99,12 @@ var docEditor = new DocsAPI.DocEditor("placeholder", {
],
"user": {
"id": "78e1e841",
"name": "John Smith"
"name": "Иван Петров"
}
},
...
});
</pre>
<p>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. See the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/howitworks.aspx")%>">How it works</a> section to find out more on Document Server service client-server interactions.</p>
<p>Где <b>example.com</b> - имя сервера, на котором установлены <b>менеджер документов</b> и <b>сервис хранения документов</b>. Смотрите раздел <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/howitworks.aspx")%>">Как это работает</a>, чтобы узнать больше о клиент-серверных взаимодействиях Сервера документов.</p>
</div>

View File

@ -169,6 +169,4 @@ var docEditor = new DocsAPI.DocEditor("placeholder", {
});
</pre>
<p>Где <b>example.com</b> - имя сервера, на котором установлены <b>менеджер документов</b> и <b>сервис хранения документов</b>. Смотрите раздел <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/howitworks.aspx")%>">Как это работает</a>, чтобы узнать больше о клиент-серверных взаимодействиях Сервера документов.</p>
<p>Если у вас есть дополнительные вопросы, пожалуйста, свяжитесь с нами по адресу <a href="mailto:integration@onlyoffice.com" onclick="if(window.ga){window.ga('send','event','mailto');}return true;">integration@onlyoffice.com</a>.</p>
</div>

View File

@ -72,6 +72,4 @@ var docEditor = new DocsAPI.DocEditor("placeholder", {
</pre>
<p>Где <b>example.com</b> - имя сервера, на котором расположены плагины, а также установлены <b>менеджер документов</b> и <b>сервис хранения документов</b>. Смотрите раздел <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/howitworks.aspx")%>">Как это работает</a>, чтобы узнать больше о клиент-серверных взаимодействиях Сервера документов.</p>
<p>Если у вас есть дополнительные вопросы, пожалуйста, свяжитесь с нами по адресу <a href="mailto:integration@onlyoffice.com" onclick="if(window.ga){window.ga('send','event','mailto');}return true;">integration@onlyoffice.com</a>.</p>
</div>