diff --git a/seahub/templates/onlyoffice_file_view_react.html b/seahub/templates/onlyoffice_file_view_react.html index 5fdefa168a..f6a5254181 100644 --- a/seahub/templates/onlyoffice_file_view_react.html +++ b/seahub/templates/onlyoffice_file_view_react.html @@ -145,7 +145,11 @@ {% endif %} } }; - var docEditor = new DocsAPI.DocEditor("placeholder", config); + + window.onload = function () { + var docEditor = new DocsAPI.DocEditor("placeholder", config); + }; +