Custom Button & Style Sheet issue

  •  02-23-2005, 5:08 PM

    Custom Button & Style Sheet issue

    I have created another custom button to surround the selected text with an HTML tag "<Blockquote class=pull></Blockquote>".

    I am having 2 issues:
    1) Issue 1
        a) If the user selects the text "This is paragraph 2 text." and the user selected the the text from left to right (Started
            highlighting the text at THIS and finished at TEXT), it will surround this text with the Blockquote tags. THIS IS CORRECT
        b) If the user selects the text "This is paragraph 2 text." and the user selected the the text from right to left (Started
            highlighting the text at TEXT and finished at THIS), it will surround the 3rd paragraph ("This is paragraph 3 text") with
            the Blockquote tags. THIS IS INCORRECT
    2) Issue 2
        If I add code to my style sheet to handle styling for the class "pull", the code for the custom button no longer functions
        the same. Say the user selects the 2nd paragraph ("This is paragraph 2 text") and then clicks on the custom button,
        I get <blockquote class=pull></blockquote> and then the 2nd paragraph code.
        Once I remove the sheet sheet code for pull, the custom button starts working as expected.
     
    I am using Cute Editor 3.0.
     
    I am attaching my sample code:
View Complete Thread