Welcome Guest Search | Active Topics | Sign In | Register

Can I set this up to clear ms word formating in code behind Options
lorrainepetty
Posted: Tuesday, May 4, 2010 6:14:16 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2010
Posts: 4
Is there any way to set up my programme so that it automatically removes the ms word formating in the code when the form is submitted?
eo_support
Posted: Tuesday, May 4, 2010 8:40:53 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Yes. Please try the following code:

Code: HTML/ASPX
<form onsubmit="cleanup_editor()" ....>
    ....
    <eo:Editor id="Editor1" ....>
        ....
    </eo:Editor>
    ....
</form>


Code: JavaScript
function cleanup_editor()
{
    //Get the HTML Editor object
    var editor = eo_GetObject("Editor1");

    //Clean up Word format
    editor.execCommand("ClearWordFormat");
}


Thanks!
lorrainepetty
Posted: Wednesday, May 5, 2010 7:52:33 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2010
Posts: 4
Many thanks

Is this possible in vb.net. When I click on a button.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

code to clear word format here?????



End Sub

eo_support
Posted: Wednesday, May 5, 2010 8:31:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The code we provided should give you the same result. Just try it and you will see how it works.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.