diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2020-03-20 15:40:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-20 15:40:58 +0800 |
| commit | 7cbfae79ed539d14d7b1cb1572bb0d0648454ee0 (patch) | |
| tree | faf20f63e3c9de95d69745bc32485a2f062432a5 /assets/js/editor.js | |
| parent | fc9e0641c84239fd9f2cccbf3cc35ec029adef2e (diff) | |
🎊 Add: 通过 js 添加 owo 按钮
Diffstat (limited to 'assets/js/editor.js')
| -rw-r--r-- | assets/js/editor.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/assets/js/editor.js b/assets/js/editor.js new file mode 100644 index 0000000..c9c59f1 --- /dev/null +++ b/assets/js/editor.js @@ -0,0 +1,14 @@ +$(function() {
+ if($('#wmd-button-row').length>0){
+ $('#wmd-button-row').append('<li class="wmd-spacer wmd-spacer1"></li><li class="wmd-button" id="wmd-owo-button" style="" title="插入表情"><span class="OwO"></span></li>');
+ var owo = new OwO({
+ logo: 'OωO',
+ container: document.getElementsByClassName('OwO')[0],
+ target: document.getElementById('text'),
+ api: '/usr/themes/Miracles/assets/OwO.json',
+ position: 'down',
+ width: '400px',
+ maxHeight: '250px'
+ });
+ }
+});
\ No newline at end of file |
