LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2014, 02:29 PM   #1
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,659

Rep: Reputation: 128Reputation: 128
help with Gedit


I got this text editor Gedit and I really like it. The one thing I wish it had though was the ability to view the html as it would appear in a browser. (A feature which Notepadd++ had.) Anybody know how I might be able to get that (via a plug-in or whatever). And if not, what's a good way of 'selecting all' in Gedit and then copying and pasting the html somewhere so I can see it as if it were in a browser). Thanks so much.
 
Old 03-06-2014, 03:20 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
r-click and click on "select all" and then copy

or should be
< control > + < a >
 
1 members found this post helpful.
Old 03-06-2014, 04:58 PM   #3
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,659

Original Poster
Rep: Reputation: 128Reputation: 128
sorry

Quote:
Originally Posted by John VV View Post
r-click and click on "select all" and then copy

or should be
< control > + < a >
Sorry, John, I didn't explain myself well in my original post. In Notepad++ they have a feature in the toolbar where you can "view in browser." If you click it, it opens Chrome (or whatever browser you choose) and you can see how your html looks as displayed on a web page. (Esp. to see if your css is properly displayed.) That's what I was hoping to find in Gedit. And if I couldl't find it, I was wondering what's a good way to put (I know how to select all and copy and paste) the html in the text editor into a browser-type setting, where I would be able to see it displayed on a web page.
 
Old 03-06-2014, 05:04 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,268
Blog Entries: 1

Rep: Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303
(Why not...) Simply open the saved file in your browser of choice.

Last edited by astrogeek; 03-06-2014 at 05:19 PM.
 
1 members found this post helpful.
Old 03-06-2014, 05:57 PM   #5
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,659

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by astrogeek View Post
(Why not...) Simply open the saved file in your browser of choice.
Thanks astro, Did not realize I could do that. But still curious if there's a way to do it in Gedit. And btw when I open my html from Gedit(see 007)in a browser I get this gobbledeygook (see 008). Any ideas as to why and how it can be remedied? Thanks.
Attached Thumbnails
Click image for larger version

Name:	1_007.png
Views:	14
Size:	119.1 KB
ID:	14896   Click image for larger version

Name:	1_008.png
Views:	17
Size:	136.2 KB
ID:	14897  
 
Old 03-06-2014, 06:06 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,268
Blog Entries: 1

Rep: Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303Reputation: 2303
That is a character encoding issue. From the looks of it I would say probably results from the dumb idea "smart-quotes" (Apple or M$ term I think) being turned on, a common problem. Instead of using an ASCII or UTF8 equivalent apostrophe, it is using another unicode character that displays as the goop. The same will happen with single and double quotes. When used in HTML format it causes many problems (for example when used to quote attribute values).

You can probably simply set/change the character encoding in the browser, but that does not fix it for others who might open it in their own browser with different settings.

The "smart" choice is always to realize that HTML is not bit-for-bit compatible with non-web document formats and encodings, and disable smart-quotes in the editor.

I don't really know where gedit might do that, but it should be easy enough to find.

*** UPDATE ***

It is also possible that you copy/pasted the text from a word or apple doocument, in which case the smart quotes came from outside gedit. I think Wordpress also has the annoying habit of converting simple quotes to dumb-quotes. In that case you may need to find/replace the offending characters in gedit or using a sed type script.

Last edited by astrogeek; 03-06-2014 at 06:39 PM.
 
Old 03-06-2014, 06:29 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
Standard static html is very easy to just " visualize "
and back in 2000 MS's "Notepade.exe" was all that was needed for that

now if one starts adding in php and javascript and a database
then the only "real" way to "look" at the code is in a running Apache server and a web browser
 
1 members found this post helpful.
Old 03-07-2014, 01:22 AM   #8
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,659

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by astrogeek View Post
That is a character encoding issue. From the looks of it I would say probably results from the dumb idea "smart-quotes" (Apple or M$ term I think) being turned on, a common problem. Instead of using an ASCII or UTF8 equivalent apostrophe, it is using another unicode character that displays as the goop. The same will happen with single and double quotes. When used in HTML format it causes many problems (for example when used to quote attribute values).

