-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a document builder for previews #1882
Labels
enhancement
Request: New feature or improvement
next release
Note: Features planned for next release
Milestone
Comments
This was referenced May 21, 2024
Got a working version in #1892 that is currently a drop-in replacement for the HTML in PREVIEW mode for the document viewer. It will also work for the Manuscript preview, but since the preview also uses a file cache for the preview doc between sessions, I need to add a way to serialise/deserialise the data to/from disk. Since the token array contains all the info needed, it's a good candidate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Request: New feature or improvement
next release
Note: Features planned for next release
As pointed out in #1858 by @zxygentoo, the HTML pathway currently used to generate content for the document viewer as well as the build tool preview is not sufficiently capable of showing all the formatting novelWriter supports. This can be bypassed by just generating a QTextDocument directly from the Tokenizer-generated data arrays.
The document itself is capable of displaying a lot more. The serialisation/deserialisation features built into the Qt library are very limited. The HTML support is very outdated as HTML4 and even there only supports a subset. Generating the formatted document using the QTextCursor object is reasonably fast, so it's good enough for the viewer, and the manuscript preview is not time critical anyway.
The text was updated successfully, but these errors were encountered: