HASEL-UZH / TACOS-labstudy-tasks

0 stars 0 forks source link

Task 1: Adding HTML export to editor (old) #1

Open AlexanderLill opened 1 month ago

AlexanderLill commented 1 month ago

Project

For this task you will be working on a markdown editor called "Trix". "Trix" is a web-application written in JavaScript, and allows to write and format text using simple styles such as bold, lists, and hyperlinks.

Alexander: Here is the website: https://trix-editor.org/

Setup

Alexander: Depending on if I use a VM or not, the following steps might be skipped

  1. Open Visual Studio Code and clone the following repository: URL
  2. Install the project's dependencies using the command yarn install
  3. Start the editor using the command yarn dev
  4. Navigate to the webpage http://localhost:8000

Feature Request

Users have requested the functionality to export the content of the editor as a HTML file. The user interface should include a button to trigger the HTML export, as indicated in red in the picture. Please read the following text carefully to implement this task.

Trix editor with HTML export button outlined in red

Task Description

To implement this feature, two changes are necessary:

Change 1: Add an export button to the UI

Change 2: Implement the file download functionality

While coding

👉 While working, search online for needed information. It is quicker than navigating through the entire codebase. 👉 Save the file to see the effects of your changes (no need to refresh the page in the browser).

AlexanderLill commented 1 month ago

Expected diff: https://github.com/HASEL-UZH/trix-solution/pull/2