markdown img insert work as intended

This commit is contained in:
dimitar committed 2026-02-03 19:53:29 +01:00
1 parent 28609a6492
commit 6467e21019
9 files changed
+3138 -1263

No files matched your search

+13 -1
View File
@@ -5,7 +5,7 @@ import { lastValueFrom } from 'rxjs';
import { ArticlesService } from './articles.service';
import { LiveBlogService } from './live-blog.service';
import { CreateArticleDto, CreateLiveBlogDto } from './articles.dto';
import { ArticleStatus, LiveBlogStatus } from './entities';
import { ArticleStatus, LiveBlogStatus, ImagePosition, ImageSize } from './entities';
interface StrapiArticle {
id: number;
@@ -19,6 +19,8 @@ interface StrapiArticle {
updatedAt: string;
img?: any;
media?: any[];
imagePosition?: string;
imageSize?: string;
}
interface StrapiLiveBlog {
@@ -33,6 +35,8 @@ interface StrapiLiveBlog {
updatedAt: string;
img?: any;
media?: any[];
imagePosition?: string;
imageSize?: string;
}
interface StrapiResponse<T> {
@@ -156,6 +160,8 @@ export class StrapiService {
: ArticleStatus.DRAFT,
tags: [],
featuredImage: imageUrl,
imagePosition: (strapiArticle.imagePosition || 'top') as ImagePosition,
imageSize: (strapiArticle.imageSize || 'medium') as ImageSize,
};
await this.articlesService.syncFromStrapi(
@@ -215,6 +221,8 @@ export class StrapiService {
status,
tags: [],
featuredImage: imageUrl,
imagePosition: (strapiArticle.imagePosition || 'top') as ImagePosition,
imageSize: (strapiArticle.imageSize || 'medium') as ImageSize,
};
await this.articlesService.syncFromStrapi(
@@ -277,6 +285,8 @@ export class StrapiService {
slug: strapiLiveBlog.slug,
status: this.mapStrapiStatusToLiveBlogStatus(strapiLiveBlog.status),
featuredImage: imageUrl,
imagePosition: (strapiLiveBlog.imagePosition || 'top') as ImagePosition,
imageSize: (strapiLiveBlog.imageSize || 'medium') as ImageSize,
};
await this.liveBlogService.syncFromStrapi(
@@ -330,6 +340,8 @@ export class StrapiService {
slug: strapiLiveBlog.slug,
status,
featuredImage: imageUrl,
imagePosition: (strapiLiveBlog.imagePosition || 'top') as ImagePosition,
imageSize: (strapiLiveBlog.imageSize || 'medium') as ImageSize,
};
await this.liveBlogService.syncFromStrapi(