You can probably simply set/change the character encoding in the browser, but that does not fix it for others who might open it in their own browser with different settings.

The "smart" choice is always to realize that HTML is not bit-for-bit compatible with non-web document formats and encodings, and disable smart-quotes in the editor.

I don't really know where gedit might do that, but it should be easy enough to find.

*** UPDATE ***

It is also possible that you copy/pasted the text from a word or apple doocument, in which case the smart quotes came from outside gedit. I think Wordpress also has the annoying habit of converting simple quotes to dumb-quotes. In that case you may need to find/replace the offending characters in gedit or using a sed type script.
Thanks astro. In LO I had smart quotation marks and dumb apostrophes. So I changed the apostrophe to smart. Which I like. But the problem was not there. The problem was I was copying and pasting into this facebook app "html box" that didn't have any need for the "doc type"etc. stuff at the top of the html so I deleted it. So when I put that file in the browser it had the weird markings for both the quotation marks and apostrophe. So when I went back and opened the full html file in the browser everything was fine. Thanks for cluing me in to what to look for.

P.S. Read "Wolf Solent" by Cowper a couple of months ago. Really enjoyed it.
 
Old 03-07-2014, 10:38 AM   #9
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,440

Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Bluefish is an editor intended for html and other code: that has an option in the menu to display in a browser.
 
1 members found this post helpful.
Old 03-07-2014, 05:32 PM   #10
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,659

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by DavidMcCann View Post
Bluefish is an editor intended for html and other code: that has an option in the menu to display in a browser.
Thanks, David. I had Bluefish and got rid of it. I liked it but I did not notice the browser option. I will revisit it. And speaking of Bluefish, perhaps you could give me some feedback on this. I was looking for a text editor that would notify me when I made an error with the html. The only thing I know of like that is the epub editor Sigil. Anyway, someone suggested that Bluefish with Weblint would do the same sort of thing. I checked the Synaptic Package Manager and found this(see screenshot 16). First of all, is this (Bluefish & Weblint) an effective way of getting the html violation notifications? And if it is,would I just check bluefish and weblint-perl? And lastly, there is weblint-check (see 18). Which sounds great for dropping whole html files into for a check. It looks thourougly over my head though(I'm pretty new) at this point, but will it do the html checking on entire files (kind of like epubCheck for epubs)? Thanks!
Attached Thumbnails
Click image for larger version

Name:	Selection_016.png
Views:	4
Size:	39.8 KB
ID:	14904   Click image for larger version

Name:	1_018.png
Views:	5
Size:	117.1 KB
ID:	14905  
 
Old 03-08-2014, 11:14 AM   #11
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,440

Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
I'm not a web-site creator, but I think that Bluefish and Weblint should do fine. Weblint is produced by the World Wide Web Consortium, so it gives you official validation.
 
1 members found this post helpful.
Old 03-08-2014, 07:48 PM   #12
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,659

Original Poster
Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by DavidMcCann View Post
I'm not a web-site creator, but I think that Bluefish and Weblint should do fine. Weblint is produced by the World Wide Web Consortium, so it gives you official validation.
Thanks!
 
  


Reply

Tags
gedit, html, text editor


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
get gedit to work Fred Caro Linux - Newbie 3 08-06-2013 02:51 PM
gedit sachithkn Fedora 2 08-28-2011 02:42 AM
Gnome 3, Gedit 3.0.5, when I open file with gedit, it created one more unneeded tab Mr. Alex Linux - Software 1 06-18-2011 07:58 AM
gedit fakie_flip Linux - Software 1 08-17-2006 10:52 PM
Gedit JsCAMRY Linux - Software 10 11-06-2003 01:54 PM


All times are GMT -5. The time now is 02:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration