{"id":29573192,"url":"https://github.com/genieframework/stipplecodemirror.jl","last_synced_at":"2026-02-05T06:03:38.437Z","repository":{"id":304678744,"uuid":"1019156237","full_name":"GenieFramework/StippleCodeMirror.jl","owner":"GenieFramework","description":"CodeMirror for Stipple/GenieFramework","archived":false,"fork":false,"pushed_at":"2026-01-16T07:53:46.000Z","size":162,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-16T22:03:55.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","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/GenieFramework.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-13T21:31:58.000Z","updated_at":"2026-01-16T06:56:41.000Z","dependencies_parsed_at":"2025-07-14T18:40:36.823Z","dependency_job_id":"360c505a-daf0-4a9e-a1ab-3e8cfe115f8d","html_url":"https://github.com/GenieFramework/StippleCodeMirror.jl","commit_stats":null,"previous_names":["genieframework/stipplecodemirror.jl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/GenieFramework/StippleCodeMirror.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleCodeMirror.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleCodeMirror.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleCodeMirror.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleCodeMirror.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenieFramework","download_url":"https://codeload.github.com/GenieFramework/StippleCodeMirror.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleCodeMirror.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29114510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-07-19T05:32:11.996Z","updated_at":"2026-02-05T06:03:38.420Z","avatar_url":"https://github.com/GenieFramework.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StippleCodeMirror\n\nEmbedding CodeMirror instances in Stipple.\n\n#### Exports\n\n`codemirror()`:\n\n* `mode`: the language for highlighting (out of the box support for Julia (CodeMirror and Ohmyrepl), Javascript and Python. In order to activate OhMyREPL coloring make sure you have loaded OhMyREPL and set the mode `mode = \"ohmyrepl\"`\n* `background` (default: transparent): the background color as js color (e.g. `#fff0` or `#333`). If transparent, the background is determined by the style or class of the codemirror component\n* `textcolor` (default: black)\n* `options`: default: `OrderedDict(:lineNumbers = true)`: CodeMirror options\n* `highlights`: Dictionary of css and tokens, calculated via `highlight(code)` for custom highlighting\n\n`codemirror_deps()`, `external_codemirror_deps()`, `mode_deps()`, `external_mode_deps()`:\n\n* dependencies to be added to the app, e.g. `@deps mode_deps`, see CodeMirrorDemo.jl\n\n`highlight(code::Union{AbstractString, IO)`:\n\n- `code` to be highlighted\n- return value: highlights dictionary with css and tokens to be applied by CodeMirror, e.g. `highlights = highlight(code)`\n\n`EditorMixin()`:\n\n* Mixin to easily implement an editor into an app, see CodeMirrorDemo.jl\n\n### CodeMirror Demo\n\n```julia\nusing StippleCodeMirror\n\nusing Stipple, Stipple.ReactiveTools\nusing StippleUI\nusing OhMyREPL\nusing Colors\n\n\n@app Editor begin\n    @mixin EditorMixin(mode = \"ohmyrepl\")\n\n    @in colorscheme = \"GitHubLight\"\n    @in colorscheme_options = OhMyREPL.Passes.SyntaxHighlighter.SYNTAX_HIGHLIGHTER_SETTINGS.schemes |\u003e keys\n\n    @onchange isready begin\n        code = read(@__FILE__, String)\n    end\n    @onchange mode notify(code)\n    @onchange code on_code()\n    @onchange colorscheme on_colorscheme()\nend\n\n@handler Editor function on_code()\n    if mode == \"ohmyrepl\"\n        highlights = StippleCodeMirror.highlight(code)\n    end\nend\n\n@handler Editor function on_colorscheme()\n    colorscheme!(colorscheme)\n    notify(code)\n    darkmode = contains(colorscheme, r\"dark|night\"i)\n    textcolor = darkmode ? \"#fff\" : \"#000\"\n    background = darkmode ? \"#222\" : \"#fff\"\nend\n\n@deps Editor local_codemirror_deps\n@deps Editor local_mode_deps\n\nui() = row(cell(class = \"st-module\", [\n    h3(class = \"q-pb-lg\", \"Editor\")\n\n    Stipple.select(class = \"q-pb-md\", :colorscheme, \"\", options = :colorscheme_options, :standout, ref = \"select\")\n\n    codemirror(class = \"bg-red\",\n        :code,\n        options = :options,\n        mode = :mode,\n        background = :background,\n        textcolor = :textcolor,\n        highlights = :highlights,\n    )\n]))\n\n@page(\"/\", ui, model = Editor, debounce = 0, throttle = 50)\n\nup(open_browser = true)\n\n\n```\n\n#### Sample image\n\n![demo](docs/img/demo.png)\n\n### Acknowledgement\n\nA big thank you to the authors of [CodeMirror](https://codemirror.net/).\n\n#### Note\n\nCurrently we stick to version 5 as there is no pre-built UMD distribution of version 6.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenieframework%2Fstipplecodemirror.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenieframework%2Fstipplecodemirror.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenieframework%2Fstipplecodemirror.jl/lists"}