{"id":30703018,"url":"https://github.com/ryanlarge13/markup-editor","last_synced_at":"2025-09-02T16:53:36.818Z","repository":{"id":305507214,"uuid":"1020378455","full_name":"RyanLarge13/Markup-Editor","owner":"RyanLarge13","description":"A simple markup parsing algorithm made to be customizable and allow for various and unique markup styles","archived":false,"fork":false,"pushed_at":"2025-07-16T12:18:08.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T12:41:44.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ryanlarge13.github.io/Markup-Editor/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyanLarge13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-07-15T19:18:42.000Z","updated_at":"2025-07-17T18:04:46.000Z","dependencies_parsed_at":"2025-07-20T14:53:06.115Z","dependency_job_id":null,"html_url":"https://github.com/RyanLarge13/Markup-Editor","commit_stats":null,"previous_names":["ryanlarge13/markup-editor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RyanLarge13/Markup-Editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLarge13%2FMarkup-Editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLarge13%2FMarkup-Editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLarge13%2FMarkup-Editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLarge13%2FMarkup-Editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyanLarge13","download_url":"https://codeload.github.com/RyanLarge13/Markup-Editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLarge13%2FMarkup-Editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273317763,"owners_count":25084037,"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-09-02T02:00:09.530Z","response_time":77,"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":[],"created_at":"2025-09-02T16:53:34.114Z","updated_at":"2025-09-02T16:53:36.800Z","avatar_url":"https://github.com/RyanLarge13.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markup Editor\n\nWelcome to this cool little repository. There is not much to it, just a custom\nimplementation of a markup editor. Feel free to goof off with it see if you can improve the algorithm,\nadd in better list behavior etc.., turn the code into library code or something fun.\n\n## About The Code\n\nAlthough not the most robust and complicated implementation this set up is neat in a few other\nareas such as its modularity and scalability. The code is set up to easily expand and build up your\nown custom markup editor behavior by simply adding to the markupMap and token array.\n\n** Example: **\n\n```\nconst markUpArrChecker = [\"#\", \"-\", \"*\", \"1.\", \"`\", .... add more here];\n\nmarkupMap.set(\"#\", {\n  code: \"whatever token you want to add\",\n  start: \"What your starting tag will be\",\n  end: \"What your closing tag will be\",\n  wraps: Does this token wrap or nest? or will it cancel when a new line is created?,\n});\n```\n\nEditing the array of markers and adding to markupMap with your custom code allows you to\ndefine a pretty cool and unique markup editor behavior of your own.\n\n## How it works\n\nThe main script simply grabs the entire value of the textarea a user is typing in, runs the text through the\nmarkup parser and renders the new html in the display div.\n\nparse.js where the fun stuff is works as such.\n\n1. Takes in the text and splits it by each character\n2. Maps through the entire array of text\n3. Each character is checked to see if it exists in our token array\n   if it is found the token is placed in a stack and an empty string is returned. This continues until\n   a non token character is found. If the token does not exist in the array we simply return\n   the character\n4. When the stack is full and a non token character is found we check the map for a token that\n   matches the token within out stack.\n5. When we find a match we add in the opening or closing tags based on the previous marks stack. If\n   it is an opening tag we add it to the previous marks stack. If it is a closing tag we pop from the previous marks\n   stack. This allows us to nest properly and in the correct order\n6. If there is no match we do nothing and simply return the text\n\nThere is a basic overview of the program. Fork, pull, do as you wish!!!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanlarge13%2Fmarkup-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanlarge13%2Fmarkup-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanlarge13%2Fmarkup-editor/lists"}