Nextcloud PHP API (master)

IEditor

Tags
since
18.0.0

Table of Contents

Methods

getCreators()  : array<string|int, ACreateFromTemplate>|array<string|int, ACreateEmpty>
Return a list of file creation options to be presented to the user
getId()  : string
Return a unique identifier for the editor
getMimetypes()  : array<string|int, string>
A list of mimetypes that should open the editor by default
getMimetypesOptional()  : array<string|int, string>
A list of mimetypes that can be opened in the editor optionally
getName()  : string
Return a readable name for the editor
isSecure()  : bool
Return if the view is able to securely view a file without downloading it to the browser
open()  : Response
Return a template response for displaying the editor

Methods

getId()

Return a unique identifier for the editor

public getId() : string

e.g. richdocuments

Tags
since
18.0.0
Return values
string

getMimetypes()

A list of mimetypes that should open the editor by default

public getMimetypes() : array<string|int, string>
Tags
since
18.0.0
Return values
array<string|int, string>

getMimetypesOptional()

A list of mimetypes that can be opened in the editor optionally

public getMimetypesOptional() : array<string|int, string>
Tags
since
18.0.0
Return values
array<string|int, string>

getName()

Return a readable name for the editor

public getName() : string

e.g. Collabora Online

Tags
since
18.0.0
Return values
string

isSecure()

Return if the view is able to securely view a file without downloading it to the browser

public isSecure() : bool
Tags
since
18.0.0
Return values
bool

open()

Return a template response for displaying the editor

public open(IToken $token) : Response

open can only be called once when the client requests the editor with a one-time-use token For handling editing and later requests, editors need to implement their own token handling and take care of invalidation

This behavior is similar to the current direct editing implementation in collabora where we generate a one-time token and switch over to the regular wopi token for the actual editing/saving process

Parameters
$token : IToken
Tags
since
18.0.0
Return values
Response

        
On this page

Search results