Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Add ViewerJS #291

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Add ViewerJS #291

wants to merge 1 commit into from

Conversation

twiss
Copy link
Collaborator

@twiss twiss commented Mar 7, 2015

This PR adds read-only support for various formats.

Implementation notes:

  • This commit disables replacing scripts and links with data urls, including the origin check. Let me know if it works, if so the code can be removed.
  • ViewerJS is not currently sandboxed. Doing so should work, but probably comes with a small performance penalty. That can theoretically be fixed, but not super easily. If you want, you could try adding sandbox and comparing performance for large documents.

Integration notes:

  • Various buttons don't work. The worst is "Save As", which not only doesn't work but makes you do stuff before you find out. Honorable mention for "Print", which doesn't work and is also probably impossible to make work. To add insult to injury, you don't get any errors for all those buttons.
  • The fullscreen and download buttons are duplicated, but the ViewerJS ones work better currently.
  • Night mode doesn't work.
  • Generally, ViewerJS could be made to look more like our other editor.

If you want, I could hide the buttons that don't work. Alternatively, if someone wants to help with some of these before or after merging that's very welcome. Also, all this is why I originally opted not to go for WebODF ;), although that point is now partly moot.

Readable diff: git show -w --diff-filter=M

@twiss twiss force-pushed the develop branch 2 times, most recently from 4a4b68e to 1d5aa09 Compare July 2, 2015 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant