Merge pull request 'feat(editor): page templates — live whole-page embed (MVP)' (#17) from feat/page-templates into develop
Some checks failed
Develop / build (push) Has been cancelled

This commit was merged in pull request #17.
This commit is contained in:
claude_code
2026-06-20 20:34:44 +03:00
46 changed files with 2042 additions and 189 deletions

View File

@@ -45,6 +45,7 @@ import {
htmlToMarkdown,
TransclusionSource,
TransclusionReference,
PageEmbed,
} from '@docmost/editor-ext';
import { generateText, getSchema, JSONContent } from '@tiptap/core';
import { generateHTML, generateJSON } from '../common/helpers/prosemirror/html';
@@ -114,6 +115,7 @@ export const tiptapExtensions = [
Status,
TransclusionSource,
TransclusionReference,
PageEmbed,
] as any;
export function jsonToHtml(tiptapJson: any) {

View File

@@ -434,5 +434,17 @@ export class PersistenceExtension implements Extension {
'Failed to sync transclusion references for page',
);
}
try {
await this.transclusionService.syncPageTemplateReferences(
pageId,
workspaceId,
tiptapJson,
);
} catch (err) {
this.logger.error(
{ err, pageId },
'Failed to sync page template references for page',
);
}
}
}

View File

@@ -13,6 +13,11 @@ import { LoggerModule } from '../../common/logger/logger.module';
import { RedisModule } from '@nestjs-labs/nestjs-ioredis';
import { RedisConfigService } from '../../integrations/redis/redis-config.service';
import { CaslModule } from '../../core/casl/casl.module';
// TransclusionModule (via CollaborationModule) registers PageTemplateController,
// whose UserThrottlerGuard needs the throttler options from ThrottleModule. The
// API server's AppModule imports it; the collab process must too or it fails to
// resolve THROTTLER:MODULE_OPTIONS at boot.
import { ThrottleModule } from '../../integrations/throttle/throttle.module';
import { CacheModule } from '@nestjs/cache-manager';
import KeyvRedis from '@keyv/redis';
@@ -22,6 +27,7 @@ import KeyvRedis from '@keyv/redis';
DatabaseModule,
EnvironmentModule,
CaslModule,
ThrottleModule,
CollaborationModule,
QueueModule,
HealthModule,