R7-Office: started adding documentation on Document Server API

This commit is contained in:
alexandervnuchkov 2019-02-15 18:37:59 +03:00
parent f9adfb7e1b
commit 1bd47b1dee
61 changed files with 4736 additions and 3 deletions

View File

@ -25,6 +25,7 @@
--><li class="pushy-submenu"><a class="menuitem" id="navitem_api">API документация</a>
<div id="navitem_api_menu">
<ul class="dropdown-content">
<li id="navitem_apieditors"><a class="dropdown-item" href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/basic.aspx")%>">Сервер документов</a></li>
<li id="navitem_plugins"><a class="dropdown-item" href="<%=VirtualPathUtility.ToAbsolute("~/api/plugins/index.aspx")%>">Плагины</a></li>
<li id="navitem_portals"><a class="dropdown-item" href="<%=VirtualPathUtility.ToAbsolute("~/api/portals/index.aspx")%>">Р7-Офис. Сервер</a></li>
</ul>

View File

@ -0,0 +1,178 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Advanced parameters";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Advanced parameters</h1>
<p class="dscr">The parameters, which can be changed for ONLYOFFICE Document Server, can be subdivided into the following main sections:</p>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/.aspx")%>"><b>config</b></a> - allows to change the platform type used, document display size (width and height) and type of the document opened;
<ul>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document.aspx")%>"><b>document</b></a> - contains all the parameters pertaining to the document (title, url, file type, etc.);
<ul>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document/info.aspx")%>"><b>info</b></a> - contains additional parameters for the document (document author, folder where the document is stored, creation date, sharing settings);
</li>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document/permissions.aspx")%>"><b>permissions</b></a> - defines whether the document can be edited and downloaded or not;
</li>
</ul>
</li>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx")%>"><b>editorConfig</b></a> - defines parameters pertaining to the editor interface: opening mode (viewer or editor), interface language, additional buttons, etc.);
<ul>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/customization.aspx")%>"><b>customization</b></a> - allows to customize the editor interface so that it looked like your other products (if there are any) and change the presence or absence of the additional buttons, links, change logos and editor owner details;
</li>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/embedded.aspx")%>"><b>embedded</b></a> - is used for the embedded document type only and allows to change the behavior of the buttons used to control the embedded mode;
</li>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/plugins.aspx")%>"><b>plugins</b></a> - is used to connect the necessary <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/plugins.aspx")%>">plugins</a> to your Document Server, so that they become visible to all document editor users;
</li>
</ul>
</li>
<li>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx")%>"><b>events</b></a> - is the list of special events called when some action is applied to the document (when it is loaded, modified, etc.).
</li>
</ul>
<p>The complete <em>config</em> with all the additional parameters looks the following way:</p>
<pre>
config = {
"document": {
"fileType": "docx",
"info": {
"author": "John Smith",
"created": "2010-07-07 3:46 PM",
"folder": "Example Files",
"sharingSettings": [
{
"permissions": "Full Access",
"user": "John Smith"
},
{
"permissions": "Read Only",
"user": "Kate Cage"
},
...
]
},
"key": "Khirz6zTPdfd7",
"permissions": {
"comment": true,
"download": true,
"edit": true,
"fillForms": true,
"print": true,
"review": true
},
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
},
"documentType": "text",
"editorConfig": {
"callbackUrl": "https://example.com/url-to-callback.ashx",
"createUrl": "https://example.com/url-to-create-document/",
"customization": {
"autosave": true,
"chat": true,
"commentAuthorOnly": false,
"compactToolbar": false,
"customer": {
"address": "My City, 123a-45",
"info": "Some additional information",
"logo": "https://example.com/logo-big.png",
"mail": "john@example.com",
"name": "John Smith and Co.",
"www": "example.com"
},
"feedback": {
"url": "https://example.com",
"visible": true
},
"forcesave": false,
"goback": {
"blank": true,
"text": "Go to Documents",
"url": "https://example.com"
},
"help": true,
"logo": {
"image": "https://example.com/logo.png",
"imageEmbedded": "https://example.com/logo_em.png",
"url": "https://example.com"
},
"showReviewChanges": false,
"zoom": 100
},
"embedded": {
"embedUrl": "https://example.com/embedded?doc=exampledocument1.docx",
"fullscreenUrl": "https://example.com/embedded?doc=exampledocument1.docx#fullscreen",
"saveUrl": "https://example.com/download?doc=exampledocument1.docx",
"shareUrl": "https://example.com/view?doc=exampledocument1.docx",
"toolbarDocked": "top"
},
"lang": "en-US",
"mode": "edit",
"plugins": {
"autostart": [
"asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}",
"asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}",
...
],
"pluginsData": [
"https://example.com/plugin1/config.json",
"https://example.com/plugin2/config.json",
...
]
},
"recent": [
{
"folder": "Example Files",
"title": "exampledocument1.docx",
"url": "https://example.com/exampledocument1.docx"
},
{
"folder": "Example Files",
"title": "exampledocument2.docx",
"url": "https://example.com/exampledocument2.docx"
},
...
],
"user": {
"id": "78e1e841",
"name": "John Smith"
}
},
"events": {
"onAppReady": onAppReady,
"onCollaborativeChanges": onCollaborativeChanges,
"onDocumentReady": onDocumentReady,
"onDocumentStateChange": onDocumentStateChange,
"onDownloadAs": onDownloadAs,
"onError": onError,
"onInfo": onInfo,
"onOutdatedVersion": onOutdatedVersion,
"onRequestClose": onRequestClose,
"onRequestEditRights": onRequestEditRights,
"onRequestHistory": onRequestHistory,
"onRequestHistoryClose": onRequestHistoryClose,
"onRequestHistoryData": onRequestHistoryData,
"onWarning": onWarning
},
"height": "100%",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M",
"type": "desktop",
"width": "100%"
};
</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>
</div>

View File

@ -0,0 +1,63 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Basic concepts";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Basic concepts</h1>
<p class="dscr">ONLYOFFICE Document Server API is used to let the developers integrate the ONLYOFFICE Document/Spreadsheet/Presentation Editors into their own web sites and setup and manage the editors.</p>
<p>The API JavaScript file can normally be found in the following editors folder:</p>
<p><b>https://documentserver/web-apps/apps/api/documents/api.js</b></p>
<p>Where the <b>documentserver</b> is the name of the server with the ONLYOFFICE Document Server installed.</p>
<div class="note">
For <b>Document Server</b> versions prior to 4.0 the path to the API JavaScript file will look like this:
<br />
<b>https://documentserver/OfficeWeb/apps/api/documents/api.js</b>
</div>
<p>The target HTML file where the editors are to be embedded need to have a placeholder <em>div</em> tag, where all the information about the editor parameters will be passed:</p>
<pre>
&lt;div id=&quot;placeholder&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://documentserver/web-apps/apps/api/documents/api.js&quot;&gt;&lt;/script&gt;
</pre>
<p>The page code containing the changeable parameters looks the following way:</p>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", config);
</pre>
<p>Where <em>config</em> is an object:</p>
<pre>
config = {
"document": {
"fileType": "docx",
"key": "Khirz6zTPdfd7",
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
},
"documentType": "text",
"editorConfig": {
"callbackUrl": "https://example.com/url-to-callback.ashx"
}
};
</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>From now the <i>docEditor</i> object can be used to call the <b>document editor</b> <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx")%>">Methods</a>.</p>
<p>The example above includes all the parameters necessary for Document Server correct startup. There are additional non-obligatory parameters though which can be changed to achieve different goals with your document (change access rights for the document, display different information about the document, etc.) See the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/advanced.aspx")%>">Advanced parameters</a> section to find out what these parameters are and how you can change them.</p>
<h2>Support</h2>
<p>
You can ask our developers at <a href="http://dev.onlyoffice.org/viewforum.php?f=9" target="_blank">dev.onlyoffice.org</a> (registration required).
</p>
</div>

View File

@ -0,0 +1,344 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Callback handler";
MetaDescription = "Статьи документации по API сервера документов.";
}
</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>
<h2>Parameters and their description:</h2>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 100px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</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>
</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>
</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>
</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>
</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>
</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>
</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>
</ul>
</td>
<td>integer</td>
<td>required</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>
</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>
</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>
</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>
<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>
<pre>
{
"actions": [{"type": 1, "userid": "78e1e841"}],
"key": "Khirz6zTPdfd7",
"status": 1,
"users": ["6d5a81d0", "78e1e841"]
}
</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>
<pre>
{
"actions": [{"type": 0, "userid": "78e1e841"}],
"changesurl": "https://documentserver/url-to-changes.zip",
"history": {
"changes": changes,
"serverVersion": serverVersion
},
"key": "Khirz6zTPdfd7",
"status": 2,
"url": "https://documentserver/url-to-edited-document.docx",
"users": ["6d5a81d0"]
}
</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>
<pre>
{
"key": "Khirz6zTPdfd7",
"status": 4
}
</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>
<pre>
{
"changesurl": "https://documentserver/url-to-changes.zip",
"forcesavetype": 0,
"history": {
"changes": changes,
"serverVersion": serverVersion
},
"key": "Khirz6zTPdfd7",
"status": 6,
"url": "https://documentserver/url-to-edited-document.docx",
"users": ["6d5a81d0"],
"userdata": "sample userdata"
}
</pre>
<div id="error-0" class="header-gray copy-link">Response from the document storage service</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>
<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>
<div id="csharp" class="header-gray copy-link">.Net (C#) document save example</div>
<pre>
public class WebEditor : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string body;
using (var reader = new StreamReader(context.Request.InputStream))
body = reader.ReadToEnd();
var fileData = new JavaScriptSerializer().Deserialize&lt;Dictionary&lt;string, object&gt;&gt;(body);
if ((int) fileData["status"] == 2)
{
var req = WebRequest.Create((string) fileData["url"]);
using (var stream = req.GetResponse().GetResponseStream())
using (var fs = File.Open(PATH_FOR_SAVE, FileMode.Create))
{
var buffer = new byte[4096];
int readed;
while ((readed = stream.Read(buffer, 0, 4096)) != 0)
fs.Write(buffer, 0, readed);
}
}
context.Response.Write("{\"error\":0}");
}
}
</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 id="java" class="header-gray copy-link">Java document save example</div>
<pre>
public class IndexServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter writer = response.getWriter();
Scanner scanner = new Scanner(request.getInputStream()).useDelimiter("\\A");
String body = scanner.hasNext() ? scanner.next() : "";
JSONObject jsonObj = (JSONObject) new JSONParser().parse(body);
if((long) jsonObj.get("status") == 2)
{
String downloadUri = (String) jsonObj.get("url");
URL url = new URL(downloadUri);
java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection();
InputStream stream = connection.getInputStream();
File savedFile = new File(pathForSave);
try (FileOutputStream out = new FileOutputStream(savedFile)) {
int read;
final byte[] bytes = new byte[1024];
while ((read = stream.read(bytes)) != -1) {
out.write(bytes, 0, read);
}
out.flush();
}
connection.disconnect();
}
writer.write("{\"error\":0}");
}
}
</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 id="nodejs" class="header-gray copy-link">Node.js document save example</div>
<pre>
var fs = require("fs");
app.post("/track", function (req, res) {
var updateFile = function (response, body, path) {
if (body.status == 2)
{
var file = syncRequest("GET", body.url);
fs.writeFileSync(path, file.getBody());
}
response.write("{\"error\":0}");
response.end();
}
var readbody = function (request, response, path) {
var content = "";
request.on("data", function (data) {
content += data;
});
request.on("end", function () {
var body = JSON.parse(content);
updateFile(response, body, path);
});
}
if (req.body.hasOwnProperty("status")) {
updateFile(res, req.body, pathForSave);
} else {
readbody(req, res, pathForSave)
}
});
</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 id="php" class="header-gray copy-link">PHP document save example</div>
<pre>
&lt;?php
if (($body_stream = file_get_contents("php://input"))===FALSE){
echo "Bad Request";
}
$data = json_decode($body_stream, TRUE);
if ($data["status"] == 2){
$downloadUri = $data["url"];
if (($new_data = file_get_contents($downloadUri))===FALSE){
echo "Bad Response";
} else {
file_put_contents($path_for_save, $new_data, LOCK_EX);
}
}
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 id="ruby" class="header-gray copy-link">Ruby document save example</div>
<pre>
class ApplicationController < ActionController::Base
def index
body = request.body.read
file_data = JSON.parse(body)
status = file_data["status"].to_i
if status == 2
download_uri = file_data["url"]
uri = URI.parse(download_uri)
http = Net::HTTP.new(uri.host, uri.port)
if download_uri.start_with?("https")
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
req = Net::HTTP::Get.new(uri.request_uri)
res = http.request(req)
data = res.body
File.open(path_for_save, "wb") do |file|
file.write(data)
end
end
render :text => "{\"error\":0}"
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>

