{"id":18037440,"url":"https://github.com/faxes/markdownconvert","last_synced_at":"2025-03-27T09:31:31.567Z","repository":{"id":65593754,"uuid":"594695721","full_name":"FAXES/markdownconvert","owner":"FAXES","description":"Convert Markdown to HTML using mdconvert!","archived":false,"fork":false,"pushed_at":"2024-09-29T22:12:31.000Z","size":184,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T10:42:39.410Z","etag":null,"topics":["html","markdown","markdown-parser","markdown-to-html","parser"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/markdownconvert","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FAXES.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-29T11:06:50.000Z","updated_at":"2024-09-29T22:11:04.000Z","dependencies_parsed_at":"2024-08-15T08:50:40.726Z","dependency_job_id":"af5db127-c142-4808-b6da-09ff9dc12bd1","html_url":"https://github.com/FAXES/markdownconvert","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"30b46b85ac49b84938f54eb40024539e866656f5"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAXES%2Fmarkdownconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAXES%2Fmarkdownconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAXES%2Fmarkdownconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAXES%2Fmarkdownconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FAXES","download_url":"https://codeload.github.com/FAXES/markdownconvert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222226133,"owners_count":16951818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","markdown","markdown-parser","markdown-to-html","parser"],"created_at":"2024-10-30T13:08:59.538Z","updated_at":"2024-10-30T13:09:00.540Z","avatar_url":"https://github.com/FAXES.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/FAXES/markdownconvert\"\u003e\r\n  \u003cimg width=\"60px\" height=\"60px\" src=\"https://weblutions.com/i/sevyTO.png\" align=\"right\" /\u003e\r\n\u003c/a\u003e\r\n\r\n# Markdown Convert\r\n\r\nMarkdown convert is a conversion tool used to, you guessed it, convert markdown to HTML.\r\n\r\n- 🐈 Markdown to HTML parser \r\n- ⚡Built differently, for performance\r\n- ⚖️ light-weight while also having custom markdown conversions built-in\r\n- 🔥 Support for [HTTP request blocks](https://docs.weblutions.com/c/products/md-guide-http) to be rendered with custom Markdown\r\n- 🪴 Remove markdown syntax and get the text content - all without the asterisks and underscores\r\n\r\n## Installation\r\nGet started by running the install command 😊\r\n```\r\nnpm install markdownconvert\r\n```\r\n\r\n## Usage\r\nCurrently, you can use markdownconvert in the following ways.\r\n\r\n**Node.js**\r\n```js\r\nconst mdconvert = require('markdownconvert');\r\n\r\nlet string = \"This is some **cool** Markdown to **HTML**, generated by `markdownconvert` for ~~me~~ you.\";\r\n\r\nlet converted = mdconvert.convert(string);\r\n/* Output:\r\n\u003cp\u003eThis is some \u003cstrong\u003ecool\u003c/strong\u003e Markdown to \u003cstrong\u003eHTML\u003c/strong\u003e, generated by \u003ccode\u003emarkdownconvert\u003c/code\u003e for \u003cs\u003eme\u003c/s\u003e you.\u003c/p\u003e\r\n*/\r\n```\r\n\u003c!--\r\n**Browser**\r\n```html\r\n\u003cp id=\"output\"\u003e\u003c/p\u003e\r\n\u003cscript type=\"module\"\u003e\r\n  import mdconvert from 'https://cdn.jsdelivr.net/npm/markdownconvert/bundle.min.js';\r\n  document.addEventListener('DOMContentLoaded', function() {\r\n    let str = 'This is some **cool** Markdown to **HTML**, [Colored]{#00ccff} generated by `markdownconvert` for ~~me~~ you. ok  ok `tested` [Colored text]{#00ccff}'\r\n    document.getElementById('output').innerHTML = mdconvert.convert(str);\r\n  });\r\n\u003c/script\u003e\r\n```\r\n--\u003e\r\n\r\n## Current Functions\r\n```js\r\nconvert(string, options) // Converts Markdown to HTML.\r\nrender(string, options) // Another function name, same as convert()\r\n\r\nregisterBlock({open: 'optional', close: 'optional', exec: function}) // Registers a block replacement that is executed, good for custom addons\r\nregisterInline({open: 'optional', close: 'optional', exec: function}) // Registers an in-line block replacement. Again, good for custom addons\r\n\r\ngetStyle(index, returnClassEquals) // Returns the registered style (class name) for the associated element, returnClassEquals will return the style as ' class=\"class_name\"'.\r\nupdateStyle(index, newProperty) // Create or overwrite existing style for the defined element\r\n```\r\n\r\n## Options\r\n```js\r\noptions.sanitize // Sanitizes the function, removing any HTML script tags.\r\noptions.plainText // Removes markdown formatting so the plain text is returned without formatting or syntax.\r\n```\r\nBoth of these default to `false`.\r\n\r\n## Modifying Styles\r\nMarkdownconvert allows you to change the CSS properties of a tag to allow your own customisation. There's a list of [Default Styles](https://github.com/FAXES/markdownconvert/wiki/Default-Styles) available.\r\n\r\nTo update a style you can use the `updateStyle()` function.\r\n```js\r\nconst mdconvert = require('markdownconvert');\r\nmdconvert.updateStyle('contDanger', 'converterDangerCSS');\r\n\r\n// To fetch this property you can use the `getStyle()` function\r\nmdconvert.getStyle('contDanger');\r\n```\r\n*If `contDanger` wasn't found in the list, it would be created and added, which is perfect for adding your own rules with `registerBlock()` or `registerInline()`.*\r\n\r\n## Change-log\r\nGet all the latest changes at [github.com/FAXES/markdownconvert/releases](https://github.com/FAXES/markdownconvert/releases)\r\n\r\n## Authors\r\nMarkdownconvert is created by [Weblutions \u0026 FAXES](https://weblutions.com).\r\n\r\n\u003ca href=\"https://discord.gg/faxes\" target=\"_blank\"\u003e\r\n    \u003cimg alt=\"Discord Invite\" src=\"https://api.weblutions.com/discord/invite/faxes/light\"\u003e\r\n\u003c/a\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaxes%2Fmarkdownconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaxes%2Fmarkdownconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaxes%2Fmarkdownconvert/lists"}