Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nicoleasks

macrumors newbie
Original poster
Sep 30, 2011
24
0
Is there any way to open an HTML file to the source, like with Text Edit or something? In Windows, I would drag & drop the file into an open Notepad file, but on my Mac I've been resorting to opening the file with a browser, viewing source, and copy & pasting to a Text Edit file -- surely there's a better way?!?!
 
If you Get Info (Command + I) on any html file you can choose the "Open With" application.

Thanks, but that doesn't work -- I open the file with Text Edit and it just opens the text content of the web page, not the source, the HTML code.
 
I don't recommend using TextEdit as an HTML source editor for this very problem you've run into. It's all too common - the reason for it is the default TextEdit preferences. Go in there, and check the option called "Ignore rich text commands in HTML files". Quit TextEdit, and reopen it.
 
TextMate is a great app for any form of coding. It supports every (useful) language I've tried offering colour coding and correct indentation. Well worth its €45 price tag!
 
@Mal Thanks, but that doesn't work, either -- again, it just opens the text content of the web page, not the HTML source code.

@jamesr19 Thanks for the recommendation but I'm not looking to buy anything... nor should I have to, in my opinion. I don't want any bells or whistles: just a plain text editor!

@ScoobyMcDoo Thanks for the recommendation, I'll look into it :)

@szoir Yeah, sure: $400, almost 2GB, and a whole whack of features I have zero need for!! :)

@wrldwzrd89 HOORAY, you've fixed my problem! Thank you very much. :) You say you don't recommend TextEdit as an HTML editor -- are there other reasons, aside from the one I encountered? Is there something you do recommend instead?
 
@Mal Thanks, but that doesn't work, either -- again, it just opens the text content of the web page, not the HTML source code.

@jamesr19 Thanks for the recommendation but I'm not looking to buy anything... nor should I have to, in my opinion. I don't want any bells or whistles: just a plain text editor!

@ScoobyMcDoo Thanks for the recommendation, I'll look into it :)

@szoir Yeah, sure: $400, almost 2GB, and a whole whack of features I have zero need for!! :)

@wrldwzrd89 HOORAY, you've fixed my problem! Thank you very much. :) You say you don't recommend TextEdit as an HTML editor -- are there other reasons, aside from the one I encountered? Is there something you do recommend instead?
It works, but doesn't offer niceties like syntax highlighting that the free TextWrangler does.
 
Thanks, but that doesn't work -- I open the file with Text Edit and it just opens the text content of the web page, not the source, the HTML code.

TextEdit has two parts- a rich text editor (equivalent to WordPad) and a plain text editor (equivalent to notepad). The problem with using TextEdit for HTML editing is that it considers (rightly) HTML to be a rich text format.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.