I want to add a dropdown to the linkit form when triggered from the WYGIWYG editor button that will add a query string on to the inserted link.

For example the dropdown could be test1 and test2 and I want to inserted URL to be:

www.example.com?query=test1
www.examples.com?query=test2

How can I achieve this?

Comments

anon’s picture

You can add a attribute plugin and then make some JS haxx to achieve that I guess.

bjalford’s picture

Thanks. I've added a custom attribute plugin which shows my new field in the CKEditor popup. Where's the place to look to alter the href in the js?

bjalford’s picture

I want to use for custom case but I think a general case that could be useful to this module is the ability to add no-follow to a link. Happy to implement this as a patch if I can have a little direction on the above

anon’s picture

Status: Active » Closed (fixed)

The "no-follow" is in another issue.

bjalford’s picture

For reference the ticket is: https://drupal.org/node/2134405