Completed
Last Updated: 17 Dec 2014 14:45 by ADMIN
ADMIN
Ianko
Created on: 28 Oct 2014 09:01
Category: Editor
Type: Bug Report
0
MS Word List items are pasted without text when they contain one word followed by a full stop
Commonly, plain words are listed in a an MS Word document and full stops are added. Pasting such a list in the editor will cause them to appear with upper-alpha type list and no text in the list item.

The following code snippet further modifies the convert() method of the ConvertWordLists logic to encode and decode such full stops. You can use it as  a temporary workaround to resolve this issue.
<telerik:RadEditor runat="server" ID="RadEditor1"></telerik:RadEditor>

<script type="text/javascript">
	var originalConvert = Telerik.Web.UI.Editor.WordListConverter.prototype.convert;

	Telerik.Web.UI.Editor.WordListConverter.prototype.convert = function (htmlText) {
		// Encode the full stops only if they are after words with 2 or more characters.
		htmlText = htmlText.replace(/(\w{2,})[.]/gim, "$1_TELERIK_DOT_");
		htmlText = originalConvert.call(this, htmlText);
		// Decode the full stops.
		htmlText = htmlText.replace(/_TELERIK_DOT_/gm, ".");

		return htmlText;
	}
</script>

Make sure that this script block is placed right after the RadEditor declaration, so that the WordListConverter is properly created.

0 comments