{"id":15048657,"url":"https://github.com/balder1840/blazor.cherrydown","last_synced_at":"2026-01-02T03:40:29.575Z","repository":{"id":227380474,"uuid":"771266437","full_name":"Balder1840/Blazor.Cherrydown","owner":"Balder1840","description":"A blazor markdown editor","archived":false,"fork":false,"pushed_at":"2024-05-31T12:38:17.000Z","size":12014,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T23:21:54.645Z","etag":null,"topics":["blazor","markdown","markdown-editor","markdown-viewer"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Balder1840.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-13T01:28:41.000Z","updated_at":"2024-05-31T12:38:21.000Z","dependencies_parsed_at":"2024-11-19T15:43:09.058Z","dependency_job_id":"139d1b63-e7a1-4477-ba46-a0820b790670","html_url":"https://github.com/Balder1840/Blazor.Cherrydown","commit_stats":null,"previous_names":["balder1840/blazor.cherrydown"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Balder1840%2FBlazor.Cherrydown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Balder1840%2FBlazor.Cherrydown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Balder1840%2FBlazor.Cherrydown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Balder1840%2FBlazor.Cherrydown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Balder1840","download_url":"https://codeload.github.com/Balder1840/Blazor.Cherrydown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495376,"owners_count":20299924,"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":["blazor","markdown","markdown-editor","markdown-viewer"],"created_at":"2024-09-24T21:14:52.145Z","updated_at":"2026-01-02T03:40:29.515Z","avatar_url":"https://github.com/Balder1840.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blazor.Cherrydown\nA blazor markdown editor wraps of [cherry-markdown](https://github.com/Tencent/cherry-markdown) from Tencent.\n\n# Features\n- [x] Edit and preview mode.\n- [x] Pre-defined toolbar.\n- [x] Streaming file uploading(inspired by the built-in `InputFile` component).\n- [x] Add auto numbers for TOC.\n- [x] Other functionalities that `cherry-markdown` provided.\n\n# Getting started\n\n## Install the package, or download the project and reference it.\n```\ndotnet add package Blazor.Cherrydown\n```\n\n## Add the following using statement in _Imports.razor.\n```razor\n@using Blazor.Cherrydown\n```\n\n\u003e do not need to add the reference to the `javascript` and `CSS`, `Blazor.Cherrydown` will do it for you.\n\u003e for more into, you can refer to [blazor initializer](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/startup?view=aspnetcore-8.0#javascript-initializers)\n\n## Add Cherrydown in a page\n```razor\n\u003cbutton @onclick=\"ChangeMarkdown\"\u003eChange Markdown\u003c/button\u003e\n\u003cCherrydown @bind-Markdown=\"_markdown\" OnFileUpload=\"@SaveFile\" /\u003e\n\n@code {\n    private string? _markdown = \"# CherrydownEditor\";\n\n    protected override void OnParametersSet()\n    {\n        using var reader = new System.IO.StreamReader(@\"basic.md\");\n        _markdown = reader.ReadToEnd();\n        base.OnParametersSet();\n    }\n\n    void ChangeMarkdown()\n    {\n        _markdown = \"# Changed Markdown\";\n    }\n\n    private async Task\u003cFileUploadResult\u003e SaveFile(FileUpload.IBrowserFile file)\n    {\n        var workDir = _config.GetValue\u003cstring\u003e(\"WorkDir\");\n        var workDirVirtualPath = _config.GetValue\u003cstring\u003e(\"WorkDirVirtualPath\");\n\n        await using FileStream fs = new(Path.Combine(workDir, file.Name), FileMode.Create);\n        await file.OpenReadStream(15 * 1024 * 1024).CopyToAsync(fs);\n\n        return new FileUploadResult { FileUri = $\"{workDirVirtualPath}/{file.Name}\" };\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalder1840%2Fblazor.cherrydown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalder1840%2Fblazor.cherrydown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalder1840%2Fblazor.cherrydown/lists"}