{"id":13282513,"url":"https://github.com/mesopelagique/Mark4Down","last_synced_at":"2025-03-10T04:31:33.906Z","repository":{"id":109495909,"uuid":"253997506","full_name":"mesopelagique/Mark4Down","owner":"mesopelagique","description":"Realtime markdown editor for your 4D database.","archived":false,"fork":false,"pushed_at":"2022-12-20T18:01:11.000Z","size":499,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-29T16:17:10.174Z","etag":null,"topics":["4d-component","4d-database","4d-web-component","markdown"],"latest_commit_sha":null,"homepage":"https://mesopelagique.github.io/Mark4Down","language":"4D","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/mesopelagique.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":"2020-04-08T05:51:28.000Z","updated_at":"2024-05-20T12:49:23.000Z","dependencies_parsed_at":"2023-07-14T23:01:24.995Z","dependency_job_id":null,"html_url":"https://github.com/mesopelagique/Mark4Down","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/mesopelagique%2FMark4Down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mesopelagique%2FMark4Down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mesopelagique%2FMark4Down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mesopelagique%2FMark4Down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mesopelagique","download_url":"https://codeload.github.com/mesopelagique/Mark4Down/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242789571,"owners_count":20185488,"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":["4d-component","4d-database","4d-web-component","markdown"],"created_at":"2024-07-29T15:55:35.718Z","updated_at":"2025-03-10T04:31:33.888Z","avatar_url":"https://github.com/mesopelagique.png","language":"4D","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Mark4Down\n[![language][code-shield]][code-url] [![language-top][code-top]][code-url] ![code-size][code-size] [![release][release-shield]][release-url] [![license][license-shield]][license-url]\n[![discord][discord-shield]][discord-url] \n\nRealtime markdown editor for your 4D database.\n\n* Edit documentation from your local machine or remote device such as iPad.\n* The file is saved automatically. New file too.\n* See list of available, missing or orphan documentation files (toolbar buttons at the right)\n* Open github or see diff from last commit\n\n\u003cimg src=\"Documentation/preview.png\" alt=\"preview\"\n\ttitle=\"preview\" width=\"600\" /\u003e\n\n\u003e Quick install: Do the command described by [install](#install), then [accept host database event](#by-accepting-to-execute-on-host-database-event-method-of-the-component) in your database, re-start your database and finally open  http://localhost:8349\n\n## Launch web server\n\nThis a web component. Your need to start a web server to deliver the component interface in your web browser.\n\n### Using the component web server\n\nIf do not want to pollute your database web server, a 4D component could provide one, since new 18R release.\n\nThere is two way to launch the component web server:\n\n#### by accepting to execute `On Host Database Event` method of the component\n\n_In database setting, security tab, \"Execute  `On Host Database Event` ..._\n\n💡 This is the easiest way to have an editor always ready for all your database by placing this component into your 4D app Components folder. See [install](#install) section.\n\nA web server for the component will be started when your database start and the default url will be \n[http://localhost:8349](http://localhost:8349) _(as defined by component [settings.4DSettings](Project/Sources/settings.4DSettings))_\n\n#### or by starting the component web server yourself\n\n```4d\nmark4downWebServer().start() //  you can choose options like HTTP port\n```\n\n### Using your database web server\n\nIn `On Web Connection` method, if you want to edit file into your root database folder do\n\n```4d\n$markdown:=mark4down (Folder(fk database folder) ;$1;$2)\nIf (Not($markdown))\n  // do other requests on your server\nEnd if\n```\n\n\u003e with `$1` and `$2` parameters of  `On Web Connection` database method.\n\nYou must copy WebFolder of component into your database or make a redirection and use `WEB SEND FILE`.\n\nThen open your browser to see the web markdown editor\n\n## Install\n\n### In your 4D for all your databases\n\nJust launch this command in terminal for macOS to install the lastest released version\n\n```bash\ncurl -sL https://mesopelagique.github.io/Mark4Down/install.sh | sh\n```\n\nOr manually download and drag the component in your 4D `Components/` folder (on macOS for instance `/Applications/4D.app/Contents/Components/`)\n\n⚠️ The component folder must be renamed to `Mark4Down.4dbase` if you use sources from github.\n\n### For one database\n\nDrag the component in the `Components` folder into your database.\n\n## More\n\n### Add your own style\n\nGo to `WebFolder` and add it to `style.css` file or add a link to a css file into `Resources/editor.html`\n\n### Access documentation files list without editor\n\n#### Available\n\nGo to `/mark4down/list`, ex:  http://localhost:8349/mark4down/list\n\n#### Missing\n\nGo to `/mark4down/missing`, ex:  http://localhost:8349/mark4down/missing\n\n#### Full git diff\n\nGo to `/mark4down/diff`, ex:  http://localhost:8349/mark4down/diff/\n\n## Acknowledgment\n\n- Markdown editor by [SimpleMDE](https://github.com/sparksuite/simplemde-markdown-editor)\n- Code syntax highlighting by [highlightjs](https://highlightjs.org/) with [4d addons](https://github.com/highlightjs/highlightjs-4d)\n\n---\n\n[\u003cimg src=\"https://mesopelagique.github.io/quatred.png\" alt=\"mesopelagique\"/\u003e](https://mesopelagique.github.io/)\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[code-shield]: https://img.shields.io/static/v1?label=language\u0026message=4d\u0026color=blue\n[code-top]: https://img.shields.io/github/languages/top/mesopelagique/Mark4Down.svg\n[code-size]: https://img.shields.io/github/languages/code-size/mesopelagique/Mark4Down.svg\n[code-url]: https://developer.4d.com/\n[release-shield]: https://img.shields.io/github/v/release/mesopelagique/Mark4Down\n[release-url]: https://github.com/mesopelagique/Mark4Down/releases/latest\n[license-shield]: https://img.shields.io/github/license/mesopelagique/Mark4Down\n[license-url]: LICENSE.md\n[discord-shield]: https://img.shields.io/badge/chat-discord-7289DA?logo=discord\u0026style=flat\n[discord-url]: https://discord.gg/dVTqZHr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesopelagique%2FMark4Down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmesopelagique%2FMark4Down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesopelagique%2FMark4Down/lists"}