document.execCommand not clearing all the styles when used with "removeFormat"

Not reproducible Issue #14139029


Karuppiah S.
Oct 9, 2017
This issue is public.
Found in
  • Internet Explorer
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

When we invoke the ocument.execCommand(aCommandName, aShowDefaultUI, aValueArgument) with the following values

aCommandName -> “removeformat”
aShowDefaultUI -> null
aValueArgument -> undefined

it is not clearing all the styles within the dom content. The same is working fine in all other browsers.


1 attachment

Comments and activity

  • how do we find out when this bug will be fixed?

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi,

    Can you provide a simplified repro for this or an online test case that you are aware of such as a w3c platform test?

    Appreciate the help with this,


  • Please use the attached file demo_text.txt which has the formatted html content. You can try invoking the above mentioned APIs and found that the expected styles are not getting cleared.

    Please let me know in case you need more information.

    Karuppiah S.

  • I believe this content would go inside of a ‘"contenteditable="true"’ section of an HTML page?

    Also, I believe ‘font face =""’ is deprecated.  Can you try the same with font-face/font-family?

  • Hi Steven,

    It is already part of the editable comtent (iframe body). ZFor example I have mentioned those commands. But none of the style commands are working. Please take a look.

  • Hi Team,
    Any update on this issue please?

    Karuppiah S.

  • Hi,

    The format commands work on selections.  Does your code select the content before running the “removeFormat”
    execCommand()?  E.g. you could load the page and then have your javascript selectAll and then call the removeFormat command.

    You can copy and paste the example Rich-Text editor from the following URL to test most of the format commands.

    The removeFormat command is working 16299.192.


  • Hi Steve,

    Thanks for looking into this issue. Yes we do make the complete formatted text selected and then fire these execCommand() method to clear the formatting.

    I will look at the given sample and will check if we see any difference in our framework.

    Karuppiah S.

  • and also i hope you are meaning IE11 browser and not Edge?
    Because whatever issues we ahve reported is in Windows 7 - IE11 browser. Please confirm that too.

    Karuppiah S.

  • I apologize.  I should have first requested what versions of Windows 10 you are seeing this issue in.  We are not presently working on feature bugs in Internet Explorer outside of security-related issues.  This site is primarily for Edge and Edge insider bug reports.

    We welcome any feedback you have on Microsoft Edge. This item will be closed as "won’t fix", in the meantime, you can visit and open a support incident and work with our support team to address this IE issue.



  • Microsoft Edge Team

    Changed Status to “Not reproducible”

You need to sign in to your Microsoft account to add a comment.

Sign in