apeblog/public/static/admin/js/summernote/plugin/hello/summernote-ext-hello.min.js

1 line
889 B
JavaScript

!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(window.jQuery)}(function(t){t.extend(t.summernote.plugins,{hello:function(e){var n=this,o=t.summernote.ui;e.memo("button.hello",function(){return o.button({contents:'<i class="fa fa-child"/> Hello',tooltip:"hello",click:function(){n.$panel.show(),n.$panel.hide(500),e.invoke("editor.insertText","hello")}}).render()}),this.events={"summernote.init":function(e,n){console.log("summernote initialized",e,n)},"summernote.keyup":function(e,n){console.log("summernote keyup",e,n)}},this.initialize=function(){this.$panel=t('<div class="hello-panel"/>').css({position:"absolute",width:100,height:100,left:"50%",top:"50%",background:"red"}).hide(),this.$panel.appendTo("body")},this.destroy=function(){this.$panel.remove(),this.$panel=null}}})});