1. The Critical TextEdit Setup
By default, TextEdit tries to be a word processor (like Microsoft Word). For web projects, we need it to be a Plain Text editor. Before you write or save any code, change these settings or your browser won't be able to read your files.
- Open TextEdit on your Mac.
- In the top menu bar, click TextEdit > Settings (or Preferences on older Macs).
- Under the New Document tab, select Plain text.
- Under the Open and Save tab, make sure the box "Add .txt extension to plain text files" is UNCHECKED.
- Why? If this is checked, your file might end up named
index.html.txt, and your subdomain won't recognize it.
- Why? If this is checked, your file might end up named
2. Saving Your Files Correctly
When you are ready to save your work:
- Go to File > Save.
- Name your file (e.g.,
index.html). - If Mac asks "Use .html or .txt?", always choose Use .html.
3. The "Live Edit" Trick with Cyberduck
One of the best things about Cyberduck is that you don't have to keep dragging and dropping files every time you fix a typo. You can edit your files "live" on the server.
- Connect to your server in Cyberduck.
- Right-click on your
index.htmlfile (or any file you want to change). - Select Edit With > TextEdit.
- The file will open in TextEdit. Make your changes.
- Press Command + S to save.
- Cyberduck will detect the save and automatically upload the new version to your subdomain.
4. Organizing Your Subdomain
Since you have multiple folders (like css and images), your TextEdit files need to know where to look.
- In your HTML code: If your image is in the
imagesfolder, your code should look like:<img src="images/myphoto.jpg"> - In FileZilla/Cyberduck: Ensure that the folder named
imagesis in the same location as yourindex.html.
Watch Out: Smart Quotes
TextEdit will sometimes turn straight quotation marks (" ") into curly "book-style" quotes (" "). Web code only works with straight quotes. If your images aren't showing up, check your code for curly quotes and replace them.
Hot Tip: If you find TextEdit a bit frustrating as your project gets bigger, most students eventually switch to a free tool called VS Code or Sublime Text. They highlight your code in different colors so it's much easier to spot mistakes!