mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
Fix bug of missing error encode.
This commit is contained in:
parent
ab4eddf1c2
commit
5821a776df
@ -58,7 +58,10 @@ class MDExporter implements Exporter {
|
|||||||
}
|
}
|
||||||
result += '\n';
|
result += '\n';
|
||||||
|
|
||||||
return Promise.resolve(result);
|
// Encode as url response ...
|
||||||
|
const blob = new Blob([result], { type: 'text/markdown' });
|
||||||
|
const urlStr = URL.createObjectURL(blob);
|
||||||
|
return Promise.resolve(urlStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
private traverseBranch(prefix: string, branches: Array<INodeModel>) {
|
private traverseBranch(prefix: string, branches: Array<INodeModel>) {
|
||||||
|
@ -35,8 +35,12 @@ class TxtExporter implements Exporter {
|
|||||||
const { mindmap } = this;
|
const { mindmap } = this;
|
||||||
|
|
||||||
const branches = mindmap.getBranches();
|
const branches = mindmap.getBranches();
|
||||||
const retult = this.traverseBranch('', branches);
|
const txtStr = this.traverseBranch('', branches);
|
||||||
return Promise.resolve(retult);
|
|
||||||
|
// Encode as url response ...
|
||||||
|
const blob = new Blob([txtStr], { type: 'text/pain' });
|
||||||
|
const result = URL.createObjectURL(blob);
|
||||||
|
return Promise.resolve(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private traverseBranch(prefix: string, branches: INodeModel[]) {
|
private traverseBranch(prefix: string, branches: INodeModel[]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user