{"id":24785776,"url":"https://github.com/webdevbynight/in-browser-markdown-editor","last_synced_at":"2026-01-05T06:46:00.813Z","repository":{"id":258991374,"uuid":"875401909","full_name":"webdevbynight/in-browser-markdown-editor","owner":"webdevbynight","description":"This repository is an exercise from a Frontend Mentor challenge.","archived":false,"fork":false,"pushed_at":"2024-10-25T17:33:42.000Z","size":763,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T14:39:25.971Z","etag":null,"topics":["exercise","frontendmentor-challenge"],"latest_commit_sha":null,"homepage":"https://webdevbynight.github.io/in-browser-markdown-editor/","language":"SCSS","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/webdevbynight.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}},"created_at":"2024-10-19T21:56:20.000Z","updated_at":"2024-10-25T17:33:48.000Z","dependencies_parsed_at":"2025-01-29T14:42:57.667Z","dependency_job_id":null,"html_url":"https://github.com/webdevbynight/in-browser-markdown-editor","commit_stats":null,"previous_names":["webdevbynight/in-browser-markdown-editor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevbynight%2Fin-browser-markdown-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevbynight%2Fin-browser-markdown-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevbynight%2Fin-browser-markdown-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevbynight%2Fin-browser-markdown-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webdevbynight","download_url":"https://codeload.github.com/webdevbynight/in-browser-markdown-editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240925,"owners_count":20583102,"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":["exercise","frontendmentor-challenge"],"created_at":"2025-01-29T14:31:25.479Z","updated_at":"2026-01-05T06:46:00.754Z","avatar_url":"https://github.com/webdevbynight.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - In-browser markdown editor solution\n\nThis is a solution to the [In-browser markdown editor challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/inbrowser-markdown-editor-r16TrrQX9). Frontend Mentor challenges help you improve your coding skills by building realistic projects. \n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  - [Links](#links)\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Useful resources](#useful-resources)\n- [Author](#author)\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- Create, Read, Update, and Delete markdown documents\n- Name and save documents to be accessed as needed\n- Edit the markdown of a document and see the formatted preview of the content\n- View a full-page preview of the formatted content\n- View the optimal layout for the app depending on their device's screen size\n- See hover states for all interactive elements on the page\n- **Bonus**: If you're building a purely front-end project, use localStorage to save the current state in the browser that persists when the browser is refreshed\n- **Bonus**: Build this project as a full-stack application\n\n### Screenshot\n\n![Screenshot of the solution](./screenshot.jpg)\n\n### Links\n\n- Solution URL: [https://github.com/webdevbynight/in-browser-markdown-editor](https://github.com/webdevbynight/in-browser-markdown-editor)\n- Live Site URL: [https://webdevbynight.github.io/in-browser-markdown-editor/](https://webdevbynight.github.io/in-browser-markdown-editor/)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS (via SCSS)\n  - custom properties\n  - logical properties\n  - flexbox\n  - grid\n- JavaScript (via TypeScript)\n  - localStorage\n  - fetch\n- Mobile-first workflow\n\n### What I learned\n\nI learnt the `::backdrop` pseudo-element to add a background to a modal `dialog` element.\n\nTo display the markdown editor, I first used the `textarea` element, but I wanted to expand it all over the available height. The easiest way to do it is to use the `field-sizing: content` CSS declaration; but, the `field-sizing` property is not supported by Firefox and Safari (Firefox 131- and Safari 18- at the time when I wrote these lines). So, instead of `textarea`, I used a `div` with the `contenteditable` attribute set to `\"true\"`.\n\n### Useful resources\n\n- [Dialog (Modal) pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) - This helped me to add the appropriate ARIA properties and states to the modal `dialog` element.\n- [Alert and Message Dialogs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) - This helped me to add the appropriate ARIA role and properties to mark up the modal `dialog` element as an alert dialog.\n- [It is possible to expand a textarea only with CSS?](https://stackoverflow.com/questions/15865982/it-is-possible-to-expand-a-textarea-only-with-css#answer-78764792) - Despite the age of this topic on Stack Overflow, there I found the answer to my wonderings about `textarea` expansion with just CSS.\n\n## Author\n\n- Website - [Victor Brito](https://victor-brito.dev)\n- Frontend Mentor - [@webdevbynight](https://www.frontendmentor.io/profile/webdevbynight)\n- Mastodon - [@webdevbynight](https://mastodon.social/webdevbynight)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdevbynight%2Fin-browser-markdown-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdevbynight%2Fin-browser-markdown-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdevbynight%2Fin-browser-markdown-editor/lists"}