This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
This project was created as a test-task.
Develop a SPA with React.js: a text-based note editor with tags. Technical requirements:
- React.js hooks;
- Using TypeScript;
- Using the UI library;
- Use a state manager.
► You can create a new note. Just click the "Create a new note" button.
► When you write a note, you can use hashtags. Hashtags are highlighted and shown below the note. Hashtags help you filter your posts.
► You can edit or delete a note.
The biggest challenge was to create a text editor that would highlight hashtags in note writing mode. I tried different ways to solve the problem:
- I used the div tag with attribute contenteditable
- I was looking for different ways to create input
- Also I found property dangerouslySetInnerHTML, but of course I didn't use it.
- And I found Draft.js (is a JavaScript rich text editor framework, built for React and backed by an immutable model). I found this method the most convenient, understandable and most suitable. Thus, I settled on this method.