I'm using Telerik.UI.for.Blazor 3.0.0 and pasting the following HTML does not lead to the expected result.
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
Result (Preview):
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
Result (Raw view):
<p><ul></p><p><li>A</li></p><p><li>B</li></p><p><li>C</li></p><p></ul></p>
Expected Result:
- A
- B
- C
Using Telerik UI for jQuery it was sufficient to set the following setting to get the expected result.
$scope.kendoEditorOptions = { pasteCleanup: { keepNewLines: true, // Removes all HTML elements, such as the all option, but preserves new lines. Disabled by default. } }
I've tried out all different settings that the Blazor version offers using the demo from https://demos.telerik.com/blazor-ui/editor/paste-cleanup?_ga=2.205591514.897269513.1644322509-2087119569.1643891453, but without success.
For a workaround I've implemented the ValueChanged EventCallback to convert from
<p><ul></p>
to
<ul>
on-the-fly, but since each line of the pasted content is wrapped around with with <p>...</p> this is not optimal.
Is there a way to achieve the expected result? It would already help if the automatic wrapping with <p>...</p> tags could be turned off. Otherwise I'm leaning towards switching back to the jQuery version.
Thanks and BR!