Skip to content

Instantly share code, notes, and snippets.

@hackerwins
Created July 1, 2014 12:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackerwins/c7770ecf11957bd9c2e3 to your computer and use it in GitHub Desktop.
Save hackerwins/c7770ecf11957bd9c2e3 to your computer and use it in GitHub Desktop.
summernote `onCreateLink` options.
$('.summernote').summernote({
/**
* manipulate link address when user create link
* @param {String} url
* @return {String}
*/
onCreateLink: function (url) {
if (url.indexOf('http://') !== 0) {
url = 'http://' + url;
}
return url;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment