Commit bebae1e6 authored by Akikonata's avatar Akikonata

fixed highlight

parent 7e847348
......@@ -17,7 +17,7 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
utils.each( KityMinder.getAllRegisteredProtocals(), function ( k ) {
var p = KityMinder.findProtocal( k );
if( p.encode ){
if ( p.encode ) {
var text = p.fileDescription + '(' + p.fileExtension + ')';
options.value.push( k );
options.items.push( text );
......@@ -41,8 +41,9 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
var data = me.exportData( res.value );
var p = KityMinder.findProtocal( res.value );
var filename = me.getMinderTitle() + p.fileExtension;
if ( p.fileExtension === '' ) {
if ( typeof ( data ) == 'string' ) {
} else if ( typeof ( data ) == 'string' ) {
var url = 'data:text/plain; utf-8,' + encodeURI( data );
doDownload( url, filename );
} else if ( data && data.then ) {
......
......@@ -143,8 +143,8 @@ KityMinder.registerModule( "KeyboardModule", function () {
break;
case keys.Backspace:
case keys.Del:
this.execCommand( 'removenode' );
e.preventDefault();
if ( this.queryCommandState( 'removenode' ) !== -1 ) this.execCommand( 'removenode' );
break;
case keys.Left:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment