It seems that adding an via "Insert Symbol" is not working.
We can reproduce this issue on the demo trial: I have downloaded the demo trial as a standalone-application, added the non-breaking space into toolsFile.xm and checked the behavior.
Please see this screencast for more details: https://www.screencast.com/t/J9aB5KdLr
We tried to create a custom ContentFilter that will replace the all zero width space characters to non-breaking space in the content. But that seems not to work as we don't have those zwsp charachters in the content withing the ContentFilter. Tried soluiton based on this post:https://www.telerik.com/forums/zwsp-inserted-into-html-in-chrome
Anyone had this issue before and found a solution?
5 Answers, 1 is accepted
Hi,
Can you define the white space like this and test again:
<symbols>
<symbol value="\u0020;" />
</symbols>
Regards,
Rumen
Progress Telerik
Hi,
This works indeed, a space is added. But the point is that we explicitily need the "non-breaking-space" charachter.
It is used to avoid a split between e.g. a value and a unit: 20 kg. So in HTML we would like to have "20 kg" instead of a normal space "20 kg". As this last one can cause a split to a new line between "20" and "kg". So the "\u0020;" charachter doesn't help in this case.
Regards
Tony
Hi Tony,
Thank you for the extra details!
The solution to keep the when inserting the <symbol value=" " /> symbol is to override the following function:
<script>
Telerik.Web.UI.Editor.NodesTracker.prototype.pasteDomHandler = function (editor, args) {
}
</script>
<telerik:RadEditor id="RadEditor1" runat="server" ... />
Regards,
Rumen
Progress Telerik
Hi Rumen,
Thanks for pointing us in the good direction. We were able to fix the issue by commenting the call to convertSingleNbspToTrackedZws().
Telerik.Web.UI.Editor.NodesTracker.prototype.pasteDomHandler = function (editor, args) {
var m =
this
;
//m.convertSingleNbspToTrackedZwsp(args.get_element());
var i = args.get_cursor(), l = i.previousSibling, k = i.nextSibling;
if
(m.isZeroWidthNode(l)) {
a(l).remove();
}
if
(m.isZeroWidthNode(k)) {
a(k).remove();
}
}
Regards
Tony
You are welcome, Tony!
Keep up the good work!
Regards,
Rumen
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.