Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ WebBox is an interactive code editor focused on web development, providing live

---

* [Create a File](./docs/CreateFile.md)
* [Open a File](./docs/OpenFile.md)
* [Save a File](./docs/SaveFile.md)
* [Viewer Windows](./docs/ViewerWindows.md)
* [Shortcuts](./docs/Shortcuts.md)
* [Customize Colors](./docs/CustomColors.md)
- [Create a File](./docs/CreateFile.md)
- [Open a File](./docs/OpenFile.md)
- [Save a File](./docs/SaveFile.md)
- [Viewer Windows](./docs/ViewerWindows.md)
- [Shortcuts](./docs/Shortcuts.md)
- [Customize Colors](./docs/CustomColors.md)

---

Expand All @@ -24,4 +24,5 @@ Developed as a school project by **Ethan Mahlstedt**
Want to help? Send me a [mail](mailto:ethan.mahlstedt@hotmail.com)

---
<p style="font-size: 10px">Last modified at 13/05/25 by Ethan Mahlstedt; v1.0.0-rc2 </p>

<p style="font-size: 10px">Last modified at 13/05/25 by Ethan Mahlstedt; v1.0.0-rc2 </p>
3 changes: 1 addition & 2 deletions docs/CreateFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ Filename **must** include extension.

---


Filename and folder **are mandatory**.

---

<p style="font-size: 10px">Last modified at 12/05/25 by Ethan Mahlstedt; v1.0-rc1 </p>
<p style="font-size: 10px">Last modified at 12/05/25 by Ethan Mahlstedt; v1.0-rc1 </p>
2 changes: 1 addition & 1 deletion docs/CustomColors.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ If you want to use custom colors, you must edit the files located at `editor/fro

---

<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
22 changes: 10 additions & 12 deletions docs/OpenFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@

To open files, WebBox will prompt you to choose a file that matches the following file types:

* **HTML** (.html, .htm)
* **JavaScript** (.js, .jsx, .mjs, .cjs)
* **TypeScript** (.ts, .tsx)
* **CSS** (.css)
* **JSON** (.JSON)
* **Markdown** (.md)
* **PHP** (.php)
* **Text Documents** (.txt)
* **XML** (.xml)


- **HTML** (.html, .htm)
- **JavaScript** (.js, .jsx, .mjs, .cjs)
- **TypeScript** (.ts, .tsx)
- **CSS** (.css)
- **JSON** (.JSON)
- **Markdown** (.md)
- **PHP** (.php)
- **Text Documents** (.txt)
- **XML** (.xml)

---

<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
5 changes: 2 additions & 3 deletions docs/SaveFile.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

###### Go back to [index](../README.md)

---
Expand All @@ -13,8 +12,8 @@ When closing files, WebBox will prompt you to save the file if it has unsaved ch

![fileSaveDialog.png](../resources/docs/fileSaving/fileSaveDialog.png)

Whenever a file has unsaved changes, the file name will be displayed in *italic* in the tab bar. This is a visual indicator that the file has unsaved changes.
Whenever a file has unsaved changes, the file name will be displayed in _italic_ in the tab bar. This is a visual indicator that the file has unsaved changes.

---

<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
4 changes: 2 additions & 2 deletions docs/Shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Shortcut list

| Shortcut | Action |
|--------------------|-------------------------------------|
| ------------------ | ----------------------------------- |
| `Ctrl + N` | Create File |
| `Ctrl + O` | Open File |
| `Ctrl + S` | Save File |
Expand All @@ -20,4 +20,4 @@

---

<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
3 changes: 1 addition & 2 deletions docs/ViewerWindows.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

###### Go back to [index](../README.md)

---
Expand All @@ -19,4 +18,4 @@ In the case you want to refresh the viewer, you can use the **"Refresh Viewer"**

---

<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
<p style="font-size: 10px">Last modified at 14/05/25 by Ethan Mahlstedt; v1.0-rc2 </p>
1 change: 0 additions & 1 deletion front/editor/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WebBox</title>
<link rel="stylesheet" href="editor.css" />
</head>
<body>
<div id="FilePicker"></div>
Expand Down
25 changes: 18 additions & 7 deletions front/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,15 +845,26 @@ pickWindowBtn.addEventListener("click", () => {
});

//////////////////////////////////////////////////////////
// Load Highlighter
// Load Stylesheets
/////////////////////////////////////////////////////////

const cssPath = path.join(process.cwd(), "front", "editor", "highlighter.css");

const link = document.createElement("link");
link.rel = "stylesheet";
link.href = `file://${cssPath}`;
document.head.appendChild(link);
const HighlighterPath = path.join(
process.cwd(),
"front",
"editor",
"highlighter.css"
);
const EditorPath = path.join(process.cwd(), "front", "editor", "editor.css");

appendStylesheet(HighlighterPath);
appendStylesheet(EditorPath);

function appendStylesheet(dir) {
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = `file://${dir}`;
document.head.appendChild(link);
}

//////////////////////////////////////////////////////////
// Handle Window Deletion
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webbox",
"version": "1.0.0-rc2",
"version": "1.0.0",
"description": "Live Editor for HTML, CSS and JS",
"main": "main.js",
"scripts": {
Expand Down