{"id":15048833,"url":"https://github.com/noisywinds/laravel-smartmd","last_synced_at":"2025-09-12T10:43:43.399Z","repository":{"id":57028109,"uuid":"157856702","full_name":"NoisyWinds/laravel-smartmd","owner":"NoisyWinds","description":"🎯 A simple markdown editor compatible most markdown parse,You can choose any parse methods on server or client,like Mathematical formula、flowchart、upload image... ","archived":false,"fork":false,"pushed_at":"2019-02-22T06:28:45.000Z","size":3751,"stargazers_count":73,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T12:50:56.199Z","etag":null,"topics":["emoji","flowchart","latex","markdown","markdown-editor","markdown-parser"],"latest_commit_sha":null,"homepage":"https://xiaoqingxin.site/editor/write","language":"PHP","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/NoisyWinds.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":"2018-11-16T11:13:01.000Z","updated_at":"2025-04-05T23:23:33.000Z","dependencies_parsed_at":"2022-08-23T16:20:42.771Z","dependency_job_id":null,"html_url":"https://github.com/NoisyWinds/laravel-smartmd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoisyWinds%2Flaravel-smartmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoisyWinds%2Flaravel-smartmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoisyWinds%2Flaravel-smartmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoisyWinds%2Flaravel-smartmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoisyWinds","download_url":"https://codeload.github.com/NoisyWinds/laravel-smartmd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140918,"owners_count":21054369,"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":["emoji","flowchart","latex","markdown","markdown-editor","markdown-parser"],"created_at":"2024-09-24T21:16:43.841Z","updated_at":"2025-04-10T01:34:18.791Z","avatar_url":"https://github.com/NoisyWinds.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel-smartmd\n\n![](https://xiaoqingxin.site/images/default_img.jpg)\n\n\u003cp align=\"center\"\u003e\n \u003ca href=\"./docs/docs_EN.md\"\u003eDocumentation\u003c/a\u003e | \u003ca href=\"./docs/docs_CN.md\"\u003e中文文档\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/NoisyWinds/laravel-smartmd\"\u003e\u003cimg src=\"https://travis-ci.org/NoisyWinds/laravel-smartmd.svg?branch=master\"\u003e\u003c/a\u003e\n\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\" alt=\"Software License\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003ca href=\"https://laravel.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/laravel-5.4-green.svg\" alt=\"Software License\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/noisywinds/laravel-smartmd\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/NoisyWinds/laravel-smartmd.svg\" alt=\"packagist\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA simple markdown editor compatible most markdown parse,You can choose any parse methods on server or client,like Mathematical formula、flowchart、upload image...\nthis program is a plugin for laravel 5.4 and php 7.1 upper.more feature develop now...    \n\n##  Screenshots\neditor demo: [Demo](https://xiaoqingxin.site/editor/write)   \njs render page [Demo](https://xiaoqingxin.site/editor/js-show)  \nphp render page [Demo](https://xiaoqingxin.site/editor/php-show)\n  \n  ![](./docs/screenshot.png)\n  --- \n  ![](./docs/screenshot_02.gif) \n  ---\n  ![](./docs/screenshot_03.gif)\n\nReference:\n- CodeMirror [link](https://github.com/codemirror/CodeMirror) \n- Simplemde-markdown [link](https://github.com/sparksuite/simplemde-markdown-editor)\n- markdown-it (markdown render) [link](https://github.com/markdown-it/markdown-it)\n- mermaid (flowchart) [link](https://github.com/knsv/mermaid)\n- intervention (image handling) [link](https://github.com/Intervention/image)\n\n## requirements\n- PHP \u003e= 7.1.0\n- Laravel \u003e= 5.4.0\n\n## Installation\nFirst, install package.\n```\ncomposer require noisywinds/laravel-smartmd\n```\nThen run these commands to publish assets and config：\n```\nphp artisan vendor:publish --provider=\"NoisyWinds\\Smartmd\\SmartmdServiceProvider\"\n```\nmake test view router:\n```\nRoute::group(['namespace' =\u003e 'Smartmd', 'prefix' =\u003e 'editor'], function () {\n    Route::post('/upload', 'UploadController@imSave');\n    Route::get('/write', function () {\n        return view('vendor/smartmd/write');\n    });\n    Route::get('/php-show','ParseController@index');\n    Route::get('/js-show',function(){\n        return view('vendor/smartmd/js-show');\n    });\n});\n```\nRewrite UploadController or config/smartmd.php to change upload path:\n```php\n\u003c?php\nreturn [\n    \"image\" =\u003e [\n        /*\n         * like filesystem, Where do you like to place pictures?\n         */\n        \"root\" =\u003e storage_path('app/public/images'),\n        /*\n         * return public image path\n         */\n        \"url\" =\u003e env('APP_URL').'/storage/images',\n    ],\n];\n```\n* notice: uploda image will optimize and resize in the UploadController\n\n## Some shortcode\n1. Bold (Ctrl + b)\n2. Italic (Ctrl + I)\n3. Insert Image (Ctrl + Alt + I)\n4. Insert Math (Ctrl + m)\n5. Insert flowchart (Ctrl + Alt + m)\n6. more... (mac command the same with ctrl)\n\n\n## editor options\n```javascript\nnew Smartmd({\n   // editor element {string} \n   el: \"#editor\",\n   \n   // editor wrapper layout {string or number}\n   height: \"400px\",\n   width: \"100%\",\n   \n   // autosave \n   autoSave: {\n     // uuid is required {string or number}\n     uuid: 1,\n     // {number}\n     delay: 5000\n   },\n   \n   // init state {boolean}\n   isFullScreen: true, // default false\n   isPreviewActive: true // default false\n});\n```\n\n## parse markdown \n#### I don't need editor:\n```html\n// require in your view meta\n@include('Smartmd::js-parse')\n```\n```\n\u003cscript\u003e\n    // create Parsemd object use javascript parse markdown\n    var parse = new Parsemd();\n    var html = parse.render(document.getElementById(\"editor\").value.replace(/^\\s+|\\s+$/g, ''));\n    document.getElementById(\"content\").innerHTML = html;\n\u003c/script\u003e\n```\n#### I need editor:\n```html\n\u003cscript\u003e\n    var smartmd = new Smartmd();\n    smartmd.markdown(\"# hello world\");\n\u003c/script\u003e\n```\n#### I want php render:\n* only render Formula、Flowchart、Code highlight use JavaScript\n```html\n// require in your view meta\n@include('Smartmd::php-parse')\n```\nParseController.php\n```\nuse NoisyWinds\\Smartmd\\Markdown;\n\n$parse = new Markdown();\n$text = \"# Your markdown text\";\n$html = $parse-\u003etext($text);\nreturn view('Smartmd::php-show',['content'=\u003e$html]);\n\n```\n\n## How to expand\n#### editor\n- CodeMirror [link](https://github.com/codemirror/CodeMirror) \n#### markdown render\n- markdown-it (markdown render) [link](https://github.com/markdown-it/markdown-it)\n## issue \nWelcome to ask questions or what features you want to be compatible with.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoisywinds%2Flaravel-smartmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoisywinds%2Flaravel-smartmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoisywinds%2Flaravel-smartmd/lists"}