{"id":24416824,"url":"https://github.com/siaikin/ngr2-markdown","last_synced_at":"2026-04-29T23:32:31.484Z","repository":{"id":65458270,"uuid":"173089374","full_name":"siaikin/ngr2-markdown","owner":"siaikin","description":"可拖放的markdown编辑器","archived":false,"fork":false,"pushed_at":"2019-04-16T09:36:27.000Z","size":10847,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-02T03:31:11.482Z","etag":null,"topics":["angular","markdown","markdown-to-html"],"latest_commit_sha":null,"homepage":"https://abc1310054026.github.io/ngr2-markdown/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siaikin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-28T10:14:06.000Z","updated_at":"2020-05-20T03:34:17.000Z","dependencies_parsed_at":"2023-01-24T14:45:18.783Z","dependency_job_id":null,"html_url":"https://github.com/siaikin/ngr2-markdown","commit_stats":null,"previous_names":["abc1310054026/ngr2-markdown"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siaikin/ngr2-markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2Fngr2-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2Fngr2-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2Fngr2-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2Fngr2-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siaikin","download_url":"https://codeload.github.com/siaikin/ngr2-markdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2Fngr2-markdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular","markdown","markdown-to-html"],"created_at":"2025-01-20T08:14:31.974Z","updated_at":"2026-04-29T23:32:31.468Z","avatar_url":"https://github.com/siaikin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ngr2Markdown\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.1.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Install\n```text\nnpm install --save ngr2-markdown\n```\n## Usage\n在模块中导入`Ngr2MarkdownModule`\n```diff\n+ import { Ngr2MarkdownModule } from 'ngr2-markdown';\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    BrowserAnimationsModule,\n    AppRoutingModule,\n+   Ngr2MarkdownModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\n```\n在HTML模板中使用\n```angular2html\n\u003cnb-ngr2-markdown\n    [options]=\"{TOC: true, direction: 'left', bodyClassName: 'markdown-body', height: 'calc(100vh - 40px)', themeColor: '#3f51a5'}\"\n    [markdown]=\"content\"\n    class=\"markdown\"\n  \u003e\u003c/nb-ngr2-markdown\u003e\n```\n## 参数说明\n### options\n| name | value | default | description |\n| --- | --- | --- | --- |\n| TOC | `true`/`false`: boolean | `true` | 打开/关闭目录 |\n| direction | `left`/`right`: string | `left` | 目录在内容左边/右边 |\n| bodyClassName | string | `markdown-body` | 用于给内容添加样式 |\n| height | string | `800px` | 内容高度, 可以使用`800px/vh/cm`等mdn标准单位以及使用calc()计算 |\n| themeColor | string | `#3f51a5` | 目录中高亮标题的颜色 |\n### markdown\n| name | value | description |\n| --- | --- | --- |\n| markdown | string | markdown原始文本 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiaikin%2Fngr2-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiaikin%2Fngr2-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiaikin%2Fngr2-markdown/lists"}