Editor pastes html tag attributes in wrong order

  •  03-14-2007, 3:42 PM

    Editor pastes html tag attributes in wrong order

    Hi,
    First problem

    I have gotten the editor to insert html tags however if i insert a tag like this one

    <mytag value="cmd" class="dataelement">loan amount</mytag>

    the inserted tag looks like this in HTML view

    <mytag class="dataelement" value="cmd">loan amount</mytag>

    the function I use is

    _format(editor1,'pasteHTML',htmltag)

    is there a way to fix this so that the tag gets inserted exactly the way it is specified and the attributes not switch places.

    second problem

    here is the example of the problem

    I insert a tag like this by pressing a button

    <mytag> loan amount </mytag>

    after the tag is inserted, if I start writting a in the editor, the rest of my writting will be inserted in the tag and not after ward
    for example

    if i write

    "after my tag" in the editor

    my html view looks like
    <mytag> loan amount after my tag</mytag>
    instead of
    <mytag> loan amount </mytag> after my tag


    can anyone help me ?


View Complete Thread