View File

@ -0,0 +1,78 @@
<%@ 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>&lt;div id=&quot;placeholder&quot;&gt;&lt;/div&gt;</pre>
</li>
<li>Specify your ONLYOFFICE Document Server link with the JavaScript API that will be used for your website.
<pre>&lt;script type=&quot;text/javascript&quot; src=&quot;https://documentserver/web-apps/apps/api/documents/api.js&quot;&gt;&lt;/script&gt;</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>

View File

@ -0,0 +1,169 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Command service";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Command service</h1>
<p class="dscr">For the interaction with the <b>document command service</b> the POST requests are used. The request parameters are entered in JSON format in the request body. The requests are sent to the <span class="fakelink">https://documentserver/coauthoring/CommandService.ashx</span> address where the <b>documentserver</b> is the name of the server with the ONLYOFFICE Document Server installed.</p>
<div class="note">In <b>ONLYOFFICE Document Server</b> prior to version 4.2 the GET request with the parameters in the <em>QueryString</em> were used.</div>
<h2>Parameters and their description:</h2>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 150px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="c" class="copy-link">c</td>
<td>Defined the type of command.<br />
Supported values:
<ul>
<li><b>drop</b> - disconnect the users with the identifiers present in the <em>users</em> parameter from the <b>document editing service</b> (these users will be able to view the document, but will not be allowed to make changes to it);</li>
<li><b>forcesave</b> - force saving the document being edited without closing it (the document editing might be continued after this command, so this will not be the final saved document version);</li>
<li><b>info</b> - receive a document status;</li>
<li><b>version</b> - receive the current version number of Document Server.</li>
</ul>
</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td id="key" class="copy-link">key</td>
<td>Defines the document identifier used to unambiguously identify the document file.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td id="userdata" class="copy-link">userdata</td>
<td>Defines some custom identifier which will help distinguish the specific request in case there were more than one.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td id="users" class="copy-link">users</td>
<td>Defines the list of the user identifiers (used for the <em>c=drop</em> parameter value).</td>
<td>array of strings</td>
<td>optional</td>
</tr>
</tbody>
</table>
<div id="drop" class="header-gray copy-link">Sample of JSON object sent to <b>document command service</b> used to disconnect the user with the <em>6d5a81d0</em> identifier from the document editing service</div>
<pre>
{
"c": "drop",
"key": "Khirz6zTPdfd7",
"users": [ "6d5a81d0" ]
}
</pre>
<div id="forcesave" class="header-gray copy-link">Sample of JSON object sent to <b>document command service</b> used for force saving the document with the <em>6d5a81d0</em> identifier being edited without closing it</div>
<pre>
{
"c": "forcesave",
"key": "Khirz6zTPdfd7",
"userdata": "sample userdata"
}
</pre>
<div id="info" class="header-gray copy-link">Sample of JSON object sent to <b>document command service</b> used to receive the status of the document with the <em>Khirz6zTPdfd7</em> identifier</div>
<pre>
{
"c": "info",
"key": "Khirz6zTPdfd7"
}
</pre>
<p>The request result is returned in JSON form.</p>
<div class="header-gray">Sample of the response</div>
<pre>
{
"error": 0,
"key": "Khirz6zTPdfd7"
}
</pre>
<div id="version" class="header-gray copy-link">Sample of JSON object sent to <b>document command service</b> used to receive the current version number of Document Server</div>
<pre>
{
"c": "version"
}
</pre>
<p>The request result of version is returned in JSON form.</p>
<div class="header-gray">Sample of the response</div>
<pre>
{
"error": 0,
"version": "4.3.1.4"
}
</pre>
<p>The <b>document editing service</b> informs the <b>document storage service</b> about the result caused by command using the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx")%>">callback handler</a>.</p>
<div class="header-gray">Possible error codes and their description</div>
<table class="table">
<colgroup>
<col style="width: 105px;" />
<col />
</colgroup>
<thead>
<tr class="tablerow">
<td>Error code</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>0</td>
<td>No errors.</td>
</tr>
<tr class="tablerow">
<td>1</td>
<td>Document key is missing or no document with such key could be found.</td>
</tr>
<tr class="tablerow">
<td>2</td>
<td>Callback url not correct.</td>
</tr>
<tr class="tablerow">
<td>3</td>
<td>Internal server error.</td>
</tr>
<tr class="tablerow">
<td>4</td>
<td>No changes were applied to the document before the <b>forcesave</b> command was received.</td>
</tr>
<tr class="tablerow">
<td>5</td>
<td>Command not correct.</td>
</tr>
<tr class="tablerow">
<td>6</td>
<td>Invalid token.</td>
</tr>
<%--<tr class="tablerow">
<td>7</td>
<td>Token signature is expired.</td>
</tr>--%>
</tbody>
</table>
</div>

View File

@ -0,0 +1,86 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Config";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Config</h1>
<div class="header-gray">Description</div>
<p class="dscr">The config base section allows to change the platform type used, document display size (width and height) and type of the document opened.</p>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="documentType" class="copy-link">documentType</td>
<td>Defines the document type to be opened:
<em>open a text document (.doc, .docm, .docx, .dot, .dotm, .dotx, .epub, .fodt, .htm, .html, .mht, .odt, .ott, .pdf, .rtf, .txt, .djvu, .xps) for viewing or editing</em> - <b>text</b>,
<em>open a spreadsheet (.csv, .fods, .ods, .ots, .xls, .xlsm, .xlsx, .xlt, .xltm, .xltx) for viewing or editing</em> - <b>spreadsheet</b>,
<em>open a presentation (.fodp, .odp, .otp, .pot, .potm, .potx, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx) for viewing or editing</em> - <b>presentation</b>.
</td>
<td>string</td>
<td>"spreadsheet"</td>
</tr>
<tr class="tablerow">
<td id="height" class="copy-link">height</td>
<td>Defines the document height (<b>100%</b> by default) in the browser window.</td>
<td>string</td>
<td>"100%"</td>
</tr>
<tr class="tablerow">
<td id="token" class="copy-link">token</td>
<td>Defines the encrypted signature added to the <b>Document Server</b> config in the form of a <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/browser.aspx#config")%>">token</a>.</td>
<td>string</td>
<td>"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M"</td>
</tr>
<tr class="tablerow">
<td id="type" class="copy-link">type</td>
<td>Defines the platform type used to access the document. Can be:
<em>optimized to access the document from a desktop or laptop computer</em> - <b>desktop</b>,
<em>optimized to access the document from a tablet or a smartphone</em> - <b>mobile</b>,
<em>specifically formed to be easily embedded into a web page</em> - <b>embedded</b>.
The default value is <b>"desktop"</b>.
</td>
<td>string</td>
<td>"desktop"</td>
</tr>
<tr class="tablerow">
<td id="width" class="copy-link">width</td>
<td>Defines the document width (<b>100%</b> by default) in the browser window.</td>
<td>string</td>
<td>"100%"</td>
</tr>
</tbody>
</table>
<div class="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"documentType": "text",
"height": "100%",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M",
"type": "desktop",
"width": "100%",
...
});
</pre>
</div>

View File

@ -0,0 +1,77 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Document";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Document</h1>
<div class="header-gray">Description</div>
<p class="dscr">The document section allows to change all the parameters pertaining to the document (title, url, file type, etc.).</p>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="fileType" class="copy-link">fileType<span class="required">*</span></td>
<td>Defines the type of the file for the source viewed or edited document.</td>
<td>string</td>
<td>"docx"</td>
</tr>
<tr class="tablerow">
<td id="key" class="copy-link">key<span class="required">*</span></td>
<td>Defines the unique document identifier used for document recognition by the service. In case the known key is sent the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the <b>key</b> but without the special characters and the length is limited to 20 symbols.</td>
<td>string</td>
<td>"Khirz6zTPdfd7"</td>
</tr>
<tr class="tablerow">
<td id="title" class="copy-link">title<span class="required">*</span></td>
<td>Defines the desired file name for the viewed or edited document which will also be used as file name when the document is downloaded.</td>
<td>string</td>
<td>"Example Document Title.docx"</td>
</tr>
<tr class="tablerow">
<td id="url" class="copy-link">url<span class="required">*</span></td>
<td>Defines the absolute URL where the source viewed or edited document is stored.</td>
<td>string</td>
<td>"https://example.com/url-to-example-document.docx"</td>
</tr>
</tbody>
</table>
<span class="required-descr"><span class="required">*</span><em> - required field</em></span>
<div class="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"document": {
"fileType": "docx",
"key": "Khirz6zTPdfd7",
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx",
},
...
});
</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>
<div class="note">The key characters can be used: <b>0-9</b>, <b>a-z</b>, <b>A-Z</b>, <b>-._=</b>. The maximal key length is <b>20</b> characters.</div>
</div>

View File

@ -0,0 +1,112 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Document Info";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Document Info</h1>
<div class="header-gray">Description</div>
<p class="dscr">The document info section allows to change additional parameters for the document (document author, folder where the document is stored, creation date, sharing settings).</p>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="author" class="copy-link">author</td>
<td>Defines the name of the document author/creator.</td>
<td>string</td>
<td>"John Smith"</td>
</tr>
<tr class="tablerow">
<td id="created" class="copy-link">created</td>
<td>Defines the document creation date.</td>
<td>string</td>
<td>"2010-07-07 3:46 PM"</td>
</tr>
<tr class="tablerow">
<td id="folder" class="copy-link">folder</td>
<td>Defines the folder where the document is stored (can be empty in case the document is stored in the root folder).</td>
<td>string</td>
<td>"Example Files"</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/info.png")%>" alt="" />
</td>
</tr>
<tr class="tablerow">
<td id="sharingSettings" class="copy-link">sharingSettings</td>
<td>Displays the information about the settings which allow to share the document with other users:
<ul>
<li>
<b>permissions</b> - the access rights for the user with the name above. Can be <b>Full Access</b>, <b>Read Only</b> or <b>Deny Access</b>
<br />
<b>type</b>: string
<br />
<b>example</b>: "Full Access"
</li>
<li>
<b>user</b> - the name of the user the document will be shared with
<br />
<b>type</b>: string
<br />
<b>example</b>: "John Smith".
</li>
</ul>
</td>
<td>array of object</td>
<td></td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/sharing_settings.png")%>" alt="" />
</td>
</tr>
</tbody>
</table>
<div class="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"document": {
"info": {
"author": "John Smith",
"created": "2010-07-07 3:46 PM",
"folder": "Example Files",
"sharingSettings": [
{
"permissions": "Full Access",
"user": "John Smith"
},
{
"permissions": "Read Only",
"user": "Kate Cage"
},
...
]
},
...
},
...
});
</pre>
</div>

View File

@ -0,0 +1,136 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Document Permissions";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Document Permissions</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">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</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>true</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/comment.png")%>" alt="" />
</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>
<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>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>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>true</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/permissions.png")%>" alt="" />
</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>true</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/fill-forms.png")%>" alt="" />
</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>
<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>true</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/review.png")%>" alt="" />
</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="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"document": {
"permissions": {
"comment": true,
"download": true,
"edit": true,
"fillForms": true,
"print": true,
"review": true
},
...
},
...
});
</pre>
</div>

View File

@ -0,0 +1,170 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Editor config";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Editor config</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">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</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>"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>"https://example.com/url-to-create-document/"</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/create.png")%>" alt="" />
</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>
</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>"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>
</ul>
</td>
<td>array of object</td>
<td></td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/recent.png")%>" alt="" />
</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>
</ul>
</td>
<td>object</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>
<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",
"mode": "edit",
"recent": [
{
"folder": "Example Files",
"title": "exampledocument1.docx",
"url": "https://example.com/exampledocument1.docx"
},
{
"folder": "Example Files",
"title": "exampledocument2.docx",
"url": "https://example.com/exampledocument2.docx"
},
...
],
"user": {
"id": "78e1e841",
"name": "John Smith"
}
},
...
});
</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>
</div>

View File

@ -0,0 +1,269 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Customization";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Customization</h1>
<div class="header-gray">Description</div>
<p class="dscr">The customization section allows to customize the editor interface so that it looked like your other products (if there are any) and change the presence or absence of the additional buttons, links, change logos and editor owner details.</p>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="autosave" class="copy-link">autosave</td>
<td>Defines if the <b>Autosave</b> menu option is enabled or disabled. If set to <b>false</b>, only <em>Strict</em> co-editing mode can be selected, as <em>Fast</em> does not work without autosave. Please note that in case you change this option in menu it will be saved to your browser localStorage. The default value is <b>true</b>.</td>
<td>boolean</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="chat" class="copy-link">chat</td>
<td>Defines if the <b>Chat</b> menu button is displayed or hidden; please note that in case you hide the <b>Chat</b> button, the corresponding chat functionality will also be disabled. The default value is <b>true</b>.</td>
<td>boolean</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="commentAuthorOnly" class="copy-link">commentAuthorOnly</td>
<td>Defines if the user can edit only his comments. The default value is <b>false</b>.</td>
<td>boolean</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="comments" class="copy-link">comments</td>
<td>Defines if the <b>Comments</b> menu button is displayed or hidden; please note that in case you hide the <b>Comments</b> button, the corresponding commenting functionality will be available for viewing only, the adding and editing of comments will be unavailable. Deprecated since version 4.4, please use <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document/permissions.aspx#comment")%>">document.permissions.comment</a> instead.</td>
<td>boolean</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="compactToolbar" class="copy-link">compactToolbar</td>
<td>Defines if the top toolbar type displayed is full (<b>false</b>) or compact <b>true</b>. The default value is <b>false</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td id="customer" class="copy-link">customer<span class="required">*</span></td>
<td>Contains the information for the editor <b>About</b> section. The object has the following parameters:
<ul>
<li><b>address</b> - postal address of the above company or person,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "My City, 123a-45";
</li>
<li><b>info</b> - some information about the above company or person which will be displayed at the <b>About</b> page and visible to all editor users,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "Some additional information";
</li>
<li><b>logo</b> - the path to the image logo which will be displayed at the <b>About</b> page (there are no special recommendations for this file, but it would be better if it were in .png format with transparent background). The image must have the following size: 432x70,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com/logo-big.png".
</li>
<li><b>mail</b> - email address of the above company or person,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "john@example.com".
</li>
<li><b>name</b> - the name of the company or person who gives access to the editors or the editor authors,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "John Smith and Co.";
</li>
<li><b>www</b> - home website address of the above company or person,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "example.com".
</li>
</ul>
</td>
<td>object</td>
<td></td>
</tr>
<tr class="tablerow">
<td id="feedback" class="copy-link">feedback</td>
<td>Defines settings for the <b>Feedback &amp; Support</b> menu button. Can be either boolean (simply displays or hides the <b>Feedback &amp; Support</b> menu button) or object. In case of object type the following parameters are available:
<ul>
<li><b>url</b> - the absolute URL to the website address which will be opened when clicking the <b>Feedback &amp; Support</b> menu button,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com";
</li>
<li><b>visible</b> - show or hide the <b>Feedback &amp; Support</b> menu button,
<br />
<b>type</b>: boolean,
<br />
<b>example</b>: true.
</li>
</ul>
The default value is <b>false</b>.
</td>
<td>boolean or object</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="forcesave" class="copy-link">forcesave</td>
<td>Adds the request for the forced file saving to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#forcesavetype")%>">callback handler</a> when saving the document within the <b>document editing service</b> (e.g. clicking the <b>Save</b> button, etc.). The default value is <b>false</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td id="goback" class="copy-link">goback</td>
<td>Defines settings for the <b>Go to Documents</b> menu button and upper right corner button. The object has the following parameters:
<ul>
<li><b>blank</b> - open the website in the new browser tab/window (if the value is set to <em>true</em>) or the current tab (if the value is set to <em>false</em>) when the <b>Go to Documents</b> button is clicked. The default value is <b>true</b>,
<br />
<b>type</b>: boolean,
<br />
<b>example</b>: true;
</li>
<li><b>text</b> - the text which will be displayed for the <b>Go to Documents</b> menu button and upper right corner button (i.e. instead of <em>Go to Documents</em>),
<br />
<b>type</b>: string,
<br />
<b>example</b>: "Go to Documents";
</li>
<li><b>url</b> - the absolute URL to the website address which will be opened when clicking the <b>Go to Documents</b> menu button,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com".
</li>
</ul>
</td>
<td>boolean or object</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td id="help" class="copy-link">help</td>
<td>Defines if the <b>Help</b> menu button is displayed or hidden.
The default value is <b>true</b>.</td>
<td>boolean</td>
<td>true</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/help.png")%>" alt="" />
</td>
</tr>
<tr class="tablerow">
<td id="logo" class="copy-link">logo<span class="required">*</span></td>
<td>Changes the image file at the top left corner of the Editor header. The recommended image height is 20 pixels. The object has the following parameters:
<ul>
<li><b>image</b> - path to the image file used to show in common work mode (i.e. in view and edit modes for all editors). The image must have the following size: 172x40,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com/logo.png";
</li>
<li><b>imageEmbedded</b> - path to the image file used to show in the embedded mode (see the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/.aspx#type")%>">config</a> section to find out how to define the <b>embedded</b> document type). The image must have the following size: 248x40,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com/logo_em.png";
</li>
<li><b>url</b> - the absolute URL which will be used when someone clicks the logo image (can be used to go to your web site, etc.). Leave as an empty string or <em>null</em> to make the logo not clickable,
<br />
<b>type</b>: string,
<br />
<b>example</b>: "https://example.com".
</li>
</ul>
</td>
<td>object</td>
<td></td>
</tr>
<tr class="tablerow">
<td id="showReviewChanges" class="copy-link">showReviewChanges</td>
<td>Defines if the review changes panel is automatically displayed or hidden when the editor is loaded. The default value is <b>false</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td id="zoom" class="copy-link">zoom</td>
<td>Defines the document display zoom value measured in percent. Can take values larger than <b>0</b>. For text documents and presentations it is possible to set this parameter to <b>-1</b> (fitting the document to page option) or to <b>-2</b> (fitting the document page width to the editor page). The default value is <b>100</b>.</td>
<td>integer</td>
<td>100</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/customization.png")%>" alt="" />
</td>
</tr>
</tbody>
</table>
<span class="required-descr"><span class="required">*</span><em> - available for editing only for ONLYOFFICE Developer Edition</em></span>
<div class="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"editorConfig": {
"customization": {
"chat": true,
"commentAuthorOnly": false,
"compactToolbar": false,
"customer": {
"address": "My City, 123a-45",
"info": "Some additional information",
"logo": "https://example.com/logo-big.png",
"mail": "john@example.com",
"name": "John Smith and Co.",
"www": "example.com"
},
"feedback": {
"url": "https://example.com",
"visible": true
},
"forcesave": false,
"goback": {
"blank": true,
"text": "Go to Documents",
"url": "https://example.com"
},
"help": true,
"logo": {
"image": "https://example.com/logo.png",
"imageEmbedded": "https://example.com/logo_em.png",
"url": "https://www.onlyoffice.com"
},
"showReviewChanges": false,
"zoom": 100
},
...
},
...
});
</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>
If you have any further questions, please contact us at
<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

@ -0,0 +1,88 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Embedded";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Embedded</h1>
<div class="header-gray">Description</div>
<p class="dscr">The embedded section is for the <b>embedded</b> document type only (see the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/.aspx#type")%>">config</a> section to find out how to define the <b>embedded</b> document type). It allows to change the settings which define the behavior of the buttons in the embedded mode.</p>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="embedUrl" class="copy-link">embedUrl</td>
<td>Defines the absolute URL to the document serving as a source file for the document embedded into the web page.</td>
<td>string</td>
<td>"https://example.com/embedded?doc=exampledocument1.docx"</td>
</tr>
<tr class="tablerow">
<td id="fullscreenUrl" class="copy-link">fullscreenUrl</td>
<td>Defines the absolute URL to the document which will open in full screen mode.</td>
<td>string</td>
<td>"https://example.com/embedded?doc=exampledocument1.docx#fullscreen"</td>
</tr>
<tr class="tablerow">
<td id="saveUrl" class="copy-link">saveUrl</td>
<td>Defines the absolute URL that will allow the document to be saved onto the user personal computer.</td>
<td>string</td>
<td>"https://example.com/download?doc=exampledocument1.docx"</td>
</tr>
<tr class="tablerow">
<td id="shareUrl" class="copy-link">shareUrl</td>
<td>Defines the absolute URL that will allow other users to share this document.</td>
<td>string</td>
<td>"https://example.com/view?doc=exampledocument1.docx"</td>
</tr>
<tr class="tablerow">
<td id="toolbarDocked" class="copy-link">toolbarDocked</td>
<td>Defines the place for the embedded viewer toolbar, can be either <b>top</b> or <b>bottom</b>.</td>
<td>string</td>
<td>"top"</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/embedded.png")%>" alt="" />
</td>
</tr>
</tbody>
</table>
<div class="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"editorConfig": {
"embedded": {
"embedUrl": "https://example.com/embedded?doc=exampledocument1.docx",
"fullscreenUrl": "https://example.com/embedded?doc=exampledocument1.docx#fullscreen",
"saveUrl": "https://example.com/download?doc=exampledocument1.docx",
"shareUrl": "https://example.com/view?doc=exampledocument1.docx",
"toolbarDocked": "top"
},
...
},
...
});
</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>
</div>

View File

@ -0,0 +1,87 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Plugins";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Plugins</h1>
<div class="header-gray">Description</div>
<p class="dscr">The plugins section allows to connect the special add-ons to your Document Server installation which will help you add additional features to document editors.</p>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col class="table-name" />
<col />
<col class="table-type" />
<col class="table-example" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Name</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="autostart" class="copy-link">autostart</td>
<td>Defines the array of the identifiers (as entered in <a href="<%=VirtualPathUtility.ToAbsolute("~/api/plugins/structure/config.aspx#guid")%>">config.json</a>) for the plugins, which will automatically start when the editor opens, and the order the plugins will run one-by-one.</td>
<td>array of string</td>
<td></td>
</tr>
<tr class="tablerow">
<td id="pluginsData" class="copy-link">pluginsData</td>
<td>Defines the array of absolute URLs to the plugin configuration files (<a href="<%=VirtualPathUtility.ToAbsolute("~/api/plugins/structure/config.aspx")%>">config.json</a>).</td>
<td>array of string</td>
<td></td>
</tr>
<tr class="tablerow">
<td id="url" class="copy-link">url</td>
<td>Defines the absolute URL to the directory where the plugins are stored. Deprecated since version 4.3, please use the absolute URLs in <a href="#pluginsData">pluginsData</a> field.</td>
<td>string</td>
<td>"https://example.com/plugins/"</td>
</tr>
<tr class="tablerow">
<td colspan="4">
<img src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/plugins.png")%>" alt="" />
</td>
</tr>
</tbody>
</table>
<div class="header-gray">Example</div>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", {
"editorConfig": {
"plugins": {
"autostart": [
"asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}",
"asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}",
...
],
"pluginsData": [
"https://example.com/plugin1/config.json",
"https://example.com/plugin2/config.json",
...
]
},
...
},
...
});
</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 and the plugins are placed. 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>
If you have any further questions, please contact us at
<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

@ -0,0 +1,323 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Events";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Events</h1>
<div class="header-gray">Description</div>
<p class="dscr">The events section allows to change all the functions pertaining to the events.</p>
<ul>
<li>
<p><b id="onAppReady" class="copy-link">onAppReady</b> - the function called when the application is loaded into the browser.</p>
<div class="header-gray">Example</div>
<pre>
var onAppReady = function() {
console.log("ONLYOFFICE Document Editor is ready");
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onAppReady": onAppReady,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onCollaborativeChanges" class="copy-link">onCollaborativeChanges</b> - the function called when the document is co-edited by the other user in the <em>strict</em> co-editing mode.</p>
<div class="header-gray">Example</div>
<pre>
var onCollaborativeChanges = function () {
console.log("The document changed by collaborative user");
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onCollaborativeChanges": onCollaborativeChanges,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onDocumentReady" class="copy-link">onDocumentReady</b> - the function called when the document is loaded into the document editor.</p>
<div class="header-gray">Example</div>
<pre>
var onDocumentReady = function() {
console.log("Document is loaded");
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onDocumentReady": onDocumentReady,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onDocumentStateChange" class="copy-link">onDocumentStateChange</b> - the function called when the document is modified. It is called with the parameter: <em>{"data": true}</em> when the current user is editing the document and with the parameter: <em>{"data" : false}</em> when the current user's changes are sent to the <b>document editing service</b>.</p>
<div class="header-gray">Example</div>
<pre>
var onDocumentStateChange = function (event) {
if (event.data) {
console.log("The document changed");
} else {
console.log("Changes are collected on document editing service");
}
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onDocumentStateChange": onDocumentStateChange,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onDownloadAs" class="copy-link">onDownloadAs</b> - the function called with the absolute URL to the edited file when the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#downloadAs")%>">downloadAs</a> method is being called. The absolute URL to the document to be downloaded is sent in the <em>data</em> parameter.</p>
<div class="header-gray">Example</div>
<pre>
var onDownloadAs = function (event) {
console.log("ONLYOFFICE Document Editor create file: " + event.data);
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onDownloadAs": onDownloadAs,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onError" class="copy-link">onError</b> - the function called when an error or some other specific event occurs. The error message is sent in the <em>data</em> parameter.</p>
<div class="header-gray">Example</div>
<pre>
var onError = function (event) {
console.log("ONLYOFFICE Document Editor reports an error: code " + event.data.errorCode + ", description " + event.data.errorDescription);
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onError": onError,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onInfo" class="copy-link">onInfo</b> - the function called when the application opened the file. The mode is sent in the <em>data.mode</em> parameter. Can be <b>view</b> or <b>edit</b>.</p>
<div class="header-gray">Example</div>
<pre>
var onInfo = function (event) {
console.log("ONLYOFFICE Document Editor is opened in mode " + event.data.mode);
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onInfo": onInfo,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onOutdatedVersion" class="copy-link">onOutdatedVersion</b> - the function called after the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/troubleshooting.aspx#key")%>">error</a> is shown, when the document is opened for editing with the old <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document.aspx#key")%>">document.key</a> value, which was used to edit the previous document version and was successfully saved. When this event is called the editor must be reinitialized with a new <em>document.key</em>.</p>
<div class="header-gray">Example</div>
<pre>
var onOutdatedVersion = function () {
location.reload(true);
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onOutdatedVersion": onOutdatedVersion,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onReady" class="copy-link">onReady</b> - the function called when the application is loaded into the browser. Deprecated since version 5.0</p>
</li>
<li>
<p><b id="onRequestClose" class="copy-link">onRequestClose</b> - the function called when the work with the editor must be ended and the editor must be closed.</p>
<div class="header-gray">Example</div>
<pre>
var onRequestClose = function () {
if (window.opener) {
window.close();
return;
}
docEditor.destroyEditor();
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestClose": onRequestClose,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onRequestEditRights" class="copy-link">onRequestEditRights</b> - the function called when the user is trying to switch the document from the viewing into the editing mode by clicking the <em>Edit Document</em> button. When the function is called, the editor must be initialized again, in editing mode. If the method is not declared the <em>Edit</em> button will not be displayed.</p>
<div class="note">
<b>onRequestEditRights</b> parameter is obligatory when the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#mode")%>">editorConfig</a> <em>mode</em> parameter is set to <b>view</b> and the <em>permission</em> to <em>edit</em> the document (<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document/permissions.aspx#edit")%>">document permissions</a>) is set to <b>true</b> so that the user could switch to the editing mode.
</div>
<div class="header-gray">Example</div>
<pre>
var onRequestEditRights = function () {
console.log("ONLYOFFICE Document Editor requests editing rights");
document.location.reload();
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestEditRights": onRequestEditRights,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onRequestHistory" class="copy-link">onRequestHistory</b> - the function called when the user is trying to show the document version history by clicking the <em>Version History</em> button. To show the document version history you must call the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a> method.</p>
<div class="header-gray">Example</div>
<pre>
var onRequestHistory = function() {
docEditor.refreshHistory({
"currentVersion": 2,
"history": [
{
"changes": changes, //the <em>changes</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document
"created": "2010-07-06 10:13 AM",
"key": "af86C7e71Ca8",
"serverVersion": serverVersion, //the <em>serverVersion</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document
"user": {
"id": "F89d8069ba2b",
"name": "Kate Cage"
},
"version": 1
},
{
"changes": changes,
"created": "2010-07-07 3:46 PM",
"key": "Khirz6zTPdfd7",
"user": {
"id": "78e1e841",
"name": "John Smith"
},
"version": 2
},
...
]
});
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestHistory": onRequestHistory,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onRequestHistoryClose" class="copy-link">onRequestHistoryClose</b> - the function called when the user is trying to go back to the document from viewing the document version history by clicking the <em>Back to Document</em> button. When the function is called, the editor must be initialized again, in editing mode. If the method is not declared the <em>Back to Document</em> button will not be displayed.</p>
<div class="header-gray">Example</div>
<pre>
var onRequestHistoryClose = function() {
document.location.reload();
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestHistoryClose": onRequestHistoryClose,
...
},
...
});
</pre>
</li>
<li>
<p><b id="onRequestHistoryData" class="copy-link">onRequestHistoryData</b> - the function called when the user is trying to click the specific document version in the document version history. To show the changes corresponding to the specific document version you must call the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#setHistoryData")%>">setHistoryData</a> method. The document version number is sent in the <em>data</em> parameter.</p>
<div class="header-gray">Example</div>
<pre>
var onRequestHistoryData = function(event) {
var version = event.data;
docEditor.setHistoryData({
"changesUrl": "https://example.com/url-to-changes.zip", //the <em>changesUrl</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#changesurl")%>">the JSON object</a> returned after saving the document
"key": "Khirz6zTPdfd7",
"previous": {
"key": "af86C7e71Ca8",
"url": "https://example.com/url-to-the-previous-version-of-the-document.docx"
},
"url": "https://example.com/url-to-example-document.docx",
"version": version
})
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestHistoryData": onRequestHistoryData,
...
},
...
});
</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. 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.
</li>
<li>
<p><b id="onWarning" class="copy-link">onWarning</b> - the function called when an warning occurs. The warning message is sent in the <em>data</em> parameter.</p>
<div class="header-gray">Example</div>
<pre>
var onWarning = function (event) {
console.log("ONLYOFFICE Document Editor reports a warning: code " + event.data.warningCode + ", description " + event.data.warningDescription);
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onWarning": onWarning,
...
},
...
});
</pre>
</li>
</ul>
</div>

View File

@ -0,0 +1,43 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Converting and Downloading File";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Converting and Downloading File</h1>
<p class="dscr">Document conversion service is a part of ONLYOFFICE Document Server. It lets the user convert files from one format into another to open them later in <b>document editors</b> or for their export.</p>
<p>There are two main situations when document conversion is necessary.</p>
<h2>Interim conversion needed for document editing</h2>
<p>For the <b>document editors</b> correct work with the document files it is recommended to convert them prior to editing into Office Open XML formats:</p>
<ul>
<li><em>docx</em> for text documents,</li>
<li><em>xlsx</em> for spreadsheets,</li>
<li><em>pptx</em> for presentations.</li>
</ul>
<p>The reference figure and the steps below explain the process of document conversion.</p>
<img alt="Interim conversion needed for document editing" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/conversion.jpg")%>" />
<ol>
<li>The users selects a file on the computer hard disk drive that is to be uploaded to the <b>document manager</b>.</li>
<li>The <b>document manager</b> uploads the selected file to the <b>document storage service</b>.</li>
<li>The <b>document storage service</b> sends the uploaded file to ONLYOFFICE Document Server <b>document conversion service</b> for conversion into the Office Open XML format using the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversionapi.aspx")%>">conversion API</a>.</li>
<li>The <b>document conversion service</b> converts the selected file to the Office Open XML format.</li>
<li>The <b>document storage service</b> downloads the converted document file.</li>
</ol>
<h2>Document export</h2>
<p>When the user needs to download the file in some format different from the Office Open XML format, ONLYOFFICE Document Server converts the document file saved at the <b>document storage service</b> into the appropriate format prior to its export.</p>
<p>The reference figure and the steps below explain the process of document export.</p>
<img alt="Document export" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/export.jpg")%>" />
<ol>
<li>The user selects the file in the <b>document manager</b> and the format the file must be downloaded in.</li>
<li>The <b>document manager</b> transforms this user action into a request to the <b>document storage service</b>.</li>
<li>The <b>document storage service</b> sends the uploaded file to ONLYOFFICE Document Server <b>document conversion service</b> for conversion into the appropriate format using the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversionapi.aspx")%>">conversion API</a>.</li>
<li>The <b>document conversion service</b> converts the selected file to the appropriate format.</li>
<li>When the conversion is finished the <b>document storage service</b> downloads the converted file.</li>
<li>The <b>document storage service</b> notifies the <b>document manager</b> that the conversion is successfully performed.</li>
<li>The <b>document manager</b> downloads the converted file.</li>
</ol>
</div>

View File

@ -0,0 +1,764 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Conversion API";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Conversion API</h1>
<p class="dscr">
For the interaction with the <b>document conversion service</b> the POST requests are used.
The request parameters are entered in JSON format in the request body.
The requests are sent to the <span class="fakelink">https://documentserver/ConvertService.ashx</span> address where the <b>documentserver</b> is the name of the server with the ONLYOFFICE Document Server installed.
</p>
<div class="note">In <b>ONLYOFFICE Document Server</b> prior to version 4.2 the GET request with the parameters in the <em>QueryString</em> were used.</div>
<h2>Parameters and their description:</h2>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 100px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td id="async" class="copy-link">async</td>
<td>Defines the conversion request type: asynchronous or not.<br />
Supported values:
<ul>
<li>true</li>
<li>false</li>
</ul>
When the asynchronous request type is used, the response is formed instantly.
In this case to get the result it is necessary to send requests without parameter change until the conversion is finished.
</td>
<td>boolean</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td id="codePage" class="copy-link">codePage</td>
<td>Defines the file encoding when converting from <em>csv</em> or <em>txt</em> format.<br />
Main supported values:
<ul>
<li><b>932</b> - Japanese (Shift-JIS),</li>
<li><b>950</b> - Chinese Traditional (Big5),</li>
<li><b>1250</b> - Central European (Windows),</li>
<li><b>1251</b> - Cyrillic (Windows),</li>
<li><b>65001</b> - Unicode (UTF-8).</li>
</ul>
You can find all the supported values <a target="_blank" href="https://github.com/ONLYOFFICE/server/blob/master/Common/sources/commondefines.js">in this file</a>.
</td>
<td>integer</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td id="delimiter" class="copy-link">delimiter</td>
<td>Defines the delimiter characters for separating values when converting from <em>csv</em> format.<br />
Supported values:
<ul>
<li><b>0</b> - no delimiter,</li>
<li><b>1</b> - tab,</li>
<li><b>2</b> - semicolon,</li>
<li><b>3</b> - colon,</li>
<li><b>4</b> - comma,</li>
<li><b>5</b> - space.</li>
</ul>
</td>
<td>integer</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td id="filetype" class="copy-link">filetype<span class="required">*</span></td>
<td>Defines the type of the document file to be converted.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td id="key" class="copy-link">key</td>
<td>Defines the document identifier used to unambiguously identify the document file.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td id="outputtype" class="copy-link">outputtype<span class="required">*</span></td>
<td>Defines the resulting converted document type.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td id="thumbnail" class="copy-link">thumbnail</td>
<td>Defines the option is used since version 4.2. Settings for the thumbnail when specifying the image formats (<em>bmp</em>, <em>gif</em>, <em>jpg</em>, <em>png</em>) as <b>outputtype</b>. The object has the following parameters:
<ul>
<li><b>aspect</b> - sets the mode to fit the image to the height and width specifyed.
Supported values: 0 - stretch file to fit height and width, 1 - keep the aspect for the image,
<br />
<b>type</b>: integer,
<br />
<b>example</b>: 1;
</li>
<li><b>first</b> - specifies if the thumbnails should be generated for the first page only or for all the document pages.
If false, the zip archive containing thumbnails for all the pages will be created. The default value is <em>true</em>,
<br />
<b>type</b>: boolean,
<br />
<b>example</b>: true;
</li>
<li><b>height</b> - the thumbnail height in pixels (default: 100),
<br />
<b>type</b>: integer,
<br />
<b>example</b>: 100;
</li>
<li><b>width</b> - the thumbnail width in pixels (default: 100),
<br />
<b>type</b>: integer,
<br />
<b>example</b>: 100.
</li>
</ul>
</td>
<td>object</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td id="title" class="copy-link">title</td>
<td>Defines the converted file name.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td id="url" class="copy-link">url</td>
<td>Defines the absolute URL to the document to be converted.</td>
<td>string</td>
<td>required</td>
</tr>
</tbody>
</table>
<span class="required-descr"><span class="required">*</span><em> - in the tables below you can see possibility of conversion your documents into the most known file formats, where the <b>Input format</b> column corresponds to the values of the <b>filetype</b> parameter and the <b>Output format</b> columns correspond to the values of the <b>outputtype</b> parameter.</em></span>
<h2 id="text-matrix" class="copy-link">Text document file formats</h2>
<table class="table-conversion-matrix-text">
<tbody>
<tr>
<th rowspan="2">Input format</th>
<th colspan="9">Output format</th>
</tr>
<tr>
<td>bmp</td>
<td>docx</td>
<td>gif</td>
<td>jpg</td>
<td>odt</td>
<td>pdf</td>
<td>png</td>
<td>rtf</td>
<td>txt</td>
</tr>
<tr>
<td>doc</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>docm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>docx</td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>dot</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>dotm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>dotx</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>epub</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>fodt</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>html</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>mht</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>odt</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>ott</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>pdf</td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="no"></span></td>
</tr>
<tr>
<td>rtf</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>txt</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
</tr>
<tr>
<td>xps</td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="no"></span></td>
</tr>
</tbody>
</table>
<h2 id="spreadsheet-matrix" class="copy-link">Spreadsheet file formats</h2>
<table class="table-conversion-matrix-spreadsheet">
<tbody>
<tr>
<th rowspan="2">Input format</th>
<th colspan="8">Output format</th>
</tr>
<tr>
<td>bmp</td>
<td>csv</td>
<td>gif</td>
<td>jpg</td>
<td>ods</td>
<td>pdf</td>
<td>png</td>
<td>xlsx</td>
</tr>
<tr>
<td>csv</td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>fods</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>ods</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>ots</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>xls</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>xlsm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>xlsx</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
</tr>
<tr>
<td>xlt</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>xltm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>xltx</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
</tbody>
</table>
<h2 id="presentation-matrix" class="copy-link">Presentation file formats</h2>
<table class="table-conversion-matrix-presentation">
<tbody>
<tr>
<th rowspan="2">Input format</th>
<th colspan="7">Output format</th>
</tr>
<tr>
<td>bmp</td>
<td>gif</td>
<td>jpg</td>
<td>odp</td>
<td>pdf</td>
<td>png</td>
<td>pptx</td>
</tr>
<tr>
<td>fodp</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>odp</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>otp</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>pot</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>potm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>potx</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>pps</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>ppsm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>ppsx</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>ppt</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>pptm</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
</tr>
<tr>
<td>pptx</td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="yes"></span></td>
<td><span class="no"></span></td>
</tr>
</tbody>
</table>
<div id="sample-conversion" class="header-gray copy-link">Sample of JSON object sent to <b>document conversion service</b> used to convert the file from <em>docx</em> format to <em>pdf</em> format</div>
<pre>
{
"async": false,
"filetype": "docx",
"key": "Khirz6zTPdfd7",
"outputtype": "pdf",
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
}
</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>
<div id="sample-thumbnail" class="header-gray copy-link">Sample of JSON object sent to <b>document conversion service</b> used to generate <em>png</em> thumbnail of file in <em>docx</em> format</div>
<pre>
{
"filetype": "docx",
"key": "Khirz6zTPdfd7",
"outputtype": "png",
"thumbnail": {
"aspect": 0,
"first": true,
"height": 150,
"width": 100
},
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
}
</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 id="response" class="copy-link">
The request result is returned in XML format.
To receive a response in JSON format you need to specify in the HTTP request Header <em>accept</em> with the value <b>application/json</b> (available from version 4.3).
When forming the link to the resulting file, the same server name is used which was made the conversion request to.
</p>
<div class="header-gray">Sample of the response in XML format</div>
<p>When forming the link to the resulting file, the same server name is used which was made the conversion request to.</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;FileResult&gt;
&lt;EndConvert&gt;True&lt;/EndConvert&gt;
&lt;FileUrl&gt;https://documentserver/ResourceService.ashx?filename=output.doc&lt;/FileUrl&gt;
&lt;Percent&gt;100&lt;/Percent&gt;
&lt;/FileResult&gt;
</pre>
<div class="header-gray">Sample of the response in JSON format</div>
<p>When forming the link to the resulting file, the same server name is used which was made the conversion request to.</p>
<pre>
{
"endConvert": true,
"fileUrl": "https://documentserver/ResourceService.ashx?filename=output.doc",
"percent": 100
}
</pre>
<div class="header-gray">Sample of the intermediate response to the asynchronous request (with the parameter <em>async=true</em>) in XML format</div>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;FileResult&gt;
&lt;EndConvert&gt;False&lt;/EndConvert&gt;
&lt;FileUrl&gt;&lt;/FileUrl&gt;
&lt;Percent&gt;95&lt;/Percent&gt;
&lt;/FileResult&gt;
</pre>
<div class="header-gray">Sample of the intermediate response to the asynchronous request (with the parameter <em>async=true</em>) in JSON format</div>
<pre>
{
"endConvert": false,
"percent": 95
}
</pre>
<div class="header-gray">Sample of the response when an error occurred in XML format</div>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;FileResult&gt;
&lt;Error&gt;-3&lt;/Error&gt;
&lt;/FileResult&gt;
</pre>
<div class="header-gray">Sample of the response when an error occurred in JSON format</div>
<pre>
{
"error": -3
}
</pre>
<div class="header-gray">Possible error codes and their description</div>
<table class="table">
<colgroup>
<col style="width: 105px;" />
<col />
</colgroup>
<thead>
<tr class="tablerow">
<td>Error code</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>-1</td>
<td>Unknown error.</td>
</tr>
<tr class="tablerow">
<td>-2</td>
<td>Conversion timeout error.</td>
</tr>
<tr class="tablerow">
<td>-3</td>
<td>Conversion error.</td>
</tr>
<tr class="tablerow">
<td>-4</td>
<td>Error while downloading the document file to be converted.</td>
</tr>
<tr class="tablerow">
<td>-6</td>
<td>Error while accessing the conversion result database.</td>
</tr>
<tr class="tablerow">
<td>-8</td>
<td>Invalid token.</td>
</tr>
<%--<tr class="tablerow">
<td>-21</td>
<td>Token signature is expired.</td>
</tr>--%>
</tbody>
</table>
</div>

View File

@ -0,0 +1,172 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Document History";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Document History</h1>
<p class="dscr">You can view the document history using the <b>document editor</b>.</p>
<div class="note">The history is currently available for text document files only.</div>
<p>
The document history is stored with the document storage service.
The <b>document editor</b> displays the document history as a version list at the left-side panel.
When you select a document version from the list it will be displayed for preview.
</p>
<ol>
<li>The user clicks the <em>Version History</em> button while editing the document within the <b>document editor</b>.</li>
<li>The <b>document editor</b> requests the list of the document versions from the <b>document storage service</b>.</li>
<li>The <b>document storage service</b> sends the list of the document versions with the version number to be displayed.</li>
<li>The <b>document editor</b> requests the information about the selected document version from the <b>document storage service</b>.</li>
<li>The <b>document storage service</b> sends the link to the selected version of the document.</li>
<li>The <b>document editor</b> displays the selected document version.</li>
<li>When the user clicks another version in the document version list, the <b>document editor</b> requests the information about the version to be displayed anew.</li>
</ol>
<h2 id="apply" class="copy-link">How this can be done in practice</h2>
<ol>
<li>Create an <em>html</em> file to <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/open.aspx#apply")%>">Open the document</a>.</li>
<li>
<p>
Specify the event handler for opening the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onRequestHistory")%>">version history</a> list in the configuration script for Document Editor initialization.
When the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onRequestHistory")%>">onRequestHistory</a> event is called, the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a> method must be executed. This method contains document history for each document version, if the history parameter has been present for each version.
</p>
<pre>
var onRequestHistory = function() {
docEditor.refreshHistory({
"currentVersion": 2,
"history": [
{
"created": "2010-07-06 10:13 AM",
"key": "af86C7e71Ca8",
"user": {
"id": "F89d8069ba2b",
"name": "Kate Cage"
},
"version": 1
},
{
"created": "2010-07-07 3:46 PM",
"key": "Khirz6zTPdfd7",
"user": {
"id": "78e1e841",
"name": "John Smith"
},
"version": 2
},
...
]
});
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestHistory": onRequestHistory,
...
},
...
});
</pre>
<img alt="Opening File" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/history_open.png")%>" />
</li>
<li>
<p>
In the configuration script for Document Editor initialization specify the event handler which will select the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onRequestHistoryData")%>">version from history</a>.
When the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onRequestHistoryData")%>">onRequestHistoryData</a> event is called, the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#setHistoryData")%>">setHistoryData</a> method must be executed. This method contains the absolute URL to the file of the corresponding version.
</p>
<pre>
var onRequestHistoryData = function(event) {
var version = event.data;
docEditor.setHistoryData({
"key": "Khirz6zTPdfd7",
"url": "https://example.com/url-to-example-document.docx",
"version": version
})
};
var docEditor = new DocsAPI.DocEditor("placeholder", {
"events": {
"onRequestHistoryData": onRequestHistoryData,
...
},
...
});
</pre>
<img alt="Opening File" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/history.png")%>" />
</li>
<li>Open your <em>html</em> file in the browser.</li>
<li>Open the <em>Version History</em> option in the Document Editor menu.</li>
</ol>
<h2 id="apply-changes" class="copy-link">Opening the document history with changes highliting</h2>
<p>
If the document version was created with the <b>document editor</b>, then the document changes can be displayed when viewing the document history.
The additional data must be saved to the <b>document storage service</b> when <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx")%>">saving</a> the editing session beside the document versions themselves to achieve that.
After editing in <b>document editor</b> the information about the changes during the editing session is sent together with the changed document:</p>
<ul>
<li>
<p>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">history</a> - this information allows to display the time and the author for each document version when you view the document history in the side panel.
Must be sent as a property changes of the object sent as the argument to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#refreshHistory")%>">refreshHistory</a> method.
</p>
<pre>
docEditor.refreshHistory({
"currentVersion": 2,
"history": [
{
"changes": changes, //the <em>changes</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document
"created": "2010-07-06 10:13 AM",
"key": "af86C7e71Ca8",
"serverVersion": serverVersion, //the <em>serverVersion</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document
"user": {
"id": "F89d8069ba2b",
"name": "Kate Cage"
},
"version": 1
},
{
"changes": changes,
"created": "2010-07-07 3:46 PM",
"key": "Khirz6zTPdfd7",
"serverVersion": serverVersion,
"user": {
"id": "78e1e841",
"name": "John Smith"
},
"version": 2
},
...
],
});
</pre>
</li>
<li>
<p>
<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#changesurl")%>">changesurl</a> - the absolute URL to the file with the document editing data used to show the changes corresponding to the specific document version.
The file must be saved and its address must be sent as changesUrl parameter using the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#setHistoryData")%>">setHistoryData</a> method.
The link to the previous document version (<em>previous.url</em>) must be added into the object.
</p>
<pre>
docEditor.setHistoryData({
"changesUrl": "https://example.com/url-to-changes.zip",
"key": "Khirz6zTPdfd7",
"previous": {
"key": "af86C7e71Ca8",
"url": "https://example.com/url-to-the-previous-version-of-the-document.docx"
},
"url": "https://example.com/url-to-example-document.docx",
"version": 2
});
</pre>
<div class="note">The <em>changesurl</em> request is made in the browser from the added iframe with the <b>documentserver</b> domain, where the <b>documentserver</b> is the name of the server with the ONLYOFFICE Document Server installed.
For its correct work the cross-origin HTTP requests must be allowed (CORS).
This can be achieved using the <em>Access-Control-Allow-Origin</em> header.
</div>
<img alt="changesurl" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/changesurl.png")%>" />
</li>
</ul>
</div>

View File

@ -0,0 +1,48 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "How It Works";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">How It Works</h1>
<p class="dscr">
The work with document files in ONLYOFFICE Document Server is quite a simple process but it requires some understanding of what is going on when you click your document link to <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/open.aspx")%>">open</a> it in the browser, or <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx")%>">save</a> the document or <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversion.aspx")%>">upload</a> it from your computer to the document server.
</p>
<p>The user-document interaction is done both at the client side and at the server side.</p>
<p>Below the main notions used throughout the current documentation are explained.</p>
<p class="list-header">The client side includes:</p>
<ul>
<li>
<b>Document manager</b> - the list of the documents displayed in the user browser where the user can select the necessary document and perform some actions with it (depending on the provided rights, the user can open the document to view it or edit, share the document with other users).
</li>
<li>
<b>Document editor</b> - the document viewing and editing interface with all the most known document editing features available, used as a medium between the user and the <b>document editing service</b>.
</li>
</ul>
<p class="list-header">The server side includes:</p>
<ul>
<li>
<b>Document storage service</b> - the server service which stores all the documents available to the users with the appropriate access rights. It provides the document IDs and links to these documents to the <b>document manager</b> which the user sees in the browser.
</li>
<li>
<b>Document editing service</b> - the server service which allows to perform the document viewing and editing (in case the user has the appropriate rights to do that). The <b>document editor</b> interface is used to access all the <b>document editing service</b> features.
</li>
<li>
<b>Document command service</b> - the server service which allows to perfom additional commands with <b>document editing service</b>.
</li>
<li>
<b>Document conversion service</b> - the server service which allows to convert the document file into the appropriate Office Open XML format (<em>docx</em> for text documents, <em>xlsx</em> for spreadsheets and <em>pptx</em> for presentations) for their editing or downloading.
</li>
</ul>
<p class="list-header">
Please note, that ONLYOFFICE Document Server includes the <b>document editor</b>, <b>document editing service</b>, <b>document command service</b> and <b>document conversion service</b>.
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>
</div>

View File

@ -0,0 +1,319 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Methods";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Methods</h1>
<p class="dscr">After initializing <b>document editor</b> you will get the object that can be used to call the methods.</p>
<pre>
var docEditor = new DocsAPI.DocEditor("placeholder", config);
</pre>
<ul>
<li>
<p><b id="denyEditingRights" class="copy-link">denyEditingRights</b> - deny editing. This method can be called when you want to make the document editing unavailable.</p>
<pre>
docEditor.denyEditingRights(message);
</pre>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 100px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>message</td>
<td>Defines the text messages for dialog.</td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>
</li>
<li>
<p><b id="destroyEditor" class="copy-link">destroyEditor</b> - destroy <em>docEditor</em> object. This method can be called when you want to reinit document editor with another configurations. Used since version 4.3.</p>
<pre>
docEditor.destroyEditor();
</pre>
</li>
<li>
<p><b id="downloadAs" class="copy-link">downloadAs</b> - download the edited file. This method can be called only when the existence of the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onDownloadAs")%>">onDownloadAs</a> events. <b>Document editing service</b> asynchronously creates a document and triggers the <b>onDownloadAs</b> event with a link in parameter.</p>
<pre>
docEditor.downloadAs();
</pre>
</li>
<li>
<p><b id="refreshHistory" class="copy-link">refreshHistory</b> - show the document version history. This method must be called after the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onRequestHistory")%>">onRequestHistory</a> events.</p>
<pre>
docEditor.refreshHistory({
"currentVersion": 2,
"history": [
{
"changes": changes, //the <em>changes</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document
"created": "2010-07-06 10:13 AM",
"key": "af86C7e71Ca8",
"serverVersion": serverVersion, //the <em>serverVersion</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document
"user": {
"id": "F89d8069ba2b",
"name": "Kate Cage"
},
"version": 1
},
{
"changes": changes,
"created": "2010-07-07 3:46 PM",
"key": "Khirz6zTPdfd7",
"serverVersion": serverVersion,
"user": {
"id": "78e1e841",
"name": "John Smith"
},
"version": 2
},
...
],
});
</pre>
<p>Show the error message explaining why the version history can not be displayed.</p>
<pre>
docEditor.refreshHistory({
"error": "Exception",
});
</pre>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 100px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>currentVersion</td>
<td>Defines the current document version number.</td>
<td>integer</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>error</td>
<td>Defines the error message text.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>history</td>
<td>Defines the array with the document versions.</td>
<td>array</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>history.changes</td>
<td>Defines the <em>changes</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#history")%>">the history object</a> returned after saving the document.</td>
<td>object</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>history.created</td>
<td>Defines the document version creation date.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>history.key</td>
<td>Defines the unique document identifier used for document recognition by the service.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>history.user</td>
<td>Defines the user who is the author of the document version.</td>
<td>object</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>history.user.id</td>
<td>Defines the identifier of the user who is the author of the document version.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>history.user.name</td>
<td>Defines the name of the user who is the author of the document version.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>history.version</td>
<td>Defines the document version number.</td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>
</li>
<li>
<p><b id="setHistoryData" class="copy-link">setHistoryData</b> - send the link to the document for viewing the version history. This method must be called after the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onRequestHistoryData")%>">onRequestHistoryData</a> events.</p>
<pre>
docEditor.setHistoryData({
"key": "Khirz6zTPdfd7",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJLaGlyejZ6VFBkZmQ3IiwidXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3VybC10by1leGFtcGxlLWRvY3VtZW50LmRvY3giLCJ2ZXJzaW9uIjoyfQ.N9N9IMwX5e6kdfx4wssAPrGMnzPAZCd4PwDf2D8mJ8s",
"url": "https://example.com/url-to-example-document.docx",
"version": 2
});
</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>If after editing and saving the document the <em>changesurl</em> link to the file with changes data is returned, download the file by this link and send the file URL in the <em>changesUrl</em> parameter. The absolute URL address of the document previous version must be sent in the <em>previous.url</em> parameter.</p>
<pre>
docEditor.setHistoryData({
"changesUrl": "https://example.com/url-to-changes.zip",
"key": "Khirz6zTPdfd7",
"previous": {
"key": "af86C7e71Ca8",
"url": "https://example.com/url-to-the-previous-version-of-the-document.docx"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGFuZ2VzVXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3VybC10by1jaGFuZ2VzLnppcCIsImtleSI6IktoaXJ6NnpUUGRmZDciLCJwcmV2aW91cyI6eyJrZXkiOiJhZjg2QzdlNzFDYTgiLCJ1cmwiOiJodHRwOi8vZXhhbXBsZS5jb20vdXJsLXRvLXRoZS1wcmV2aW91cy12ZXJzaW9uLW9mLXRoZS1kb2N1bWVudC5kb2N4In0sInVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS91cmwtdG8tZXhhbXBsZS1kb2N1bWVudC5kb2N4IiwidmVyc2lvbiI6Mn0.9dgDsaVLFQ6RtoX_1s2pBVJHGnyMjxDXKC2TpC2nXb4",
"url": "https://example.com/url-to-example-document.docx",
"version": 2
});
</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>Send the error message explaining why the document version can not be displayed.</p>
<pre>
docEditor.setHistoryData({
"error": "Exception",
"version": 2
});
</pre>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 100px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>changesUrl</td>
<td>Defines the url address of the file with the document changes data, which can be downloaded by the <em>changesurl</em> link from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#changesurl")%>">the JSON object</a> returned after saving the document.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>error</td>
<td>Defines the error message text.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>key</td>
<td>Defines the document identifier used to unambiguously identify the document file.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>previous</td>
<td>Defines the object of the previous version of the document if <em>changesUrl</em> address was returned after saving the document.</td>
<td>object</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>previous.key</td>
<td>Defines the document identifier of the previous version of the document.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>previous.url</td>
<td>Defines the url address of the previous version of the document.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td id="token">token</td>
<td>Defines the encrypted signature added to the parameter in the form of a <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/browser.aspx#setHistoryData")%>">token</a>.</td>
<td>string</td>
<td>optional</td>
</tr>
<tr class="tablerow">
<td>url</td>
<td>Defines the url address of the current version of the document. Can be downloaded by the <em>url</em> link from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx#url")%>">the JSON object</a> returned after saving the document.</td>
<td>string</td>
<td>required</td>
</tr>
<tr class="tablerow">
<td>version</td>
<td>Defines the document version number.</td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>
</li>
<li>
<p><b id="showMessage" class="copy-link">showMessage</b> - Display tooltip with the message. This method can be called only after the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx#onAppReady")%>">onAppReady</a> events.</p>
<pre>
docEditor.showMessage(message);
</pre>
<table class="table">
<colgroup>
<col style="width: 100px;" />
<col />
<col style="width: 100px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Presence</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>message</td>
<td>Defines the message text.</td>
<td>string</td>
<td>required</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>

View File

@ -0,0 +1,52 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Opening File";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Opening File</h1>
<p class="dscr">The reference figure and the steps below explain the process of opening the document in ONLYOFFICE Document Server.</p>
<img alt="Opening File" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/opening.jpg")%>" />
<ol>
<li>The user uses the <b>document manager</b> (found in his/her browser) to open the document for viewing or editing.
<div class="note">The browser <b>document manager</b> receives the list of all documents available to the user from the <b>document storage service</b>.</div>
</li>
<li>The document identifier and the link to it at the <b>document storage service</b> are sent using the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/basic.aspx")%>">JavaScript API</a> to the <b>document editor</b>.</li>
<li>The <b>document editor</b> forms a request to the <b>document editing service</b> for document opening. The <b>document editor</b> uses the document identifier and its link received from the <b>document manager</b> (at step 2).</li>
<li>The <b>document editing service</b> downloads the document file from the <b>document storage service</b> using the ID and link provided. At this step the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversion.aspx")%>">conversion</a> of the file into Office Open XML format is also performed for the <b>document editor</b> better performance and formats compatibility.</li>
<li>When ready the <b>document editing service</b> transfers the document file to the browser-based <b>document editor</b>.</li>
<li>The <b>document editor</b> displays the document file and/or (in case the appropriate rights are provided) allows its editing.</li>
</ol>
<p>After the editing is finished, the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx")%>">document saving</a> process takes place.</p>
<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>&lt;div id=&quot;placeholder&quot;&gt;&lt;/div&gt;</pre>
</li>
<li>Specify your ONLYOFFICE Document Server link with the JavaScript API that will be used for your website.
<pre>&lt;script type=&quot;text/javascript&quot; src=&quot;https://documentserver/web-apps/apps/api/documents/api.js&quot;&gt;&lt;/script&gt;</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"
});
</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>
</ol>
</div>

View File

@ -0,0 +1,168 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Saving File";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Saving File</h1>
<p class="dscr">The reference figure and the steps below explain the process of saving the document in ONLYOFFICE Document Server.</p>
<img alt="Opening File" src="<%=VirtualPathUtility.ToAbsolute("~/content/img/editor/saving.jpg")%>" />
<ol>
<li>The user edits the document in the <b>document editor</b>.</li>
<li>The <b>document editor</b> sends the changes to the <b>document editing service</b>.</li>
<li>The user closes the <b>document editor</b>.</li>
<li>The <b>document editing service</b> watches the end of work with the document and collects the changes sent from the <b>document editor</b> into one document.</li>
<li>The <b>document editing service</b> informs the <b>document storage service</b> about the end of the document editing using the <em>callbackUrl</em> from <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/basic.aspx")%>">JavaScript API</a> and returns the link to the modified document.</li>
<li>The <b>document storage service</b> downloads the document file with all the saved changes from the <b>document editing service</b> and stores it.</li>
</ol>
<h2 id="apply" class="copy-link">How this can be done in practice</h2>
<ol>
<li>Create a <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx")%>">callback handler</a> to save the document from <b>document editing service</b>.</li>
<li>Create an <em>html</em> file to <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/open.aspx#apply")%>">Open the document</a>.</li>
<li>In the configuration script for Document Editor initialization specify the URL to the file with the <em>Callback handler</em> in the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#callbackUrl")%>">parameter line</a>.
<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": {
"callbackUrl": "https://example.com/url-to-callback.ashx"
}
});
</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 and edit your document.</li>
<li>Close the <b>Document Editor</b>. Check out your document in about 10 seconds. All changes should be saved, meaning the configuration is correct.</li>
</ol>
<h2 id="savedelay" class="copy-link">Save delay</h2>
<p>
Once the document editing is finished, the <b>document editing service</b> informs the <b>document storage service</b> about it.
The time before this is done is calculated using the conversion time of the edited file into the Office Open XML format (which depends on the file size, complexity and the computer power, and can be performed rather a long time), and conversion start delay time (which is equal to 5 seconds by default).
In most common cases the time is about 10 seconds after the editing is finished.
</p>
<p>
The conversion start delay is necessary to allow to return to the file editing session without the file saving, e.g. when reloading the browser page with the file opened for editing.
The conversion start delay time can be changed in <b>Document Server</b> configuration file, which can be found at the following path:
</p>
<div>For Linux - <em>/etc/onlyoffice/documentserver/<b>default.json</b></em>.</div>
<div>For Windows - <em>%ProgramFiles%\ONLYOFFICE\DocumentServer\config\<b>default.json</b></em>.</div>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col style="width: 300px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>services.CoAuthoring.server.savetimeoutdelay</td>
<td>Defines the conversion start delay time (in milliseconds) after the edited file is closed.</td>
<td>integer</td>
<td>5000</td>
</tr>
</tbody>
</table>
<div class="header-gray">Sample default.json configuration</div>
<pre>
{
"services": {
"CoAuthoring": {
"server": {
"savetimeoutdelay": 5000
}
}
}
}
</pre>
<h2 id="forcesave" class="copy-link">Force saving</h2>
<p>
<b>Document editing service</b> allows to get the current document state before the editing is finished.
The process is called <em>forcesave</em> in ONLYOFFICE Document Server.
When forcesave is initiated, <b>document editing service</b> performs request to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx")%>">callback handler</a> with the link to the document as the <em>url</em> parameter and with the <b>6</b> value for the <em>status</em> parameter.
The forcesave process can be initiated the following ways:
</p>
<ul>
<li>By the request to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">document command service</a> with the <b>forcesave</b> value in the <em>c</em> parameter.
The <em>forcesavetype</em> parameter will have the <b>0</b> value when sending the request to the <b>callback handler</b>.</li>
<li>Enable the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/customization.aspx#forcesave")%>">editorConfig.customization.forcesave</a> mode setting it to <b>true</b> in the editor initialization configuration.
In this case each time the user clicks the <b>Save</b> button, the forcesave will be done, and the <em>forcesavetype</em> parameter will have the <b>1</b> value when sending the request to the <b>callback handler</b>.</li>
<li>You can enable the repeating forcesave start in the <b>Document Server</b> configuration file, which can be found at the following path:
<div>For Linux - <em>/etc/onlyoffice/documentserver/<b>default.json</b></em>.</div>
<div>For Windows - <em>%ProgramFiles%\ONLYOFFICE\DocumentServer\config\<b>default.json</b></em>.</div>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col style="width: 300px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>services.CoAuthoring.autoAssembly.enable</td>
<td>Specifies enabling the repeating force saving. The default value is <b>false</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td>services.CoAuthoring.autoAssembly.interval</td>
<td>Defines the time interval in minutes for initializing the force save.</td>
<td>string</td>
<td>5m</td>
</tr>
</tbody>
</table>
<div class="header-gray">Sample default.json configuration</div>
<pre>
{
"services": {
"CoAuthoring": {
"autoAssembly": {
"enable": true,
"interval": "5m"
}
}
}
}
</pre>
The <em>forcesavetype</em> parameter will have the <b>2</b> value when sending the request to the <b>callback handler</b>.</li>
</ul>
</div>

