File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
3- __VERSION__ = '1.1.3 '
3+ __VERSION__ = '1.1.4 '
44__AUTHOR__ = 'Agus Makmun (Summon Agus)'
55__AUTHOR_EMAIL__ = '[email protected] '
Original file line number Diff line number Diff line change 11/**
2- * Name : DracEditor v1.1.3
2+ * Name : DracEditor v1.1.4
33 * Created by : Agus Makmun (Summon Agus)
44 * Release date : 5-Jan-2017
55 * Official : https://dracos-linux.org
602602 // Custom decission for toolbar buttons.
603603 var btnMention = $ ( '.markdown-direct-mention' ) ; // To Direct Mention
604604 var btnUpload = $ ( '.markdown-image-upload' ) ; // To Upload Image
605- if ( dracConfig . mention === 'true' ) {
605+ if ( dracConfig . mention === 'true' && dracConfig . imgur === 'true' ) {
606606 btnMention . click ( function ( ) {
607607 markdownToMention ( ) ;
608608 } ) ;
609- } if ( dracConfig . imgur === 'true' ) {
610609 btnUpload . on ( 'change' , function ( evt ) {
611610 evt . preventDefault ( ) ;
612611 markdownToUploadImage ( ) ;
613612 } ) ;
614- } else {
613+ } else if ( dracConfig . mention === 'true' && dracConfig . imgur === 'false' ) {
614+ btnMention . click ( function ( ) {
615+ markdownToMention ( ) ;
616+ } ) ;
617+ btnUpload . remove ( ) ;
618+ } else if ( dracConfig . mention === 'false' && dracConfig . imgur === 'true' ) {
619+ btnMention . remove ( ) ;
620+ btnUpload . on ( 'change' , function ( evt ) {
621+ evt . preventDefault ( ) ;
622+ markdownToUploadImage ( ) ;
623+ } ) ;
624+ }
625+ else {
615626 btnMention . remove ( ) ;
616627 btnUpload . remove ( ) ;
617628 // Disable help of `mention`
You can’t perform that action at this time.
0 commit comments