I want to allow users to copy and past text from MS word. But I also need to limit how many words they can put it.
I am doing word count using
editor.Text.WordCount(); where word count is an extension method I wrote.
I am using Text insted of Content because I dont want to count all the fomatting in word count limit. And it is working fine on IE but not with firefox because firefox is adding all the word formatting in Text property. Below is what I was getting in text property. How can I make sure that all the text from word gets pasted without loosing any formatting and still be able to force a word count?
As you can see, i only entered "This is some test text that I m going to use to test rad text editor." in the textbox and when I submitted the form, this is what I got. Also I get this only when my app on the main server. If I test it using localhost, it works fine with firefox. Any ideas?
I tried to use StripFormattingOptions="MSWord"
but then I loose the formatting.
Thanks,
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} This is some test text that I m going to use to test rad text editor.
I am doing word count using
editor.Text.WordCount(); where word count is an extension method I wrote.
I am using Text insted of Content because I dont want to count all the fomatting in word count limit. And it is working fine on IE but not with firefox because firefox is adding all the word formatting in Text property. Below is what I was getting in text property. How can I make sure that all the text from word gets pasted without loosing any formatting and still be able to force a word count?
As you can see, i only entered "This is some test text that I m going to use to test rad text editor." in the textbox and when I submitted the form, this is what I got. Also I get this only when my app on the main server. If I test it using localhost, it works fine with firefox. Any ideas?
I tried to use StripFormattingOptions="MSWord"
but then I loose the formatting.
Thanks,
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} This is some test text that I m going to use to test rad text editor.
