From 70a1f45cd0746a6197627673e13981085b504cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20M=C3=A1rkus?= Date: Thu, 28 Dec 2023 10:33:22 +0100 Subject: [PATCH 1/2] Adding new Enum based editor. --- .../Extensions/SiteTexts/SiteTextMigrations.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs b/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs index 56daa1c0..384bee7b 100644 --- a/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs +++ b/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs @@ -5,6 +5,7 @@ using OrchardCore.Data.Migration; using OrchardCore.Markdown.Models; using static Lombiq.HelpfulExtensions.Extensions.SiteTexts.Constants.ContentTypes; +using static Lombiq.HelpfulLibraries.OrchardCore.Contents.ContentFieldEditorEnums; namespace Lombiq.HelpfulExtensions.Extensions.SiteTexts; @@ -24,7 +25,7 @@ public int Create() draftable: false, listable: true, versionable: false) - .WithPart(nameof(MarkdownBodyPart), part => part.WithEditor("Wysiwyg")) + .WithPart(nameof(MarkdownBodyPart), part => part.WithEditor(HtmlFieldEditors.Wysiwyg)) .WithPart(nameof(LocalizationPart))); return 1; From 070675a7079668679a82bf66b965a393bf759060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20M=C3=A1rkus?= Date: Thu, 28 Dec 2023 10:39:36 +0100 Subject: [PATCH 2/2] Adding enum instead of string. --- .../Extensions/SiteTexts/SiteTextMigrations.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs b/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs index 384bee7b..4a3f9d32 100644 --- a/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs +++ b/Lombiq.HelpfulExtensions/Extensions/SiteTexts/SiteTextMigrations.cs @@ -25,7 +25,7 @@ public int Create() draftable: false, listable: true, versionable: false) - .WithPart(nameof(MarkdownBodyPart), part => part.WithEditor(HtmlFieldEditors.Wysiwyg)) + .WithPart(nameof(MarkdownBodyPart), part => part.WithEditor(MarkdownFieldEditors.Wysiwyg)) .WithPart(nameof(LocalizationPart))); return 1;