Hyperlink bug in editor.

  • Hi,

    I have noticed a bug in the editor when specifying hyperlinks. If you enter a hyperlink into the editor, then highlight that text and remove, anything else entered into the editor after that is assumed to be a hyperlink.

    If you highlight the text via Ctrl+A and delete, it successfully removes the hyperlink.

    Is there a fix for this?

  • I don't think this is very good from a usability perspective. When the user removes the text from the editor, they are left with a very small cursor (possbily a different issue?). Pressing backspace again removes the <a> tags completely and restores the cursor to its normal size.

    However, the issue here is how is a user supposed to understand that they need to press the backspace twice? When they remove the text of the hyperlink it appears to them that it has been successfully removed. We use the editor as a notes editor (similar to MS Word) I notice that they do not have this same issue.

    Personally I see this as a bug in the editor....

    • Offizieller Beitrag

    Hi,

    This is the descisioon - do you want to have control characters in the text or not. In Word there are often cases where something is in the text which intorduce a change or not.

    The hyperlink markers can be made visible as well, I prefer that. Then it is clear, if just the text or also the markers are displayed. (FormatOptions)

    Regards,
    Julian

  • Maybe you could catch VK_DELETE and VK_BACKSPACE in the on keyup event, and have them delete the hyperlink.

    I thought DeleteHyperlink(true) would work to do this, but it turns out that it doesn't actually delete the end tag, so you need something like this:

  • Hi mattatmilsoft,

    Thanks for the advice. I implemented a solution similar to what you suggested and it seemed to work fine. Luckily in my particular situation I was able to use the DeleteHyperlink method :)

    Here is my code (delphi):