diff --git a/attachment_preview/static/lib/ViewerJS/ODFViewerPlugin.js b/attachment_preview/static/lib/ViewerJS/ODFViewerPlugin.js index 0fa7da73..c2ddae36 100644 --- a/attachment_preview/static/lib/ViewerJS/ODFViewerPlugin.js +++ b/attachment_preview/static/lib/ViewerJS/ODFViewerPlugin.js @@ -110,7 +110,7 @@ function ODFViewerPlugin() { shadowCursor = new gui.ShadowCursor(odtDocument); sessionController = new gui.SessionController(session, localMemberId, shadowCursor, {}); eventManager = sessionController.getEventManager(); - caretManager = new gui.CaretManager(sessionController); + caretManager = new gui.CaretManager(sessionController, odfCanvas.getViewport()); selectionViewManager = new gui.SelectionViewManager(gui.SvgSelectionView); sessionView = new gui.SessionView({ caretAvatarsInitiallyVisible: false diff --git a/attachment_preview/static/lib/ViewerJS/PluginLoader.js b/attachment_preview/static/lib/ViewerJS/PluginLoader.js index 4b285f2a..e99e1e58 100644 --- a/attachment_preview/static/lib/ViewerJS/PluginLoader.js +++ b/attachment_preview/static/lib/ViewerJS/PluginLoader.js @@ -60,12 +60,17 @@ function loadDocument(documentUrl) { var extension = documentUrl.split('.').pop(), Plugin; extension = extension.toLowerCase(); - + switch (extension) { case 'odt': - case 'odp': - case 'ods': case 'fodt': + case 'ott': + case 'odp': + case 'fodp': + case 'otp': + case 'ods': + case 'fods': + case 'ots': loadPlugin('./ODFViewerPlugin', function () { Plugin = ODFViewerPlugin; }); diff --git a/attachment_preview/static/lib/ViewerJS/index.html b/attachment_preview/static/lib/ViewerJS/index.html index 8692f19e..90b6618d 100644 --- a/attachment_preview/static/lib/ViewerJS/index.html +++ b/attachment_preview/static/lib/ViewerJS/index.html @@ -126,6 +126,7 @@ limitations under the License. ✖
+