Jump to:

520 Posts in 248 Topics by 263 members

Content Editor Discussions

SilverStripe Forums » Content Editor Discussions » Insert Link problems

Forum for content editors and CMS users.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 406 Views
  • novalix
    Avatar
    Community Member
    2 Posts

    Insert Link problems Link to this post

    Hi there,

    i really don't know if this is a real problem, or maybe it's just me.

    The "Insert Link"-Button in the HTML-Editor doesn't work as expected in all Versions of SS3 i maintain (latest is 3.1.3).
    Seems like it is rendered "disabled" due to some test case in "framework/thirdparty/tinymce_ssbuttons/editor_plugin_src.js" line 56-59:

    ed.onNodeChange.add(function(ed, cm, n, co) {
    cm.setDisabled('sslink', co && n.nodeName != 'A');
    cm.setActive('sslink', n.nodeName == 'A' && !n.name);
    });


    When i disable this code everything works as expected. I.e. i can insert links in the editor.
    Since i am by no account a JS expert, let alone this editor thingie, i can only vaguely guess how the nodeName 'A' is created, passed and so on.
    One can find (almost) the same code in the "official" advlink-plugin in the TinyMCE plugin directory.

    Since this would be such an obvious bug it is well possible that this is some kind of pebcak.

    Has anyone expirienced similar problems?

    Groetjes, niels

  • novalix
    Avatar
    Community Member
    2 Posts

    Re: Insert Link problems Link to this post

    Nobody?

    I fiddled around this problem in the last few days and it still persists.
    When I create a link in plain ol' HTML and point the cursor in the editor over it, the "Insert Link"-Button get 's rendered "mceButtonEnabled".
    When I leave the link area the button get 's rendered "mceButtonDisabled" again.
    That would be a perfectly sane behaviour for the unlink button.
    As far as i can see the sslink code is all about the insert link function so the above mentioned code would be at least superflous.

    It still bugs me that no one seems to experience a similar behaviour or could at least tell me: "No, everything works fine. Go check your head."

    Groetjes, niels

    Update:
    After doing something i usually avoid to do, i.e. reading the documentation, i 've found out that the user is expected to mark the text segment he wants to turn into a link text.
    I will have to contemplate a while about this technique to decide if it is extremely witty or just plain stupid.

    406 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.