NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
ctrl+enter gives <br /> :(


Joined: 26 Feb 2008
Posts: 7
Location: Philippines
Reply with quote
Is there some way to correct this behaviour? I don't consider this to be down to personal preference since my doctype is clearly declared as

Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


In that doctype, (correct me if I'm wrong), but I don't believe that
Code:
<br />
is legal.

Can we make it follow the doctype where it is available and a preference setting if no doctype can be found (perhaps because we're coding an include)?

Thanks

peter
View user's profileFind all posts by snowwebSend private messageYahoo MessengerMSN Messenger


Joined: 26 Jun 2007
Posts: 8
Reply with quote
Hi Peter,
don't take me the wrong way, but wouldn't it be better to make your sites xhtml compliant. That way <br /> is the correct format. Also you would be making sites more "friendly" to all browsers.

regards,
Graham
View user's profileFind all posts by snorkpantsSend private message


Joined: 26 Feb 2008
Posts: 7
Location: Philippines
Reply with quote
The problem Graham, is that PHPed doesn't seem to support html or xhtml properly. It seems to have not made the switch itself!

How come when I press ctrl+enter I get
Code:
< /br>


but when I create a new html file from the built in template I get the following:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en">
<meta name="author" content="">
<meta http-equiv="Reply-to" content="@.com">
<meta name="generator" content="PhpED 5.2">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="creation-date" content="09/20/2007">
<meta name="revisit-after" content="15 days">
<title>Untitled</title>
<link rel="stylesheet" type="text/css" href="my.css">
</head>
<body>
 
</body>
</html>


It's hardly consistent is it? So which does PHPed want us to code in?

Peter
View user's profileFind all posts by snowwebSend private messageYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
but when I create a new html file from the built in template I get the following:

Feel free to add XHTML template file into phped\templates subdirectory.
Sorry that we didn't do this for you.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Jan 2008
Posts: 26
Reply with quote
I agree with the original poster on this. If by default, the HTML template is using HTML 4.0 Transitional doctype, and that the code insertion wizards are all in HTML 4 as well, why would you insert an XHTML version of the BR tag when pressing CTRL-ENTER? It doesn't make sense to me. Either do it one way or the other, but don't mix both!

You should be able to set the default DOCTYPE to use for all HTML tags in the preferences of the application, and then all the wizards and code shortcuts (such as the CTRL-ENTER BR tag...) would automatically adjust accordingly...

It's all about consistency...
View user's profileFind all posts by ygirouardSend private message


Joined: 26 Feb 2008
Posts: 7
Location: Philippines
Reply with quote
Thank ygirouard for your support. Actually, after snorkpants comment, that I should be coding XHTML, I decided that I couldn't be bothered to argue any further, but I would like to add, that XHTML is not the answer for everyone. It's not a natural progression after HTML 4. I'm intending to use the next version of HTML when it is available (HTML 5) and can see no reason to change some of my sites to XHTML and then convert them back again afterwards when I want to use HTML 5.

HTML info can be found here: http://dev.w3.org/html5/spec/Overview.html

..and dmitri, adding an XHTML template won't solve this bug (although I do wonder why one wasn't included, since Nusphere's official line, seems to be that I should be using XHTML instead of HTML anyway!). When coding in the current standard for HTML (version 4), I just need the editor to be able to autocomplete tags correctly, instead of formatting them for a different standard.

I have a question though. Is Nusphere's official line, that they are expecting all web developers to change to XHTML and therefore future editions of Nusphere, will not have code completion and full support for those of us who wish to adopt the newest versions of HTML?

I gather that development of XHTML will continue at the same time, for those relatively few sites that can benefit by it, but presentationally speaking, HTML 5, will be far more powerful.

Regards

peter
View user's profileFind all posts by snowwebSend private messageYahoo MessengerMSN Messenger


Joined: 24 Jan 2008
Posts: 26
Reply with quote
Snowweb, I believe you missread my reply. I'm on YOUR side! I think if you want to code in HTML 4 you should have the tools working for you. The fact that phpEd prints a <br /> tag when pressing CTRL-ENTER while the rest of the application defaults to HTML 4.0 type tags is wrong. They (phpEd dev team) should either change the <br /> to a simple HTML <br> tag, OR add an option in the application's preferences or in the document's preferences or project (or all of those), to select the doctype of the HTML page. When doing so, the tool SHOULD automatically change all of its template and code shortcuts and wizards that would normally paste HTML 4.0 tags, into the format matching the DOCTYPE the user specified.

It shouldn't be up to the user to manually change each template and tags to make them XHTML. This is really counter-productive, and as you said Snowweb, not everybody wants to switch to XHTML (or can for that matter).
View user's profileFind all posts by ygirouardSend private message


Joined: 26 Feb 2008
Posts: 7
Location: Philippines
Reply with quote
Quote:
ygirouard: Snowweb, I believe you missread my reply. I'm on YOUR side!


Sorry ygirouard, my reply could have been a bit clearer! I understood that you're agreeing with me and you made some very valid points. Unfortunately I took the opportunity to respond to earlier replies at the same time, which were disagreeing with our position. I think this gave my post, an overall negative tone, which kinda drowned out my praise to you for supporting me!

I do appreciate your post and accept that we seem to be in complete agreement on this issue. Sorry for any confusion caused. When I originally read your post, I also reviewed the earlier posts again, to refresh my memory and they kind of aroused my fiery streak, which got me fired up again!

Thanks again for your support Very Happy

pete
View user's profileFind all posts by snowwebSend private messageYahoo MessengerMSN Messenger
ctrl+enter gives <br /> :(
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic