Current filter:
                                You should refresh the page.
                                  • Hi,

                                    I have some HTML content presented to the HtmlEditor and the <img> elements are stripped from the Rendering.   Here is my Control Definition:

                                    @model ORMVCAdmin.Models.StockEditorDetailModel
                                    
                                    @Html.DevExpress().HtmlEditor(settings =>
                                    {
                                       settings.Name = "htmlWEBLONGDES";
                                       settings.CallbackRouteValues = new { Controller = "Data", Action = "StockEditorLongDescriptionsPartialView" };
                                       settings.AccessibilityCompliant = true;
                                       settings.ActiveView = HtmlEditorView.Html;
                                       settings.SettingsHtmlEditing.AllowedDocumentType = AllowedDocumentType.HTML5;
                                       settings.SettingsHtmlEditing.AllowEditFullDocument = true;
                                       settings.SettingsHtmlEditing.AllowFormElements = true;
                                       settings.SettingsHtmlEditing.AllowIdAttributes = true;
                                       settings.SettingsHtmlEditing.AllowObjectAndEmbedElements = true;
                                       settings.SettingsHtmlEditing.AllowScripts = true;
                                       settings.SettingsHtmlEditing.AllowStyleAttributes = true;
                                       settings.SettingsHtmlEditing.AllowHTML5MediaElements = true;
                                       settings.SettingsHtmlEditing.AllowIFrames = true;
                                       settings.SettingsHtmlEditing.AllowYouTubeVideoIFrames = true;
                                       settings.SettingsHtmlEditing.EnablePasteOptions = true;
                                       settings.SettingsHtmlEditing.PasteMode = HtmlEditorPasteMode.SourceFormatting;
                                       settings.ClientEnabled = true;
                                       settings.ClientVisible = true;
                                       settings.Height = Unit.Pixel(300);
                                       settings.Html = Model.WEBLONGDES;
                                    }).GetHtml()

                                    this is the stored HTML content:

                                    <img src=""http://www.bookfairrewards.com/graphics/exclusive_word.png"" alt="""" border=""0"" /> <br />
                                    Do you want to be a great Pokémon trainer? This must-have reference book is packed with facts, stats, tips, and other insider information to help you catch ‘em all! Library bound. 160 pp. Gr. 2-5.

                                    To get around issues I have with the <script> and <style> elements previously reported, I create a Full HTML Document to present to the HtmlEditor Control:

                                    <html><head><title></title></head><body><img src=""http://www.bookfairrewards.com/graphics/exclusive_word.png"" alt="""" border=""0"" /> <br />
                                    Do you want to be a great Pokémon trainer? This must-have reference book is packed with facts, stats, tips, and other insider information to help you catch ‘em all! Library bound. 160 pp. Gr. 2-5.</body></html>

                                    The <img> element is stripped from all Views of the Html Editor. Any guidance would be appreciated.

                                    Regards,
                                    Bill

                                • Helen (DevExpress Support) 09.11.2019

                                  Hi Bill,

                                  I've checked your content in our online demo with the similar configuration and see that the "img" tag remains in HTML code, however, its attributes are removed. See the attached video. This happens, because the tag is not valid - every attribute is wrapped in quotes twice and it breaks HTML parser:
                                  Incorrect:

                                  <img src=""http://www.bookfairrewards.com/graphics/exclusive_word.png"" alt="""" border=""0"" />

                                  Correct:

                                  [HTML]
                                  <img src="http://www.bookfairrewards.com/graphics/exclusive_word.png" alt=""/>

                                  When the tag is valid, it remains in the HTML content.

                                  Would you please clarify if you see the same behavior on your side and your content indeed contains double quotes for each attribute? If this is the real content, is it possible to adjust the "img" tags so that they become valid?

                                1 Solution

                                Creation Date Importance Sort by

                                Thanks Helen,

                                I did not catch the double double quotes, I will groom the data contained in the database .  This is a legacy system I am replacing and the data is very old.

                                Regards,
                                Dave

                                • Lanette (DevExpress Support) 09.11.2019

                                  Hello William,

                                  Thank you for your response.
                                  Let us know if you need any further assistance with this scenario.