Drupal 8 provide a menu item reference field which can be used to refer a piece of content to a menu item, This module provides you a contextual filter default value, which return you current activ
The Onlyoffice Preview Field Module for Drupal 8 & 9 creates a simple field type that allow you to display document Media in iframe throw an Onlyoffice server.