This plugin is a collection of table tools in Caret Editor.
This Caret plugin currently allows for CSV to be converted to Markdown and Markdown table formatting. Eventually it will allow for HTML formatting as well.
For all issues please see GitHub
https://github.com/DanShrader/Caret-Plugin-Table-Tools
The options for CSV To Markdown Table (https://github.com/donatj/CsvToMarkdownTable) are passed via "optionsCSV"
Note: the pattern for formatting a Markdown Table is influenced by CSV To Markdown Table.
To use with Caret
You'll need to add the following to your api.json file, under settings menu. This plugin can pass the same options that JS-Beautify does in the 'options' tag. Note: The id is the id found under extensions.
api.json
{
"sampleMessage": {
"id": "extension id goes here",
"message": {
"data": "message can be any JSON object passable to chrome.runtime.sendMessageExternal"
}
},"CSV-to-MD": {
"id": "gaonahnbhbpdimakadahmbogdfdhlifg",
"message": {
"command":"CSV-to-MD",
"optionsCSV": {
// "deliminator": "\t", //tab
"deliminator": ",", //,
// "header": false
"header": true
}
},
"sendEditorContext": true
}
,"Pretty-MD": {
"id": "gaonahnbhbpdimakadahmbogdfdhlifg",
"message": {
"command":"Pretty-MD"
},
"sendEditorContext": true
}
}
menus.json
This is optional, but allows the command to be accessable in menu system.
{
"label": "MD Table Beautify",
"command": "api:execute",
"argument": "Pretty-MD"
},
{
"label": "Format SQL",
"command": "api:execute",
"argument": "format-SQL"
}
The following have contributed works
Without the following, this plug-in would not exist. Thanks to their works.
Caret
CSV To Markdown Table - their pattern is the base for the markdown formatting.
Statistics
Installs
85
history
Category
Rating
4.5 (2 votes)
Last update / version
2017-07-03 / 1.0.0
Listing languages
en-US