Start using ONLYOFFICE Docs within Drupal
To edit the office documents in Drupal using the ONLYOFFICE Docs, upload the files to Drupal.
Uploading files to Drupal
- Go to Manage -> Content.
- Click the Add content button.
- Click the required content type.
- Enter the title, language, body, and set the text format.
- In the Add a new file field click the Browse button and choose the file from your PC hard drive.
- Check or uncheck the Published box depending on your preferences.
- Click the Save button.
Viewing, editing and managing files in Drupal
- Go to Manage -> Content.
- Switch to the Media tab at the top of the screen.
- Find the required file in the list or use the search field at the top.
- Click the arrow in the Operations column to choose whether you want to Edit the file properties, Edit in ONLYOFFICE or Delete the file.
Adding files to posts
When creating a post, you can add the new ONLYOFFICE element.
- Go to Structure -> Content types -> click Manage fields next to the required content field. On the opened page, click Add field. Add a new field: General, Number, Reference or Text. Set the label and save.
- For the added File field, specify the file extensions. Go to Structure -> Content types -> Manage fields, or stay on the opened page. In the Allowed file extensions field, specify the file formats that will be shown in the editors (docx, xlsx, pptx).
- For the added Media field, click the Document checkbox.
- Go to Structure -> Media types -> Document -> open the drop-down list and choose the Manage display option.
- For the Document field, specify the ONLYOFFICE Preview format. By clicking on the gear symbol, you can specify the dimensions of the embedded editor window.
When you are done with the pre-settings, you can create posts on the Content tab. Click on the Add content button and select the created content.
- Specify title and select a file (if the content contains File fields).
- For Media section, specify the name of the previously uploaded file.
- Your site visitors will also be able to view the created page (People -> Permissions -> View published content).