diff --git a/src/Umbraco.Core/DeliveryApi/IApiRichTextParser.cs b/src/Umbraco.Core/DeliveryApi/IApiRichTextParser.cs new file mode 100644 index 0000000000..f12f9d7755 --- /dev/null +++ b/src/Umbraco.Core/DeliveryApi/IApiRichTextParser.cs @@ -0,0 +1,8 @@ +using Umbraco.Cms.Core.Models.DeliveryApi; + +namespace Umbraco.Cms.Core.DeliveryApi; + +public interface IApiRichTextParser +{ + RichTextElement? Parse(string html); +} diff --git a/src/Umbraco.Infrastructure/Models/DeliveryApi/RichTextElement.cs b/src/Umbraco.Core/Models/DeliveryApi/RichTextElement.cs similarity index 88% rename from src/Umbraco.Infrastructure/Models/DeliveryApi/RichTextElement.cs rename to src/Umbraco.Core/Models/DeliveryApi/RichTextElement.cs index 580bb2a323..3f33b4364f 100644 --- a/src/Umbraco.Infrastructure/Models/DeliveryApi/RichTextElement.cs +++ b/src/Umbraco.Core/Models/DeliveryApi/RichTextElement.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Cms.Infrastructure.Models.DeliveryApi; +namespace Umbraco.Cms.Core.Models.DeliveryApi; public class RichTextElement { diff --git a/src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextParser.cs b/src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextParser.cs index ea4ef80eda..b111a40113 100644 --- a/src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextParser.cs +++ b/src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextParser.cs @@ -6,7 +6,7 @@ using Umbraco.Cms.Core.DeliveryApi; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Core.Routing; -using Umbraco.Cms.Infrastructure.Models.DeliveryApi; +using Umbraco.Cms.Core.Models.DeliveryApi; using Umbraco.Extensions; namespace Umbraco.Cms.Infrastructure.DeliveryApi; @@ -137,7 +137,6 @@ public partial class ApiRichTextParser : IApiRichTextParser IPublishedContent? media = publishedSnapshot.Media?.GetById(udi); if (media is not null) { - // var currentSrc = attributes.ContainsKey("src") ? attributes["src"] as string : null; attributes["src"] = _publishedUrlProvider.GetMediaUrl(media, UrlMode.Absolute); // this may be relevant if we can't find width and height in the attributes ... for now we seem quite able to, though diff --git a/src/Umbraco.Infrastructure/DeliveryApi/IApiRichTextParser.cs b/src/Umbraco.Infrastructure/DeliveryApi/IApiRichTextParser.cs deleted file mode 100644 index 259fc8baed..0000000000 --- a/src/Umbraco.Infrastructure/DeliveryApi/IApiRichTextParser.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Umbraco.Cms.Infrastructure.Models.DeliveryApi; - -namespace Umbraco.Cms.Infrastructure.DeliveryApi; - -public interface IApiRichTextParser -{ - RichTextElement? Parse(string html); -} diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs index 6b598a8506..84c91c2995 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs @@ -14,9 +14,9 @@ using Umbraco.Cms.Core.PropertyEditors.DeliveryApi; using Umbraco.Cms.Core.Strings; using Umbraco.Cms.Core.Templates; using Umbraco.Cms.Core.Web; -using Umbraco.Cms.Infrastructure.DeliveryApi; +using Umbraco.Cms.Core.DeliveryApi; using Umbraco.Cms.Infrastructure.Macros; -using Umbraco.Cms.Infrastructure.Models.DeliveryApi; +using Umbraco.Cms.Core.Models.DeliveryApi; using Umbraco.Extensions; namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;