Typps - some reported bugs are still present


In May 2010 I reported some bugs, which are still present in the on-line demo of the new 2.2 version.
1 Ms Word Cleanup: does nothing
2 Selected text unselects when you click a button on the toolbar
3 Function off the increase/decrease indent buttons are permuted
Closed Sep 1, 2010 at 8:34 PM by Ale55andro


Ale55andro wrote Aug 25, 2010 at 2:58 PM

hi hubert, thanks for reporting. Yes, I remember your bug reports and I have addressed all of them.

hello: indent and outdent work properly now. Indent, indents the selected text by inserting a BLOCKQUOTE element around the selected text and any surrounding text that belongs to the same parent element. Outdent undoes what indent did.

I am also not seeing any selection loss, cross browser. Infact in this release i have practically redone those areas and in addition to selection being maintained, the toolbar buttons are also aware of the documents current mode( eg, if bolding is applied or italic, if whether a table element is the active element in the document etc)

Are you able to reproduce what you are seeing using the online demo and describe the wrong behaviour as in what is the output you received and what is the output you were expecting, and what you did to produce the non working behavior so i can repo it on my end.

The ms word cleaner is also working fine. Infact unlike the previous version, this version will maintain minimum formatting if it's valid css. For example, ms word documents when copied and paste will include a lot of custom xml elements, namespaces, css defined in style tags, image replacements for vml embedded in vml conditional tags and so forth. Not everything is useless ofcourse, and the parser will try to preserve as much of the formatting as possible by replacing only* ms specific markup while keeping what is valid html and css or substituting it with valid html/css alternatives.

If you want, you can test by trying this basic html editor : http://www.mozilla.org/editor/midasdemo/

Copy and paste from ms word in that editor above and view the markup. Then copy and paste the same in Typps : http://demo.typps.com/Editor/default.aspx

Now note the differences and let me know if you find ms specific markup that should have been removed instead. I'll take it as a bug report and fix it this week itself ( next sprint is on the 28 ). I'm making weekly iterations now.

Ale55andro wrote Aug 25, 2010 at 3:11 PM

ahhh, upon more testing, IE seems to have a small bug. ms-word cleanup seems to preserve MsoSpecific classname after having substituted the inline css alternative available in the document for this. Also I see empty style attributes are maintained. Is this the same problem your seeing ? It's happening only in IE apparently. I'll be fixing it for this iteration. If there's something else let me know.

Hubertj wrote Aug 25, 2010 at 9:10 PM

Hi Alessandro. I tested again on the demo site with IE8 on W7.

1 Ms Word Cleanup. When I paste directly from Word 2010, I get the following html:
<p style="MARGIN: 0cm 0cm 0pt 18pt; tab-stops: 210.6pt 282.6pt" class="MsoNormal"> <span style="font-family:arial;"> <b style=""> <span lang="FR">Concerne :</span> </b> <span lang="FR"> Réponse à votre lettre recommandée datée du 19-12-2005</span> </span> </p>
  <p style="MARGIN: 0cm 0cm 0pt 18pt; tab-stops: 210.6pt 282.6pt" class="MsoNormal">
    <span lang="FR">
      <br />
      <br />
      <span style="font-family:arial;">Messieurs,<br style="" /><br style="" /></span>
    <span style="FONT-FAMILY: 'Arial', 'sans-serif'; FONT-SIZE: 11pt;" lang="FR">
      <br />Sur la Convention d’affiliation </span>
    <br />
  <br />
When I paste using the Word Cleanup button, I get the following:
    <p style="MARGIN: 0cm 0cm 0pt 18pt; tab-stops: 210.6pt 282.6pt" class="MsoNormal">
      <span style="FONT-FAMILY: arial">
          <span lang="FR">Concerne :</span>
        <span lang="FR">Réponse à votre lettre recommandée datée du 19-12-2005</span>
    <p style="MARGIN: 0cm 0cm 0pt 18pt; tab-stops: 210.6pt 282.6pt" class="MsoNormal">
      <span lang="FR">
        <br />
        <br />
        <span style="FONT-FAMILY: arial">Messieurs,<br /><br /></span>
    <span style="FONT-FAMILY: 'Arial', 'sans-serif'; FONT-SIZE: 11pt" lang="FR">
      <br />Sur la Convention d’affiliation </span>
There is not a great difference! OK empty styles are removed, but couldn't class="MsoNormal" and <span lang="FR"> also be removed ?
May be lang=”FR” wouldn’t appear if the Culture setting of the demo page were fr ?

2 Selected text unselects: happens only with [font size], [highlight color] and [font color] buttons, other buttons are OK.

3 increase/decrease indent: I checked it again, the decrease button increases the indent and vice-versa !

Congratulations and many thanks.

Hubertj wrote Aug 25, 2010 at 9:33 PM

indent button: perhaps are the tooltips permuted ?

Ale55andro wrote Aug 25, 2010 at 10:39 PM

ahh I see. Well, by default when switching from DesignView to HtmlView, the html is already cleaned up. This is why you don't see any difference between using msword cleanup option available in the editor and what you see when directly switch from DesignView to HtmlView. I'm actually writing a lengthy documentation on the editor, I hope it's ready by next week.

So basically, to see the differences, you must disable automatic cleanup first. This can be done via AutoCleanupMsWordMarkup property. Default is true. That's why you see identical output. Actually any minor copy paste operation from msword will produce an unimaginable set of inline xml namespace declarations, xml elements, ms-word specifc css and so forth. Right now your looking at the cleaned up version. Perhaps I should disable it in the demo. I will do this later tomorrow. I apologize for the confusion :)

Anyhow, the markup you pasted has some bugs eg : class="MsoNormal" shouldn't be there and style="" should also have been stripped and I current notice it happens only in IE. These fixes will be ready with the release on Saturday. The rest of the markup is valid markup and it's useful to maintain some default formatting from your ms word document. In previous editions, if I remember correctly, I was stripping out everything I believe.

About the indent/outdent, yes, you are right, i have labelled them wrongly and didn't even notice. Selections are lost in font size. I can confirm this. I couldn't repo highlight color and font color but I shall double check again.

Thanks for reporting. These bugs will be fixed in this iteration and you can download the new version on saturday.

wrote Sep 1, 2010 at 8:34 PM

wrote Feb 14, 2013 at 2:23 AM

wrote May 16, 2013 at 7:14 AM