feat(content-management): use rich HTML editor for static page content

This commit is contained in:
sdarbinyan
2026-07-13 10:44:47 +04:00
parent dc8c2eac91
commit 646a68e9fd
2 changed files with 6 additions and 2 deletions

View File

@@ -42,7 +42,10 @@
</label> </label>
<label class="full"> <label class="full">
<span>{{ 'builder.htmlPreview' | translate }} {{ locale }}</span> <span>{{ 'builder.htmlPreview' | translate }} {{ locale }}</span>
<textarea rows="6" [ngModel]="page.translations[locale]?.html || ''" (ngModelChange)="updateTranslation(page.id, locale, 'html', $event)"></textarea> <app-marketplace-html-editor
[html]="page.translations[locale]?.html || ''"
(htmlChange)="updateTranslation(page.id, locale, 'html', $event)"
/>
</label> </label>
</div> </div>
} }

View File

@@ -4,11 +4,12 @@ import { ProjectEditorFacade } from '../../project-editor/facade/project-editor.
import { ContentManagementFacade } from '../facade/content-management.facade'; import { ContentManagementFacade } from '../facade/content-management.facade';
import { ContentPage } from '../models/content-page.model'; import { ContentPage } from '../models/content-page.model';
import { TranslatePipe } from '../../../i18n/translate.pipe'; import { TranslatePipe } from '../../../i18n/translate.pipe';
import { MarketplaceHtmlEditorComponent } from '../../project-editor/components/html-editor/marketplace-html-editor.component';
@Component({ @Component({
selector: 'app-static-pages-editor', selector: 'app-static-pages-editor',
standalone: true, standalone: true,
imports: [FormsModule, TranslatePipe], imports: [FormsModule, TranslatePipe, MarketplaceHtmlEditorComponent],
templateUrl: './static-pages-editor.component.html', templateUrl: './static-pages-editor.component.html',
styleUrls: ['../../project-editor/sections/section.shared.scss'], styleUrls: ['../../project-editor/sections/section.shared.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush