How to migrate office documents to documents based on modern Web technologies

Currently, all documentation is based on MS Office. This complicates things if you want to integrate some features. Then you have the option to use VBA or VSTO. First, it's not comfortable, secondly, it's like taking a hammer to crack a nut.
HTML makes it easy to perform simple tasks, such as simple commands, hidden text, or basic math.

I would therefore need an HTML text processor that focuses on the content (text) and allows me to add interactivity when I need it. This involves switching to source code or displaying additional panels only on demand, so that the author can focus on textual content (a person more familiar with programming would do the formatting / interactivity ).
In the long run, I wish to have the opportunity to integrate elements such as SQLite and API calls.
In addition, the output must be in a single file, otherwise it will not be portable and users (who will fill only data) will not accept it.
I do some research and I told myself that there was no all-in-one solution, but that there were several options to meet some of my requirements.
I wonder what is the best way to achieve my long-term goals.

HTML5 offline application
It seems that I am developing either an offline HTML5 application, which is well explained, for example. right here:

  1. Offline Web Applications: A Work Example
  2. Tutorial: How to create an offline HTML5 Web application, like FT
  3. Creating HTML5 offline web applications
  4. How to create a single page offline web site
  5. more background information about single-page apps in depth

The content can be generated in a markdown editor, as recommended in the What is a good WYSIWYG HTML self-recording word processor? or simply convert desktop documents to HTML5.

HTML Editor / Site Designer
Alternatively, I could use an HTML editor or a visual site designer
but the selection is not really small for me.
I found help in:

1. Battle of text editors: Atom, Sublime and Brackets
2. 26 Tools and frameworks for HTML-based desktop and application interfaces
3. Free HTML Editors: Top 16 Choices for Windows Web Developers
4. or even simpler for the standard desktop user: GrapesJS – Next generation tool for creating models without coding

single file website (app)
If I understand correctly, the problem persists: the output will not be a single file, is not it?
I could use the archive formats, but not all applications support what is explained in What is the best "file format" to save complete web pages (images, etc.) in a single archive ?.
It could work if I only do simple things and built-in media objects as Base64-encoded objects, but this has the disadvantage of a significant overhead.

Desktop Web Applications
If I want to achieve more complex things, I would have to develop desktop applications using HTML / CSS / JavaScript, but again, the selection is very limited, as you can see in How to develop desktop applications using HTML / CSS / JavaScript? .
I have not found anything yet that allows me to deploy a desktop web application as a single file.

A4 layout
The layout would be made with the help of the information given in How to create an HTML page on an A4 page?

HTML in the office
For the transition phase, it would be interesting to be able to transfer the HTML code, for example. docx. Some options are mentioned in the references below:

  1. How to convert an HTML file to Word?
  2. Convert html to docx with pandoc
  3. html-docx-js
  4. Convert HTML to Docx to C #

So how will I proceed?

currently links are ignored can an administrator can set an exception for this post