Roundcube Community Forum

Release Support => Pending Issues => Topic started by: kiim11 on January 24, 2013, 02:46:06 AM

Title: URL in html editor
Post by: kiim11 on January 24, 2013, 02:46:06 AM
Is it possible to detect URL's(make them clickable) in html editor automaticly like in plain text editor, not using tags and URL button?

thx for answer
Title: Re: URL in html editor
Post by: Drakon on January 24, 2013, 09:13:02 AM
Hi kiim11.

I think that this is not possible.

You need to code a event with shortcut (CTRL+L for example) on TinyMCE as this:

tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onKeyUp.add(function(ed, e) {
          // check for [CRTL] + [L]
          if (e.keyCode == .....) {
            ed.execCommand('mceInsertLink');
      });
   }
});


Regards,
Title: Re: URL in html editor
Post by: alec on January 24, 2013, 09:25:20 AM
there's "autolink" plugin for TinyMCE, you need to enable it in program/js/editor.js file.
Title: Re: URL in html editor
Post by: Drakon on January 24, 2013, 10:07:50 AM
Thank you Alec.  ;)
Title: Re: URL in html editor
Post by: kiim11 on January 25, 2013, 04:37:39 AM
Thx a lot, it works)