feat: Add HTML export option (#4056)
* tidy * Add title to HTML export * fix: Add compatability for documents without collab state * Add HTML download option to UI * docs * fix nodes that required document to render * Refactor to allow for styling of HTML export * div>article for easier programatic content extraction
This commit is contained in:
@@ -13,6 +13,7 @@ type Props = {
|
||||
id?: string;
|
||||
shareId?: string;
|
||||
user?: User;
|
||||
includeState?: boolean;
|
||||
};
|
||||
|
||||
type Result = {
|
||||
@@ -25,6 +26,7 @@ export default async function loadDocument({
|
||||
id,
|
||||
shareId,
|
||||
user,
|
||||
includeState,
|
||||
}: Props): Promise<Result> {
|
||||
let document;
|
||||
let collection;
|
||||
@@ -156,6 +158,7 @@ export default async function loadDocument({
|
||||
document = await Document.findByPk(id as string, {
|
||||
userId: user ? user.id : undefined,
|
||||
paranoid: false,
|
||||
includeState,
|
||||
});
|
||||
|
||||
if (!document) {
|
||||
|
||||
Reference in New Issue
Block a user