1
|
-{"version":3,"sources":["../../src/MarkdownEditor/index.js"],"names":["React","Showdown","icons","iconProvider","name","MarkdownEditor","props","handleValueChange","mdeState","setState","converter","Converter","tables","simplifiedAutoLink","defaultProps","layout","buttonContentOptions","generateMarkdownPreview","markdown","Promise","resolve","makeHtml","Component"],"mappings":";;;;;;;;;;AAAA;;IAAYA,K;;AACZ;;;;AACA;;IAAYC,Q;;AACZ;;AACA;;;;;;;;;;;;AAGA,IAAMC,QAAQ;AACV,UAAQ,oBAAC,iCAAD,IAAiB,MAAK,MAAtB,GADE;AAEV,aAAW,oBAAC,iCAAD,IAAiB,MAAK,SAAtB,GAFD;AAGV,YAAU,oBAAC,iCAAD,IAAiB,MAAK,QAAtB,GAHA;AAIV,mBAAiB,oBAAC,iCAAD,IAAiB,MAAK,eAAtB,GAJP;AAKV,UAAQ,oBAAC,iCAAD,IAAiB,MAAK,MAAtB,GALE;AAMV,iBAAe,oBAAC,iCAAD,IAAiB,MAAK,aAAtB,GANL;AAOV,UAAQ,oBAAC,iCAAD,IAAiB,MAAK,MAAtB,GAPE;AAQV,WAAS,oBAAC,iCAAD,IAAiB,MAAK,OAAtB,GARC;AASV,aAAW,oBAAC,iCAAD,IAAiB,MAAK,SAAtB,GATD;AAUV,aAAW,oBAAC,iCAAD,IAAiB,MAAK,SAAtB,GAVD;AAWV,WAAS,oBAAC,iCAAD,IAAiB,MAAK,OAAtB;AAXC,CAAd;;AAcE,IAAMC,eAAe,SAAfA,YAAe,CAACC,IAAD,EAAU;AAC7B,SAAOF,MAAME,IAAN,KAAe,GAAtB;AACD,CAFD;;IAKmBC,c;;;AAEjB,0BAAYC,KAAZ,EAAmB;AAAA;;AAAA,gIACTA,KADS;;AAAA,UAKnBC,iBALmB,GAKC,UAACC,QAAD,EAAc;AAC9B,YAAKC,QAAL,CAAc,EAACD,kBAAD,EAAd;AACH,KAPkB;;AAEf,UAAKE,SAAL,GAAiB,IAAIT,SAASU,SAAb,CAAuB,EAACC,QAAQ,IAAT,EAAeC,oBAAoB,IAAnC,EAAvB,CAAjB;AAFe;AAGlB;;;;6BAMQ;AAAA;;AACP,UAAMC,eAAe;AACnBC,gBAAQ,YADW;AAEnBC,8BAAsB,EAAEb,0BAAF,EAFH;AAGnBc,iCAAyB,iCAACC,QAAD;AAAA,iBAAcC,QAAQC,OAAR,CAAgB,OAAKV,SAAL,CAAeW,QAAf,CAAwBH,QAAxB,CAAhB,CAAd;AAAA;AAHN,OAArB;AAKA,UAAMZ,qBACD,KAAKA,KADJ,EAEDQ,YAFC,CAAN;AAIE,aACE,oBAAC,kBAAD,EAAcR,KAAd,CADF;AAGH;;;;EAxBuCN,MAAMsB,S;;kBAA7BjB,c","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport ReactMde from 'react-mde';\nimport * as Showdown from \"showdown\";\nimport 'react-mde/lib/styles/css/react-mde-all.css';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\n\n\nconst icons = {\n \"bold\": <FontAwesomeIcon icon=\"bold\" />,\n \"heading\": <FontAwesomeIcon icon=\"heading\" />,\n \"italic\": <FontAwesomeIcon icon=\"italic\" />,\n \"strikethrough\": <FontAwesomeIcon icon=\"strikethrough\" />,\n \"link\": <FontAwesomeIcon icon=\"link\" />,\n \"quote-right\": <FontAwesomeIcon icon=\"quote-right\" />,\n \"code\": <FontAwesomeIcon icon=\"code\" />,\n \"image\": <FontAwesomeIcon icon=\"image\" />,\n \"list-ul\": <FontAwesomeIcon icon=\"list-ul\" />,\n \"list-ol\": <FontAwesomeIcon icon=\"list-ol\" />,\n \"tasks\": <FontAwesomeIcon icon=\"tasks\" />,\n };\n\n const iconProvider = (name) => {\n return icons[name] || \"❓\";\n };\n \n\nexport default class MarkdownEditor extends React.Component {\n\n constructor(props) {\n super(props);\n this.converter = new Showdown.Converter({tables: true, simplifiedAutoLink: true});\n }\n\n handleValueChange = (mdeState) => {\n this.setState({mdeState});\n }\n\n render() {\n const defaultProps = {\n layout: 'horizontal',\n buttonContentOptions: { iconProvider },\n generateMarkdownPreview: (markdown) => Promise.resolve(this.converter.makeHtml(markdown)),\n }\n const props= {\n ...this.props,\n ...defaultProps,\n }\n return (\n <ReactMde {...props} />\n );\n }\n}"]}
|
|
|
|
|
1
|
+{"version":3,"sources":["../../src/MarkdownEditor/index.js"],"names":["React","Showdown","icons","iconProvider","name","MarkdownEditor","props","handleValueChange","mdeState","setState","converter","Converter","tables","simplifiedAutoLink","defaultProps","layout","buttonContentOptions","generateMarkdownPreview","markdown","Promise","resolve","makeHtml","Component"],"mappings":";;;;;;;;;;AAAA;;IAAYA,K;;AACZ;;;;AACA;;IAAYC,Q;;AACZ;;AACA;;;;;;;;;;;;AAGA,IAAMC,QAAQ;AACV,UAAQ,oBAAC,iCAAD,IAAiB,MAAK,MAAtB,GADE;AAEV,aAAW,oBAAC,iCAAD,IAAiB,MAAK,SAAtB,GAFD;AAGV,YAAU,oBAAC,iCAAD,IAAiB,MAAK,QAAtB,GAHA;AAIV,mBAAiB,oBAAC,iCAAD,IAAiB,MAAK,eAAtB,GAJP;AAKV,UAAQ,oBAAC,iCAAD,IAAiB,MAAK,MAAtB,GALE;AAMV,iBAAe,oBAAC,iCAAD,IAAiB,MAAK,aAAtB,GANL;AAOV,UAAQ,oBAAC,iCAAD,IAAiB,MAAK,MAAtB,GAPE;AAQV,WAAS,oBAAC,iCAAD,IAAiB,MAAK,OAAtB,GARC;AASV,aAAW,oBAAC,iCAAD,IAAiB,MAAK,SAAtB,GATD;AAUV,aAAW,oBAAC,iCAAD,IAAiB,MAAK,SAAtB,GAVD;AAWV,WAAS,oBAAC,iCAAD,IAAiB,MAAK,OAAtB;AAXC,CAAd;;AAcE,IAAMC,eAAe,SAAfA,YAAe,CAACC,IAAD,EAAU;AAC7B,SAAOF,MAAME,IAAN,KAAe,GAAtB;AACD,CAFD;;IAKmBC,c;;;AAEjB,0BAAYC,KAAZ,EAAmB;AAAA;;AAAA,gIACTA,KADS;;AAAA,UAKnBC,iBALmB,GAKC,UAACC,QAAD,EAAc;AAC9B,YAAKC,QAAL,CAAc,EAACD,kBAAD,EAAd;AACH,KAPkB;;AAEf,UAAKE,SAAL,GAAiB,IAAIT,SAASU,SAAb,CAAuB,EAACC,QAAQ,IAAT,EAAeC,oBAAoB,IAAnC,EAAvB,CAAjB;AAFe;AAGlB;;;;6BAMQ;AAAA;;AACP,UAAMC,eAAe;AACnBC,gBAAQ,YADW;AAEnBC,8BAAsB,EAAEb,0BAAF,EAFH;AAGnBc,iCAAyB,iCAACC,QAAD;AAAA,iBAAcC,QAAQC,OAAR,CAAgB,OAAKV,SAAL,CAAeW,QAAf,CAAwBH,QAAxB,CAAhB,CAAd;AAAA;AAHN,OAArB;AAKA,UAAMZ,qBACDQ,YADC,EAED,KAAKR,KAFJ,CAAN;AAIE,aACE,oBAAC,kBAAD,EAAcA,KAAd,CADF;AAGH;;;;EAxBuCN,MAAMsB,S;;kBAA7BjB,c","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport ReactMde from 'react-mde';\nimport * as Showdown from \"showdown\";\nimport 'react-mde/lib/styles/css/react-mde-all.css';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\n\n\nconst icons = {\n \"bold\": <FontAwesomeIcon icon=\"bold\" />,\n \"heading\": <FontAwesomeIcon icon=\"heading\" />,\n \"italic\": <FontAwesomeIcon icon=\"italic\" />,\n \"strikethrough\": <FontAwesomeIcon icon=\"strikethrough\" />,\n \"link\": <FontAwesomeIcon icon=\"link\" />,\n \"quote-right\": <FontAwesomeIcon icon=\"quote-right\" />,\n \"code\": <FontAwesomeIcon icon=\"code\" />,\n \"image\": <FontAwesomeIcon icon=\"image\" />,\n \"list-ul\": <FontAwesomeIcon icon=\"list-ul\" />,\n \"list-ol\": <FontAwesomeIcon icon=\"list-ol\" />,\n \"tasks\": <FontAwesomeIcon icon=\"tasks\" />,\n };\n\n const iconProvider = (name) => {\n return icons[name] || \"❓\";\n };\n \n\nexport default class MarkdownEditor extends React.Component {\n\n constructor(props) {\n super(props);\n this.converter = new Showdown.Converter({tables: true, simplifiedAutoLink: true});\n }\n\n handleValueChange = (mdeState) => {\n this.setState({mdeState});\n }\n\n render() {\n const defaultProps = {\n layout: 'horizontal',\n buttonContentOptions: { iconProvider },\n generateMarkdownPreview: (markdown) => Promise.resolve(this.converter.makeHtml(markdown)),\n }\n const props= {\n ...defaultProps,\n ...this.props,\n }\n return (\n <ReactMde {...props} />\n );\n }\n}"]}
|