View File

@ -0,0 +1,33 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Security";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Security</h1>
<p class="dscr">To prevent the substitution of important parameters in ONLYOFFICE Document Server requests an encrypted signature is added to it in the form of <b>token</b>.</p>
<p>The <b>token</b> is added in the configuration when initializing <b>Document Editor</b> and during the exchange of commands between <b>document storage service</b> and <b>document editing service</b>, <b>document command service</b> and <b>document conversion service</b>.</p>
<p>
The <b>token</b> is generated using the <em>JWT</em> (<a href="https://jwt.io/" target="_blank">JSON Web Tokens</a>) standard.
The tokens are signed by the server's key, so the client is able to verify that the token is legitimate.
</p>
<p>
<em>JSON Web Tokens</em> consist of three parts separated by dots (.), which are: <em>header</em>, <em>payload</em>, <em>signature</em>.
The <em>header</em> consists of two parts: the type of the token (<em>JWT</em>), and the hashing algorithm (<em>HMAC SHA256</em>).
The second part of the token is the <em>payload</em>, which contains the claims in JSON format.
To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that.
</p>
<p>
<b>ONLYOFFICE Document Server</b> validates the <b>token</b>.
The data from the <em>payload</em> is considered valid and is used instead of the corresponding data from the main parameters.
If the <b>token</b> is invalid, the command is not executed.<p>
<p>See the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/.aspx")%>">Signature</a> configuration section to find more.</p>
</div>

