Skip to content

Instantly share code, notes, and snippets.

@garryyao
Created October 12, 2011 08:13
Show Gist options
  • Save garryyao/1280590 to your computer and use it in GitHub Desktop.
Save garryyao/1280590 to your computer and use it in GitHub Desktop.
Insert link in editor.
// Insert link (apply link style) to selected html in editor.
var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why.
style.apply( editor.document );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment