Created
July 1, 2014 12:53
-
-
Save hackerwins/c7770ecf11957bd9c2e3 to your computer and use it in GitHub Desktop.
summernote `onCreateLink` options.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.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