Aleksander Fjellvang
07/12/2023, 11:57 AMAleksander Fjellvang
07/12/2023, 12:31 PM"RichTextEditor": {
"Plugins": [ "anchor", "charmap", "table", "lists", "autolink", "directionality", "searchreplace" ],
},
since the IOptions Plugins
are configured like public string[] Plugins { get; set; } = Default_plugins;
the options i supply is just appended to the list....Sebastiaan
07/12/2023, 12:38 PMSebastiaan
07/12/2023, 12:39 PMAleksander Fjellvang
07/13/2023, 5:28 AMSebastiaan
07/13/2023, 7:43 AMRichTextEditorSettings
class with dependency injection? Not sure.Aleksander Fjellvang
07/13/2023, 8:00 AMAleksander Fjellvang
07/13/2023, 8:51 AMservices.Configure<RichTextEditorSettings>(x => x.Plugins = new[] { "table", "code" });
doesn't work - again due to how default property initializers work. I guess an 'OverridePlugins' configuration would be more fitting?Sebastiaan
07/13/2023, 8:53 AMSebastiaan
07/13/2023, 8:53 AMAleksander Fjellvang
07/13/2023, 8:55 AMAleksander Fjellvang
07/13/2023, 9:55 AMservices.Configure<RichTextEditorSettings>(x =>
{
x.Plugins = new[] { "anchor", "charmap", "table", "lists", "autolink", "directionality", "searchreplace" };
x.Commands = new[] { new RichTextEditorSettings.RichTextEditorCommand() { Alias = "bullist", Mode = RichTextEditorCommandMode.Insert, Name = "Bullet list" } };
});
Okaaaay i'll relent and pull back my PRSebastiaan
07/13/2023, 10:55 AMAleksander Fjellvang
07/13/2023, 12:06 PM