{"id":17124709,"url":"https://github.com/asika32764/fongshen-editor","last_synced_at":"2025-04-13T06:11:10.778Z","repository":{"id":19564330,"uuid":"22813422","full_name":"asika32764/fongshen-editor","owner":"asika32764","description":"A highly customizable code-inserting editor for markdown or other languages","archived":false,"fork":false,"pushed_at":"2015-05-12T08:44:55.000Z","size":3525,"stargazers_count":36,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T22:45:41.299Z","etag":null,"topics":["ace","ace-editor","code-editor","codemirror"],"latest_commit_sha":null,"homepage":"http://about.asika.tw/fongshen-editor/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ruby/spec","license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asika32764.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":"2014-08-10T16:38:09.000Z","updated_at":"2024-05-07T00:35:21.000Z","dependencies_parsed_at":"2022-09-10T20:25:14.431Z","dependency_job_id":null,"html_url":"https://github.com/asika32764/fongshen-editor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Ffongshen-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Ffongshen-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Ffongshen-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Ffongshen-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asika32764","download_url":"https://codeload.github.com/asika32764/fongshen-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670434,"owners_count":21142904,"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":["ace","ace-editor","code-editor","codemirror"],"created_at":"2024-10-14T18:43:13.801Z","updated_at":"2025-04-13T06:11:10.748Z","avatar_url":"https://github.com/asika32764.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fongshen Editor\n\nA highly customizable code-inserting editor.\n\n## About\n\nFongshen is a code inserting editor, It can integrate and wrap many other text editors and provides multiple buttons sets.\nFongshen is based on well known [MarkItUp](http://markitup.jaysalvat.com/home/) editor but almost rewrite 80% codes.\n\nThe name: \"Fongshen\" in Chinese means the [god of wind](http://en.wikipedia.org/wiki/Fei_Lian).\n\nFongshen's brother is [ACE X Markdown Editor](https://github.com/asikart/ace-markdown-editor) in Joomla CMS.\n\n## Screen Shot\n\n![p-2014-08-11-1](https://cloud.githubusercontent.com/assets/1639206/3878091/18c71ace-216c-11e4-8b4c-fc67277aa5ff.jpg)\n\n## Getting Started\n\n### Using ACE\n\n``` html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003clink rel=\"stylesheet\" href=\"src/skins/simple/style.css\" /\u003e\n        \u003clink rel=\"stylesheet\" href=\"src/type/markdown/style.css\" /\u003e\n\n        \u003cscript src=\"vendor/jquery/jquery.js\"\u003e\u003c/script\u003e\n        \u003cscript src=\"vendor/ace/src-min/ace.js\"\u003e\u003c/script\u003e\n        \u003cscript src=\"src/editor/ace-adapter.js\"\u003e\u003c/script\u003e\n        \u003cscript src=\"src/fongshen.js\"\u003e\u003c/script\u003e\n        \u003cscript src=\"src/type/markdown.js\"\u003e\u003c/script\u003e\n\n        \u003cscript\u003e\n            jQuery(document).ready(function($)\n            {\n                var editor = $('#my-editor');\n\n                var options = {\n                    id: 'foo',\n                    namespace: 'bar',\n                    previewAjaxPath: '../parser/markdown.php',\n                    previewContainer: '#preview-container',\n                    buttons: FongshenMarkdownButtons\n                };\n\n                var aceOptions = {\n                    lang: 'markdown',\n                    wrap: true\n                };\n\n                var Fongshen = editor.fongshen(new AceAdapter(aceOptions), options);\n            });\n        \u003c/script\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003c!-- Editor --\u003e\n        \u003cdiv id=\"my-editor\" class=\"\" style=\"height: 500px;\"\u003e\u003c/div\u003e\n\n        \u003c!-- Preview --\u003e\n        \u003cdiv id=\"preview-container\"\u003e\u003c/div\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThis will create the simple editor:\n\n![p-2014-08-11-2](https://cloud.githubusercontent.com/assets/1639206/3878401/f7a120a8-216e-11e4-8569-33080282551a.jpg)\n\n### Using CodeMirror\n\n``` javascript\nvar editor = $('#my-editor');\n\nvar options = {\n    id: 'foo',\n    namespace: 'bar',\n    previewAjaxPath: '../parser/markdown.php',\n    previewContainer: '#preview-container',\n    resize: false\n    buttons: FongshenMarkdownButtons\n};\n\nvar cmOptions = {\n    mode: 'markdown',\n    theme: 'elegant',\n    lineNumbers: true\n};\n\nvar Fongshen = editor.fongshen(new CodemirrorAdapter(cmOptions), options);\n```\n\n### Dependency Injection\n\nYou can create your own editor object and inject it into adapter.\n\n``` javascript\nvar ace = ace.edit('#my-editor');\nvar session = ace.getSession();\n\nace.setTheme(\"ace/theme/monokai\");\nsession.setMode(\"ace/mode/markdown\");\nsession.setUseWrapMode(true);\n\nvar Fongshen = editor.fongshen(new AceAdapter(ace), options);\n```\n\nOther tutorial please see [Examples](examples).\n\n## TODO\n\n### Add more button set\n\n- Wiki\n- BBCode\n- reStructuredText\n\nPlease comment me if you need other languages.\n\n### Add more themes\n\n### More documentations, more anything~~~\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasika32764%2Ffongshen-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasika32764%2Ffongshen-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasika32764%2Ffongshen-editor/lists"}