FreeMind export was integrated into the wisemapping editor

This commit is contained in:
Ezequiel-Vega 2022-02-23 16:26:34 -03:00
parent 5bebf75a32
commit 796dae1006
4 changed files with 4 additions and 164 deletions

View File

@ -36,14 +36,6 @@ class FreemindExporter extends Exporter {
this.mindmap = mindmap; this.mindmap = mindmap;
} }
exportAndEncode(): Promise<string> {
throw new Error('Method not implemented.');
}
getContentType(): string {
throw new Error('Method not implemented.');
}
static { static {
this.wisweToFreeFontSize.set(6, 10); this.wisweToFreeFontSize.set(6, 10);
this.wisweToFreeFontSize.set(8, 12); this.wisweToFreeFontSize.set(8, 12);
@ -55,7 +47,7 @@ class FreemindExporter extends Exporter {
const parser = new DOMParser(); const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlStr, mimeType); const xmlDoc = parser.parseFromString(xmlStr, mimeType);
// FIXME: Fix error "unclosed tag: p" when exporting bug2 and enc // FIXME: Fix error "unclosed tag: p" when exporting bug3 and enc
// Is there any parsing error ?. // Is there any parsing error ?.
/* /*
if (xmlDoc.getElementsByTagName('parsererror').length > 0) { if (xmlDoc.getElementsByTagName('parsererror').length > 0) {

View File

@ -1,150 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name='Parameters'>
<xs:complexType>
<!--Is the time management plugin.-->
<xs:attribute name='REMINDUSERAT' type='xs:integer' use='optional'/>
</xs:complexType>
</xs:element>
<!--Used for node notes.-->
<xs:element name='text' type="xs:string"/>
<xs:element name='arrowlink'>
<xs:complexType>
<xs:attribute name='COLOR' type='xs:string' use='optional'/>
<xs:attribute name='DESTINATION' type='xs:string' use='required'/>
<xs:attribute name='ENDARROW' type='xs:string' use='optional'/>
<xs:attribute name='ENDINCLINATION' type='xs:string' use='optional'/>
<xs:attribute name='ID' type='xs:string' use='optional'/>
<xs:attribute name='STARTARROW' type='xs:string' use='optional'/>
<xs:attribute name='STARTINCLINATION' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>
<xs:element name='cloud'>
<xs:complexType>
<xs:attribute name='COLOR' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>
<xs:element name='edge'>
<xs:complexType>
<xs:attribute name='COLOR' type='xs:string' use='optional'/>
<xs:attribute name='STYLE' type='xs:string' use='optional'/>
<xs:attribute name='WIDTH' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>
<xs:element name='font'>
<xs:complexType>
<xs:attribute name='BOLD' use='optional'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='true'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name='ITALIC' use='optional'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='true'/>
<xs:enumeration value='false'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name='NAME' type='xs:string' use='required'/>
<xs:attribute name='SIZE' use='required' type='xs:integer'/>
</xs:complexType>
</xs:element>
<xs:element name='hook'>
<xs:complexType>
<xs:sequence>
<xs:element ref='Parameters' minOccurs='0' maxOccurs='1'/>
<xs:element ref='text' minOccurs='0' maxOccurs='1'/>
</xs:sequence>
<xs:attribute name='NAME' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
<xs:element name='icon'>
<xs:complexType>
<xs:attribute name='BUILTIN' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
<xs:element name='richcontent'>
<xs:complexType>
<!-- And contains XHTML as unique child:-->
<xs:sequence>
<xs:element name='html' minOccurs='1' maxOccurs='1' type="xs:anyType"/>
</xs:sequence>
<!--Currently, only NODE or NOTE is allowed.-->
<xs:attribute name='TYPE' use='required'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='NODE'/>
<xs:enumeration value='NOTE'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name='map'>
<xs:complexType>
<xs:sequence>
<xs:element ref='node'/>
</xs:sequence>
<xs:attribute name='version' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
<xs:element name='node'>
<xs:complexType>
<xs:choice minOccurs='0' maxOccurs='unbounded'>
<xs:element ref='arrowlink'/>
<xs:element ref='cloud'/>
<xs:element ref='edge'/>
<xs:element ref='font'/>
<xs:element ref='hook'/>
<xs:element ref='icon'/>
<xs:element ref='node'/>
<!-- For nodes with extended formatting content or for notes to nodes. -->
<xs:element ref='richcontent'/>
</xs:choice>
<xs:attribute name='BACKGROUND_COLOR' type='xs:string' use='optional'/>
<xs:attribute name='COLOR' type='xs:string' use='optional'/>
<xs:attribute name='FOLDED' use='optional'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='true'/>
<xs:enumeration value='false'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name='ID' type='xs:ID' use='optional'/>
<xs:attribute name='LINK' type='xs:string' use='optional'/>
<xs:attribute name='POSITION' use='optional'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='left'/>
<xs:enumeration value='right'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name='STYLE' type='xs:string' use='optional'/>
<xs:attribute name='TEXT' type='xs:string' use='required'/>
<xs:attribute name='CREATED' type='xs:integer' use='optional'/>
<xs:attribute name='MODIFIED' type='xs:integer' use='optional'/>
<xs:attribute name='HGAP' type='xs:integer' use='optional'/>
<xs:attribute name='VGAP' type='xs:integer' use='optional'/>
<xs:attribute name='WCOORDS' type='xs:string' use='optional'/>
<xs:attribute name='WORDER' type='xs:integer' use='optional'/>
<xs:attribute name='VSHIFT' type='xs:integer' use='optional'/>
<xs:attribute name='ENCRYPTED_CONTENT' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -1,3 +0,0 @@
import { generateTemplateClassesFromXSD } from 'xsd2ts';
generateTemplateClassesFromXSD('./freemind_0.9.0');

View File

@ -109,6 +109,7 @@ const ExportDialog = ({
break; break;
} }
case 'wxml': case 'wxml':
case 'mm':
case 'md': case 'md':
case 'txt': { case 'txt': {
exporter = TextExporterFactory.create(formatType, mindmap); exporter = TextExporterFactory.create(formatType, mindmap);
@ -264,9 +265,9 @@ const ExportDialog = ({
<MenuItem className={classes.select} value="wxml"> <MenuItem className={classes.select} value="wxml">
WiseMapping (WXML) WiseMapping (WXML)
</MenuItem> </MenuItem>
{/* <MenuItem className={classes.select} value="mm"> <MenuItem className={classes.select} value="mm">
Freemind 1.0.1 (MM) Freemind 1.0.1 (MM)
</MenuItem> */} </MenuItem>
{/* <MenuItem className={classes.select} value="mmap"> {/* <MenuItem className={classes.select} value="mmap">
MindManager (MMAP) MindManager (MMAP)
</MenuItem> */} </MenuItem> */}