owncloud / richdocuments

:notebook_with_decorative_cover: Collabora Online for ownCloud
118 stars 53 forks source link

Settings option for file types to open with collabora #207

Open mrlinux1 opened 6 years ago

mrlinux1 commented 6 years ago

Hi ! By default now also plain txt files will be opened by collabora. As this takes quite some time it would be an idea to make that a setting for the app which file types should be opened by the richdocuments app.

Maybe even configurable by the user (but this has implications on locking if one user does collabora on those file and another does not).

Kind regards,

Thomas

s-light commented 4 years ago

is there any manual workaround to disable the richdocuments / collabora app to open txt files? i also prefer the simple editor for this file type..

seems i could remove 'text/plain'` from supportedMimes list..

for the pdf filetype it helped to install the PDF Viewer after collabora. but this did not work for me with the texteditor..

s-light commented 4 years ago

workaround: comment out the line 22 in /js/viewer/viewer.js :

var odfViewer = {
    isDocuments : false,
    supportedMimes: [
        'application/pdf',
        ...
        //'text/plain',
        ...

would be great to create a checkbox for this.... ;-)


edit: just as a note to myself - for owncloud in docker use on of these to ways to change the file:

  1. from within the live docker environment:
    
    user@server:~$ docker exec -it owncloud-docker_owncloud_1 /bin/bash

root@98xx: /var/www/owncloud # nano custom/richdocuments/js/viewer/viewer.js

... comment line 22

root@98xx: /var/www/owncloud # exit exit user@server:~$


2. on local volume:

user@server:~$ sudo nano /var/lib/docker/volumes/owncloud-docker_files/_data/apps/richdocuments/js/viewer/viewer.js

... comment line 22