This means that whenever you create a new file, TextEdit won't mess with the text. On the New Document tab you might want to select plain text as the default format. What you must do is open TextEdit in the Applications folder and go to TextEdit, Preferences. These problems can easily be solved and Te圎dit can be turned into an HTML editor that could be used if nothing else is available with a few changes to the preferences. This could, in fact, break certain features in your website.
HOW TO SAVE A TXT FILE ON MAC AS A HTML CODE
It adds lots of CSS code of its own, modifying what was already there. What's more, when you save the file after making changes, it rewrites the code in its own way and this is unlikely to be the way you want it. However, it goes through a conversion process and in the page looks slightly different in the TextEdit window. html file in a Finder window and select Open With, TextEdit.app, TextEdit opens and displays the file. The problem is thar if anything is edited and the file saved, it could add some code that is not allowed in HTML and that could ruin the page.
There are no images, so it is not quite wysiwyg but it does a reasonable job of displaying the text correctly and titles, bullet lists and paragraph text are all correctly displayed. Let's see an HTML file loaded into TextEdit with the default settings. TextEdit can modify the code and this can seriously mess up any HTML file edited with it, but there is a quick and easy solution to the problem. It can sometimes be frustrating to use, such as when you try to edit an HTML file to make some quick changes to a website or web page, which after all is just plain text. I would normally use Brackets or BBEdit, see Best web development tools for the Apple Mac. TextEdit is a basic, yet useful word processor and text editor that is bundled with macOS on the Apple Mac, but do you use it for HTML and code editing? It can be used with a few tweaks.ĭo you use TextEdit or is it too basic for your needs? I certainly would not recommend it for serious code editing, but if you find yourself on another Mac at work or at a friend's home, it may be all you have.