Created
May 6, 2013 03:26
-
-
Save nclsjstnn/5523211 to your computer and use it in GitHub Desktop.
Insert a new button to a form created with the gem "bootstrap-wysihtml5-rails" and manipulate it with bootbox.js
https://github.com/jhollingworth/bootstrap-wysihtml5
http://bootboxjs.com
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
<script type="text/javascript"> | |
$('#post_content').each(function(i, elem) { | |
$(elem).wysihtml5(); | |
$(".wysihtml5-toolbar").append('<li id="target"><a class="btn" title="Insert gallery" tabindex="-1" href="javascript:;" unselectable="on"><i class="icon-th-large"></i></a></li>'); | |
$("#target").click(function() { | |
bootbox.alert("Hello world!"); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment