I wanted to improve my JavaScript programming, and learn AG Grid at the same time so I tried to think of an application which had a data grid front and center, but met needs that I had. So I built a Markdown table code generator.<p>I've always hated building tables for Markdown so this was helpful in intial prototype stage.<p>I added CSV because AG Grid has an exportDataAsCSV function so it was a 'no cost' feature.<p>The parsing code for importing the various formats is pretty minimal so there will be many edge cases that don't work.<p>Because everything is based around the same data structures internally adding new import and export formats was fairly simple.<p>I haven't added any tests yet because I was incrementally building it and learning to structure JavaScript at the same time.<p>It is pure JavaScript with no frameworks, simply because I'm concentrating on learning JavaScript at the moment and there is no build system.<p>Looking at the code now, after a 4 month gap I can see that I didn't even know about JavaScript modules and imports at the time I started so the code is just added directly into the main index through a script element include.<p>It isn't the most robust application but it was an interesting starting point.<p>My end goal with it was to add data generation capabilities, and have it all run in the browser, but I haven't got to that point yet. My plan is to try to do this by adding a 'type' to each column and then using Faker to generate the data <a href="https://github.com/marak/Faker.js/" rel="nofollow">https://github.com/marak/Faker.js/</a><p>Thought it might be useful if anyone is learning JavaScript and wants to see a simple application.<p>Code is here:<p><a href="https://github.com/eviltester/grid-table-editor" rel="nofollow">https://github.com/eviltester/grid-table-editor</a><p>The readme file in the source has links to other similar apps which have been around for much longer if anyone needs an inbrowser table editor.
I've updated this to use RandExp<p><a href="http://fent.github.io/randexp.js/" rel="nofollow">http://fent.github.io/randexp.js/</a><p>And Faker.js<p><a href="http://marak.github.io/faker.js/" rel="nofollow">http://marak.github.io/faker.js/</a><p>To allow populating the grid with random data using a simple data generation spec, documented the spec in the readme.md<p><a href="https://github.com/eviltester/grid-table-editor#to-generate-test-data" rel="nofollow">https://github.com/eviltester/grid-table-editor#to-generate-...</a><p>e.g.<p>```<p>name<p>faker.fake {{name.lastName}}, {{name.firstName}}<p>desc<p>faker.lorem.paragraph<p>collects<p>faker.hacker.noun<p>prefers<p>(Connie|Bob)<p>```