View File

@ -0,0 +1,104 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Signature";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Signature</h1>
<p class="dscr">ONLYOFFICE Document Server <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/security.aspx")%>">uses</a> <b>tokens</b> generated using the JSON Web Tokens standard.</p>
<div class="note">This feature is used in <b>Document Server</b> starting with version 4.2</div>
<p>For the validation setup it is necessary to edit the configuration file which can be found at the following path:</p>
<div>For Linux - <em>/etc/onlyoffice/documentserver/<b>default.json</b></em>.</div>
<div>For Windows - <em>%ProgramFiles%\ONLYOFFICE\DocumentServer\config\<b>default.json</b></em>.</div>
<p>Restart the services for the config changes to take effect:</p>
<pre>
supervisorctl restart all
</pre>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col style="width: 300px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>services.CoAuthoring.secret.inbox.string</td>
<td>Defines the <em>secret key</em> to generate the token in the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/browser.aspx")%>">browser</a> for the <b>document editor</b> opening and calling the methods and the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">requests</a> to the <b>document command service</b> and <b>document conversion service</b>.</td>
<td>string</td>
<td>secret</td>
</tr>
<tr class="tablerow">
<td>services.CoAuthoring.secret.outbox.string</td>
<td>Defines the <em>secret key</em> to generate the token in the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">requests</a> by <b>document editing service</b> to "callbackUrl" address.</td>
<td>string</td>
<td>secret</td>
</tr>
<tr class="tablerow">
<td>services.CoAuthoring.token.enable.browser</td>
<td>Specifies the enabling the token validation in the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/browser.aspx")%>">config</a> for the <b>document editor</b> opening and calling the methods.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td>services.CoAuthoring.token.enable.request.inbox</td>
<td>Specifies the enabling the token validation in the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">requests</a> to the <b>document command service</b> and <b>document conversion service</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td>services.CoAuthoring.token.enable.request.outbox</td>
<td>Specifies the enabling the token generation for the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">requests</a> by <b>document editing service</b> to <b>document storage service</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
</tbody>
</table>
<div class="header-gray">Sample default.json configuration</div>
<pre>
{
"services": {
"CoAuthoring": {
"secret": {
"inbox": {
"string": "secret"
},
"outbox": {
"string": "secret"
},
},
"token": {
"enable": {
"browser": true,
"request": {
"inbox": true,
"outbox": true
}
}
}
}
}
}
</pre>
</div>

