Hi
We recently upgraded infragistics control library in to version 12.1 In one of our web applications, . We faced lot of issues and conflicts while doing that since there are major architectural changes. With lots of hard work, we could sort out most of the issues we had.
However we are currently facing a new problem with Web HTML Editor control. If you type more than one space and get the TextHTML of the control (from the code behind), there are "ᙦ" for the additional spaces. (if you type two spaces there will be one "ᙦ" sign). this happens in All the browsers.
I'm wondering whether this is a bug in the new control. I tried this with a sample application too and the result was same. Has anybody else have came across similar problem? Is there a workaround for this?
Any help is very much appreciated,
Wijitha
Hi Wijitha,
Thank you for a report.
That case was missed while internal testing and it was not reported. It has been fixed and update will be available within service releases.
For now you may fix that by following:
string xhtml = this.WebHtmlEditor1.TextXhtml.Replace("ᙦ", " ");
Hi Viktor,
Thanks for your solution. It exactly solved the problem. But looking forward for a proper fix in the service releases.
I have one more problem that needed your attention. When we copy-paste content (that has multiple paragraphs) from MS word documents to the webHTMLEditor, "TexttHTML" property returns only the first paragraph of the content. So we cant save the whole content, just the first paragraph. This happens only in IE. This issues is not there in the other browsers (Chrome, FF, Safari).
Thanks,
That is possible. Problem is that when a text copied from Word is pasted into WebHtmlEditor (DIV in design mode), then IE browser may insert various obscure objects and attributes. To get around that feature of IE, the WebHtmlEditor has a special option (toolbutton with "W" and tooltip Clean Word Formatting), which is designed to get around that. However, after "paste", the end user should press that button explicitly, because WebHtmlEditor is not aware about possible paste action (especially from Word). Also, maybe application needs exact content pasted from Word.
So, there are few ways to get around.
1. If application does postback by a submit button, then the OnClientClick can be processed with following implementation:
<script type="text/javascript"> function mySubmit() {" var editor = iged_getById('WebHtmlEditor1'); editor.setText(editor._cleanWord(editor.getText())); } </script><asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="mySubmit()" />
2. Application may process ClientSideEvents.AfterAction (with check for "Paste") and attach keyDown event to editing element (with catching Ctrl+V) and use same _cleanWord method. I can provide implementation for that, but it will take few dozen lines of javascript codes.
3. Try to clean-up text on server. In current functionality of IE+Word, the main reason for failure is presence of objects like "<?xml:namespace ..." in the middle of text, so application may check for that Word-junk and remove it. Below is example.Note: It is possible that some other IE+Word tags/strings can lead to problems. To find them, an application may analyze content of WebHtmlEditor.Text.
string fixedText = null;string text = this.WebHtmlEditor1.Text;int wordStart = text.IndexOf("<?xml:namespace");int wordEnd = (wordStart >= 0) ? text.IndexOf("/>", wordStart) : -1;if (wordEnd > 0){ fixedText = text.Remove(wordStart, wordEnd - wordStart + 2); this.WebHtmlEditor1.Text = fixedText;}string xhtml = this.WebHtmlEditor1.TextXhtml;//if (fixedText != null) this.WebHtmlEditor1.Text = text;
Hello Wijitha,
If you have any further questions regarding the matter, please feel free to contact us.
HI Nikolay,
We could fix the issues we had using the workarounds given by you guys. Really appreciate the quick and accurate responses. Thanks for that.
At the moment, we dont have any other impediments. If any, we will get back to you.