Commit 8f05ba07 authored by Akikonata's avatar Akikonata

Merge branch 'dev' of github.com:fex-team/kityminder into dev

parents d482e4c7 1c9507bf
......@@ -41,6 +41,11 @@ KityMinder.registerProtocal( 'freemind', function () {
}
}
// 处理超链接
if(topic.LINK){
obj.data.hyperlink = topic.LINK;
}
//处理子节点
if( topic.node ){
......@@ -67,19 +72,19 @@ KityMinder.registerProtocal( 'freemind', function () {
return result;
}
return {
fileDescription: 'xmind格式文件',
fileExtension: '.xmind',
return {
fileDescription: 'xmind格式文件',
fileExtension: '.xmind',
decode: function ( local ) {
decode: function ( local ) {
var json = xml2km( local );
return json;
},
// recognize: recognize,
recognizePriority: -1
};
return json;
},
// recognize: recognize,
recognizePriority: -1
};
} );
......@@ -43,6 +43,11 @@ KityMinder.registerProtocal( 'mindmanager', function () {
}
}
// 处理超链接
if ( topic.Hyperlink ) {
obj.data.hyperlink = topic.Hyperlink.Url;
}
//处理子节点
if ( topic.SubTopics && topic.SubTopics.Topic ) {
......
......@@ -48,6 +48,11 @@ KityMinder.registerProtocal( 'xmind', function () {
}
}
// 处理超链接
if(topic['xlink:href']){
obj.data.hyperlink = topic['xlink:href'];
}
//处理子节点
if( topic.children && topic.children.topics && topic.children.topics.topic ){
var tmp = topic.children.topics.topic;
......@@ -81,33 +86,33 @@ KityMinder.registerProtocal( 'xmind', function () {
}, onerror);
}
return {
fileDescription: 'xmind格式文件',
fileExtension: '.xmind',
return {
fileDescription: 'xmind格式文件',
fileExtension: '.xmind',
decode: function ( local ) {
return {
then : function(local, callback){
getEntries( local, function( entries ) {
entries.forEach(function( entry ) {
if(entry.filename == 'content.xml'){
entry.getData(new zip.TextWriter(), function(text) {
var km = xml2km($.parseXML(text));
callback && callback( km );
});
}
});
});
}
};
},
// recognize: recognize,
recognizePriority: -1
};
decode: function ( local ) {
return {
then : function(local, callback){
getEntries( local, function( entries ) {
entries.forEach(function( entry ) {
if(entry.filename == 'content.xml'){
entry.getData(new zip.TextWriter(), function(text) {
var km = xml2km($.parseXML(text));
callback && callback( km );
});
}
});
});
}
};
},
// recognize: recognize,
recognizePriority: -1
};
} );
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