Rich text editor removes <p> tags and ignores embe...
# help-with-umbraco
a
Hi everyone, We are using Umbraco 11 and have run into an issue with the rich text editor where it clears all paragraph spacing and will not accept images being embedded into the RTE window. It happens whether the RTE is part of a composed block, or if it's just out on it's own. Any help or ideas where to look would be greatly appreciated. BTW, I'm still learning, so apologies if it's something obvious that I didn't realise.
s
Can you share a code snippet of the RTE being pulled into the view?
a
@using Umbraco.Cms.Core.Templates @model dynamic @inject HtmlLocalLinkParser HtmlLocalLinkParser; @inject HtmlUrlParser HtmlUrlParser; @inject HtmlImageSourceParser HtmlImageSourceParser; @{ var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString()); value = HtmlUrlParser.EnsureUrls(value); value = HtmlImageSourceParser.EnsureImageSources(value); } @Html.Raw(value)
is that the right one?
s
Hmm I havn't used those Parser's before so can't comment on them. Difficult to know whats stripping out the tags without being able to step through. Guessing "@Html.Raw(Model.value)" doesn't give you what you need?
a
i'll give that a look
i'm not getting anything useful with your suggestion unfortunately
s
That was a bit of a shot in the dark. Out of interest where is this view being called from, is it a template for a doc type?
a
it's a partial view under a folder called "editors"
h
have you changed/added any RTEsettings in your appsettings file?
a
They had been amended, but I have put them back to the default from https://docs.umbraco.com/umbraco-cms/reference/configuration/richtexteditorsettings minus the commands.
h
Does it now work correctly?
a
sadly not.
h
could you show us your "RichTextEditor" section from appsettings
thanks for your help peeps. It has been fixed now. As usual it was a mix of too many closing brackets and miscommunication.
p
@User May I suggest “Umbracians” instead of "guys"? We use gender inclusive language in this Discord. 😀
9 Views