{"id":30071045,"url":"https://github.com/comfreek/mmteditor","last_synced_at":"2025-08-08T12:16:35.442Z","repository":{"id":54393556,"uuid":"303363896","full_name":"ComFreek/mmteditor","owner":"ComFreek","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-17T03:25:25.000Z","size":41,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-17T04:26:26.810Z","etag":null,"topics":["formal-methods","language-tools","logic"],"latest_commit_sha":null,"homepage":"https://comfreek.github.io/mmteditor","language":"JavaScript","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/ComFreek.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,"zenodo":null}},"created_at":"2020-10-12T11:01:58.000Z","updated_at":"2021-04-20T09:28:26.000Z","dependencies_parsed_at":"2025-06-17T04:22:41.801Z","dependency_job_id":null,"html_url":"https://github.com/ComFreek/mmteditor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ComFreek/mmteditor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fmmteditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fmmteditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fmmteditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fmmteditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComFreek","download_url":"https://codeload.github.com/ComFreek/mmteditor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fmmteditor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269418087,"owners_count":24413521,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["formal-methods","language-tools","logic"],"created_at":"2025-08-08T12:16:32.292Z","updated_at":"2025-08-08T12:16:35.287Z","avatar_url":"https://github.com/ComFreek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MMT Online Tools (mmteditor)\n\nOnline tools for the [MMT language and ecosystem](https://uniformal.github.io/).\n\nSee in action at \u003chttps://comfreek.github.io/mmteditor/\u003e.\n\n- MMT QuickEditor: Editor with syntax highlighting and abbreviation autocompletion.\n\n  ![Screenshot of MMT QuickEditor](./img/screenshot-quickeditor.png)\n\n- \"How do I type X?\": Find out how to type things you encountered.\n\n  ![Screenshot of \"How do I type X?\" feature](./img/screenshot-how-do-i-type.png)\n\n- Abbreviation Search: Find out the abbreviation whose name you only partly remember.\n\n  ![Screenshot of \"Abbreviation Search\"](./img/screenshot-abbr-search.png)\n\n- Bare Editor: A bare full-screen MMT editor within your browser (available at \u003chttps://comfreek.github.io/mmteditor/bare.html\u003e)\n\n  You can also use the bare editor as a \"reusable component\" on external sites:\n  include an `\u003ciframe src=\"https://comfreek.github.io/mmteditor/bare.html\"\u003e\u003c/iframe\u003e` on your site,\n  and then via JS call [postMessage()](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) on the [iframe's contentWindow property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow) with the following event data:\n\n  ```json\n  {\n      \"command\": \"set-content\",\n      \"content\": \"the content you want the editor to display\"\n  }\n  ```\n\n  For example, the [SyntaxPresenterServer within the MMT API](https://github.com/UniFormal/MMT/tree/devel/src/mmt-api/src/main/info/kwarc/mmt/api/web/SyntaxPresenterServer.scala) uses the bare editor this way.\n\n## Development Notes\n\n### Testing locally\n\n1. Get an HTTP server, e.g. [*http-server* from NPM](https://www.npmjs.com/package/http-server): `npm i http-server -g`.\n2. Run the HTTP server, e.g. `http-server .`.\n3. Go to \u003chttp://127.0.0.1:8080/index.html\u003e and \u003chttp://127.0.0.1:8080/bare.html\u003e and test things manually (type random (in)valid MMT syntax, test autocomplete).\n   \n   It is strongly recommended to open the developer tools in your browser and deactivate caching in the network tab.\n\n### Updating MMT's abbreviation map\n\nRegularly update the raw abbreviation data in `abbreviations.js` by copying everything from \u003chttps://github.com/UniFormal/MMT/blob/devel/src/mmt-api/resources/unicode/unicode-latex-map\u003e.\nDetailed instructions can be found in `abbreviations.js`.\n\n### Updating CodeMirror\n\nSuppose CodeMirror releases a new version X.Y.Z. Hopefully, [Renovate](https://github.com/renovatebot/renovate) already filed a pull request.\nThen do:\n\n1. Hopefully the [codemirror/CodeMirror repository on GitHub](https://github.com/codemirror/CodeMirror) contains a corresponding tag `X.Y.Z`.\n2. From within this repository, `cd codemirror` and do:\n\n   1. `git remote add upstream https://github.com/codemirror/CodeMirror.git` (if not already existing)\n   2. `git remote set-url origin --push git@github.com:ComFreek/CodeMirror.git` (if not already done)\n   3. `git fetch upstream --tags`\n   4. `git merge X.Y.Z`\n   5. `git commit -m \"...\"` (in case of merge conflicts) and `git push origin`\n\n3. In case Renovate filed a pull request, do `git fetch` and `git merge origin/renovate/codemirror-x.y`.\n\n   Confirm that in both files `index.html` and `bare.html`, the URIs referencing CodeMirror resources (`\u003cscript src=\"...\"\u003e` and `\u003clink href=\"...\"\u003e`) really contain the updated version.\n   If not or if Renovate did not file a pull request at all, update these versions in the URIs manually.\n\n4. Test whether things work locally (see above under *Testing locally*).\n\n5. `git add --all`, `git commit -m \"Update CodeMirror to X.Y.Z\"`, `git push`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfreek%2Fmmteditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomfreek%2Fmmteditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfreek%2Fmmteditor/lists"}