View File

@ -0,0 +1,178 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Request with token in body";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Request with token in body</h1>
<p class="dscr">
When performing the HTTP requests from ONLYOFFICE Document Server the <em>token</em> is added to the parameters to validate the data.
When performing the HTTP requests to ONLYOFFICE Document Server the <em>token</em> must be added to the parameters to validate the data.
</p>
<p>
Starting with version 5.2 it is possible to use the token in body parameters with <b>Document Server</b>.
To enable it set the <em>services.CoAuthoring.token.inbox.inBody</em> and <em>services.CoAuthoring.token.outbox.inBody</em> in configuration file to <b>true</b>.
</p>
<div class="note">
Token in body is used for POST requests only. For the GET requests <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">token in header</a> is used.
</div>
<div class="header-gray">Parameters</div>
<table class="table">
<colgroup>
<col style="width: 300px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="tablerow">
<td>Parameter</td>
<td>Description</td>
<td>Type</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr class="tablerow">
<td>services.CoAuthoring.token.inbox.inBody</td>
<td>Specifies the enabling the token validation in the request body to the <b>document command service</b> and <b>document conversion service</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
<tr class="tablerow">
<td>services.CoAuthoring.token.outbox.inBody</td>
<td>Specifies the enabling the token generation for the request body by <b>document editing service</b> to <b>document storage service</b>.</td>
<td>boolean</td>
<td>false</td>
</tr>
</tbody>
</table>
<div class="header-gray">Sample default.json configuration</div>
<pre>
{
"services": {
"CoAuthoring": {
"token": {
"inbox": {
"inBody": true,
},
"outbox": {
"inBody": true
}
}
}
}
}
</pre>
<p>The <em>payload</em> for the JSON Web Token contains the request body parameters.</p>
<h2>Incoming request</h2>
<p id="command" class="copy-link">Validation is performed for incoming requests with the commands from the <b>document storage service</b> to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">document command service</a>.</p>
<div class="header-gray">Sample parameters of request to receive the status of the edited document</div>
<pre>
{
"c": "info",
"key": "Khirz6zTPdfd7"
}
</pre>
<p>These parameters must be encoded into the token so that the request looked like this:</p>
<div class="header-gray">Sample of request to receive the status of the edited document</div>
<pre>
POST coauthoring/CommandService.ashx HTTP/1.1
Host: documentserver
Content-Type: application/json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjIjoiaW5mbyIsImtleSI6IktoaXJ6NnpUUGRmZDcifQ.r_6sThjFABsHMNHhkVdHDSz4jwkbXRQNYdvawkBGJgg"
}
</pre>
<p>As you can see there is no need to include the above parameters into the request body, as all of them are already encoded into the token and sent within it.</p>
<p id="conversion" class="copy-link">Validation is performed for incoming requests with the commands from the <b>document storage service</b> to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversionapi.aspx")%>">document conversion service</a>.</p>
<div class="header-gray">Sample parameters of request to convert the document</div>
<pre>
{
"filetype": "docx",
"key": "Khirz6zTPdfd7",
"outputtype": "pdf",
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
}
</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>
<div class="header-gray">Sample of request to convert the document</div>
<pre>
POST ConvertService.ashx HTTP/1.1
Host: documentserver
Content-Type: application/json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxldHlwZSI6ImRvY3giLCJrZXkiOiJLaGlyejZ6VFBkZmQ3Iiwib3V0cHV0dHlwZSI6InBkZiIsInRpdGxlIjoiRXhhbXBsZSBEb2N1bWVudCBUaXRsZS5kb2N4IiwidXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3VybC10by1leGFtcGxlLWRvY3VtZW50LmRvY3gifQ.U-YAfuuy7clWjn-xOncfJ-sxVG5DlcYn0AOzJYkoR0M"
}
</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>
<h2>Outgoing requests</h2>
<p id="callbackUrl" class="copy-link">Validation is performed for outgoing requests to "<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#callbackUrl")%>">callbackUrl</a>" address by <b>document editing service</b>.</p>
<div class="header-gray">Sample parameters of request to "callbackUrl" address by document editing service when the last user closed the document for editing without changes</div>
<pre>
{
"key": "Khirz6zTPdfd7",
"status": 4
}
</pre>
<div class="header-gray">Sample of request to "callbackUrl" address by document editing service when the last user closed the document for editing without changes</div>
<pre>
POST url-to-callback.ashx HTTP/1.1
Host: example.com
Content-Type: application/json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJLaGlyejZ6VFBkZmQ3Iiwic3RhdHVzIjo0fQ.gCyNKPpg6ISAnhvFQmRiY6BRqG6WPcEGgnK79hREdkU"
}
</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>When performing the GET requests from ONLYOFFICE Document Server an <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">authorization header</a> with the token is added.</p>
<p id="download" class="copy-link">
Validation is performed for outgoing requests to <b>document storage service</b> for file download.
</p>
<div class="header-gray">Sample payload of request to document storage service for file download</div>
<pre>
{
"url: "http://example.com/url-to-example-document.docx"
}
</pre>
<div class="header-gray">Sample of request to document storage service for file download</div>
<pre>
GET url-to-example-document.docx HTTP/1.1
Host: example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJodHRwOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQuZG9jeCJ9.-DBTpvYH2srNUc3Xy2N4QozEXO6VF1XS89K7Li0JM68
</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>The token includes the payload (the full URL to the document, in the example above it is <em>{"url: "http://example.com/url-to-example-document.docx"}</em>), which is also duplicated in the header as the <b>Host</b> (<em>example.com</em>) and the document address the GET request is sent to (<em>url-to-example-document.docx</em>).</p>
</div>

View File

@ -0,0 +1,74 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Browser";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Browser</h1>
<p class="dscr">When performing the client-side browser requests to ONLYOFFICE Document Server a <em>token</em> must be added to the parameters to validate the data.</p>
<p id="config">When a file is <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/open.aspx")%>">opened</a> for editing in ONLYOFFICE Document Server, the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/.aspx#token")%>">token</a> must be added to the configuration to validate the parameters.</p>
<p>
The <em>payload</em> for the JWT token in the JSON format must have the same structure as the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/advanced.aspx")%>">config</a>.
The parameter list to be signed is not strictly regulated, but we recommend that you specify the following parameters:
</p>
<pre>
{
"document": {
"fileType": "docx",
"key": "Khirz6zTPdfd7",
"permissions": {
"download": true,
"edit": true,
"print": true,
"review": true
},
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
},
"editorConfig": {
"callbackUrl": "https://example.com/url-to-callback.ashx",
"mode": "edit",
"user": {
"id": "78e1e841",
"name": "Smith"
}
}
}
</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>
<div class="header-gray">Sample token</div>
<pre>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb2N1bWVudCI6eyJmaWxlVHlwZSI6ImRvY3giLCJrZXkiOiJLaGlyejZ6VFBkZmQ3IiwicGVybWlzc2lvbnMiOnsiZG93bmxvYWQiOnRydWUsImVkaXQiOnRydWUsInByaW50Ijp0cnVlLCJyZXZpZXciOnRydWV9LCJ0aXRsZSI6IkV4YW1wbGUgRG9jdW1lbnQgVGl0bGUuZG9jeCIsInVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS91cmwtdG8tZXhhbXBsZS1kb2N1bWVudC5kb2N4In0sImVkaXRvckNvbmZpZyI6eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS91cmwtdG8tY2FsbGJhY2suYXNoeCIsIm1vZGUiOiJlZGl0IiwidXNlciI6eyJpZCI6Ijc4ZTFlODQxIiwibmFtZSI6IlNtaXRoIn19fQ.dQLHmsYqKoAG6vpcLngrIUkstAycpi8dFfP4lHPk0Uc</pre>
<p id="setHistoryData">When calling the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx#setHistoryData")%>">setHistoryData</a> method to view the document <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/history.aspx")%>">history</a> version in ONLYOFFICE Document Server, the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/.aspx#token")%>">token</a> must be added to validate the parameters.</p>
<p>
The <em>payload</em> for the JWT token in the JSON format must have the same structure as the method parameter.
The parameter list to be signed is not strictly regulated, but we recommend that you specify all the parameter sent:
</p>
<pre>
{
"changesUrl": "https://example.com/url-to-changes.zip",
"key": "Khirz6zTPdfd7",
"previous": {
"key": "af86C7e71Ca8",
"url": "https://example.com/url-to-the-previous-version-of-the-document.docx"
},
"url": "https://example.com/url-to-example-document.docx",
"version": 2
}
</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>
<div class="header-gray">Sample token</div>
<pre>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGFuZ2VzVXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3VybC10by1jaGFuZ2VzLnppcCIsImtleSI6IktoaXJ6NnpUUGRmZDciLCJwcmV2aW91cyI6eyJrZXkiOiJhZjg2QzdlNzFDYTgiLCJ1cmwiOiJodHRwOi8vZXhhbXBsZS5jb20vdXJsLXRvLXRoZS1wcmV2aW91cy12ZXJzaW9uLW9mLXRoZS1kb2N1bWVudC5kb2N4In0sInVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS91cmwtdG8tZXhhbXBsZS1kb2N1bWVudC5kb2N4IiwidmVyc2lvbiI6Mn0.9dgDsaVLFQ6RtoX_1s2pBVJHGnyMjxDXKC2TpC2nXb4</pre>
</div>

View File

@ -0,0 +1,125 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Request with token in header";
MetaDescription = "Статьи документации по API сервера документов.";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Request with token in header</h1>
<p class="dscr">
When performing the HTTP requests from ONLYOFFICE Document Server an authorization header with the <em>token</em> is added to validate the request.
When performing the HTTP requests to ONLYOFFICE Document Server an authorization header with the <em>token</em> must be added to validate the request.
</p>
<p>The <em>payload</em> for the JSON Web Token contains the following fields:</p>
<ul>
<li><b>payload</b> - the object containing the request body parameters in JSON format if not empty.</li>
</ul>
<h2>Incoming request</h2>
<p id="command" class="copy-link">Validation is performed for incoming requests with the commands from the <b>document storage service</b> to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">document command service</a>.</p>
<div class="header-gray">Sample payload of request to receive the status of the edited document</div>
<pre>
{
"payload": {
"c": "info",
"key": "Khirz6zTPdfd7"
}
}
</pre>
<div class="header-gray">Sample of request to receive the status of the edited document</div>
<pre>
POST coauthoring/CommandService.ashx HTTP/1.1
Host: documentserver
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImMiOiJpbmZvIiwia2V5IjoiS2hpcno2elRQZGZkNyJ9fQ.hGQ8kquQWpg4MQYiSYaIzik0wotP1coAop6QfLruenA
{
"c": "info",
"key": "Khirz6zTPdfd7"
}
</pre>
<p id="conversion" class="copy-link">Validation is performed for incoming requests with the commands from the <b>document storage service</b> to the <a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversionapi.aspx")%>">document conversion service</a>.</p>
<div class="header-gray">Sample payload of request to convert the document</div>
<pre>
{
"payload": {
"filetype": "docx",
"key": "Khirz6zTPdfd7",
"outputtype": "pdf",
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
}
}
</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>
<div class="header-gray">Sample of request to convert the document</div>
<pre>
POST ConvertService.ashx HTTP/1.1
Host: documentserver
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImZpbGV0eXBlIjoiZG9jeCIsImtleSI6IktoaXJ6NnpUUGRmZDciLCJvdXRwdXR0eXBlIjoicGRmIiwidGl0bGUiOiJFeGFtcGxlIERvY3VtZW50IFRpdGxlLmRvY3giLCJ1cmwiOiJodHRwOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQuZG9jeCJ9fQ.Ec50Gvafu4niR2I1LPgETn1jkvvs1wKm0YeeI1RbRQs
{
"filetype": "docx",
"key": "Khirz6zTPdfd7",
"outputtype": "pdf",
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
}
</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>
<h2>Outgoing requests</h2>
<p id="callbackUrl" class="copy-link">Validation is performed for outgoing requests to "<a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx#callbackUrl")%>">callbackUrl</a>" address by <b>document editing service</b>.</p>
<div class="header-gray">Sample payload of request to "callbackUrl" address by document editing service when the last user closed the document for editing without changes</div>
<pre>
{
"payload": {
"key": "Khirz6zTPdfd7",
"status": 4
}
}
</pre>
<div class="header-gray">Sample of request to "callbackUrl" address by document editing service when the last user closed the document for editing without changes</div>
<pre>
POST url-to-callback.ashx HTTP/1.1
Host: example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImtleSI6IktoaXJ6NnpUUGRmZDciLCJzdGF0dXMiOjR9fQ.MfVoGT-aYuPJfjQAaxwBv7-CqBylDae2AF9K5TpLf-E
{
"key": "Khirz6zTPdfd7",
"status": 4
}
</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 id="download" class="copy-link">Validation is performed for outgoing requests to <b>document storage service</b> for file download.</p>
<div class="header-gray">Sample payload of request to document storage service for file download</div>
<pre>
{}
</pre>
<div class="header-gray">Sample of request to document storage service for file download</div>
<pre>
GET url-to-example-document.docx HTTP/1.1
Host: example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU
</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>
</div>

View File

@ -0,0 +1,15 @@
<%@ Control Language="C#" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<ul>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/basic.aspx")%>">Основные понятия</a></li>
<li><a class="leftmenu_apieditors_toggle_menu toggler" href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/howitworks.aspx")%>">How it works</a>
<ul class="leftmenu_apieditors_toggle_menu_expand">
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/open.aspx")%>">Opening file</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/save.aspx")%>">Saving file</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/coedit.aspx")%>">Co-editing</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversion.aspx")%>">Converting and downloading file</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/history.aspx")%>">Document history</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/security.aspx")%>">Security </a></li>
</ul>
</li>
</ul>

View File

@ -0,0 +1,38 @@
<%@ Control Language="C#" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<ul>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/advanced.aspx")%>">Advanced parameters</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config.aspx")%>">Config</a>
<ul class="leftmenu_apieditors_toggle_menu_expand">
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document.aspx")%>">Document</a>
<ul class="leftmenu_apieditors_toggle_menu_expand">
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document/info.aspx")%>">Info</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/document/permissions.aspx")%>">Permissions</a></li>
</ul>
</li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor.aspx")%>">Editor</a>
<ul class="leftmenu_apieditors_toggle_menu_expand">
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/customization.aspx")%>">Customization</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/embedded.aspx")%>">Embedded</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/editor/plugins.aspx")%>">Plugins</a></li>
</ul>
</li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/config/events.aspx")%>">Events</a></li>
</ul>
</li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/methods.aspx")%>">Methods</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/callback.aspx")%>">Callback handler</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/command.aspx")%>">Command service</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/conversionapi.aspx")%>">Conversion API</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature.aspx")%>">Signature</a>
<ul class="leftmenu_apieditors_toggle_menu_expand">
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/browser.aspx")%>">Browser</a></li>
<li><a class="leftmenu_apieditors_toggle_menu toggler">Request</a>
<ul class="leftmenu_apieditors_toggle_menu_expand">
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/request.aspx")%>">Token in header</a></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/api/editors/signature/body.aspx")%>">Token in body</a></li>
</ul>
</li>
</ul>
</li>
</ul>

View File

@ -0,0 +1,12 @@
<%@ Control Language="C#" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<ul>
<li><p>Начало работы</p>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/SideMenu/apieditors/apieditors.ascx" />
</li>
</ul>
<ul>
<li><p>Документация</p>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/SideMenu/apieditors/apieditors_methods.ascx" />
</li>
</ul>

View File

@ -0,0 +1,17 @@
<%@ Master Language="C#" MasterPageFile="~/Masters/ArticlePage.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="pagebodyidlink" runat="Server">
<asp:contentplaceholder id="pagebodyidpage" runat="server"></asp:contentplaceholder>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="breadstoplink" runat="Server">
<asp:contentplaceholder id="breadstop" runat="server"></asp:contentplaceholder>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="leftmenupagelink" runat="Server">
<asp:contentplaceholder id="leftmenupage" runat="server"></asp:contentplaceholder>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentlink" runat="Server">
<cc:LocalizeContent ID="LocalizeContent8" runat="Server" ControlName="~/Controls/Help/VariousControls/HelpLinks/APIEditorsLinks.ascx" />
</div>
<asp:contentplaceholder id="content" runat="server"></asp:contentplaceholder>
</asp:Content>

View File

@ -0,0 +1,17 @@
<%@ Master Language="C#" MasterPageFile="~/Masters/ArticleListPage.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="pagebodyidlink" runat="Server">
<asp:contentplaceholder id="pagebodyidpage" runat="server"></asp:contentplaceholder>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="breadstoplink" runat="Server">
<asp:contentplaceholder id="breadstop" runat="server"></asp:contentplaceholder>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="leftmenupagelink" runat="Server">
<asp:contentplaceholder id="leftmenupage" runat="server"></asp:contentplaceholder>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentlink" runat="Server">
<cc:LocalizeContent ID="LocalizeContent8" runat="Server" ControlName="~/Controls/Help/VariousControls/HelpLinks/APIEditorsLinks.ascx" />
</div>
<asp:contentplaceholder id="content" runat="server"></asp:contentplaceholder>
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Advanced.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Basic.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Callback.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Coedit.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Command.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Document.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Document/Info.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Document/Permissions.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Editor.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Editor/Customization.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Editor/Embedded.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Editor/Plugins.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Config/Events.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Conversion.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/ConversionApi.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/History.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/HowItWorks.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Methods.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Open.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Save.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Security.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Signature.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Signature/Body.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Signature/Browser.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/APIEditors/APIEditorsList.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="api_developers api_editors">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/APIEditors/Signagure/Request.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
</asp:Content>

View File

@ -1486,7 +1486,7 @@ a.closeContainerButton {
padding: 5px;
text-align: center;
}
.notehelp {
.notehelp, .note {
background: @mobileMenuColor;
.borderRadius (2px);
color: @helpNoteTextColor;
@ -2534,6 +2534,7 @@ span.label {
.talk_expand_menu,
.documenteditor_expand_menu,
.leftmenu_plugins_toggle_menu_expand,
.leftmenu_apieditors_toggle_menu_expand,
.leftmenu_documenteditor_toggle_expand_menu,
.leftmenu_spreadsheeteditor_toggle_expand_menu,
.leftmenu_presentationeditor_toggle_expand_menu,
@ -4407,4 +4408,11 @@ h1 {
.table .infotext {
color: #999;
}
.api_developers {
&.api_editors {
pre.prettyprint {
padding: 17px !important;
}
}
}

View File

@ -1,3 +1,4 @@
$(document).ready(function() {
$(".menuleft li a.selected").parents("ul").css("display", "block")
$(".menuleft li a.selected").parents("ul").css("display", "block");
$(".menuleft li a.selected").next("ul").css("display", "block");
});

File diff suppressed because one or more lines are too long