Is it possible to limit the html to a specific set of tags
<div>,<font>,<strong>,<em>,<u>,<ol>,<ul>,<li>,<blockquote>
The intention is to apply a rich text format that is compatible with MS Access Rich text fields.
Details Here:
https://support.microsoft.com/en-us/office/create-or-delete-a-rich-text-field-9f86237d-dbbc-4a85-b12c-9d8dca824630?ocmsassetid=ha010014097&correlationid=93686114-d3c0-46eb-a703-f89a1bd2ce93&ui=en-us&rs=en-us&ad=us
|
| <SfRichTextEditor EnterKey="EnterKeyTag.DIV" ShiftEnterKey="ShiftEnterKeyTag.DIV"> <RichTextEditorToolbarSettings Items="@Tools" /> <RichTextEditorPasteCleanupSettings DeniedTags="@DeniedTag" /> </SfRichTextEditor> @code { private string[] DeniedTag = new string[] { "a", "a[!rel='nofollow' href]", "img" }; private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>() { new ToolbarItemModel() { Command = ToolbarCommand.Bold }, new ToolbarItemModel() { Command = ToolbarCommand.Italic }, new ToolbarItemModel() { Command = ToolbarCommand.Separator }, new ToolbarItemModel() { Command = ToolbarCommand.FontColor }, new ToolbarItemModel() { Command = ToolbarCommand.BackgroundColor }, new ToolbarItemModel() { Command = ToolbarCommand.Separator }, new ToolbarItemModel() { Command = ToolbarCommand.Formats }, new ToolbarItemModel() { Command = ToolbarCommand.Alignments }, new ToolbarItemModel() { Command = ToolbarCommand.Separator }, new ToolbarItemModel() { Command = ToolbarCommand.OrderedList }, new ToolbarItemModel() { Command = ToolbarCommand.UnorderedList }, new ToolbarItemModel() { Command = ToolbarCommand.Separator }, new ToolbarItemModel() { Command = ToolbarCommand.Separator } new ToolbarItemModel() { Command = ToolbarCommand.Separator }, new ToolbarItemModel() { Command = ToolbarCommand.Undo }, new ToolbarItemModel() { Command = ToolbarCommand.Redo } }; } |
THanks, an option for allowed tags would be cleaner... The denied list would be huge...
Future feature perhaps?
Hi Daniel,
We let you know that the SfRichTextEditor denied tags are supported only for paste actions. Could you please share more information about your requirements for your use case, such as whether you want to allow tag support only on paste actions?
Regards,
Buvana S
I know this is not exactly the answer to your question, but the scenario exists where users enter values via MS Access database, and these values can be exposed and edited via a web interface. My goal is to make sure that when a user edits an existing value, or creates a new value, in the web interface that this data remains consistent when viewed again in MS Access. This may also include pasting data as well as updates.
If tags are entered that MS access does not support, then this displays as raw html in MS Access application which I must avoid, as these fields can be used to generate content that is exposed to customers ( invoices etc)
Hope that makes sense.