 |
 | <br> shortcut |  |
Joined: 24 Nov 2010 |
Posts: 21 |
|
|
 |
Posted: Thu Jun 09, 2011 12:50 am |
|
 |
 |
 |
 |
Hi, I often use Ctrl+Enter shortcut for <br> tag, but XHTML, WML & etc. standards need closed <br/> tag.
In the settings are no option for change it.
spasibo, balalaika, Lenin, matroshka, Stalin 
|
|
Guru master
Joined: 24 Jul 2009 |
Posts: 737 |
|
|
 |
Posted: Thu Jun 09, 2011 3:58 am |
|
 |
 |
 |
 |
Go into Settings > Editor > Editor Shortcuts. Near the bottom of the list of shortcuts you will find HTML tags and the first one is Ctrl+Enter for Add HTML <br>, which you can change to whatever you like.
You wrote <br/> without a space, but a recommendation for better browser compatibility is that you use <br /> with a space before the closing tag. 
|
|
 |
 | |  |
Joined: 08 Jun 2011 |
Posts: 5 |
|
|
 |
Posted: Thu Jun 09, 2011 4:59 am |
|
 |
 |
 |
 |
plugnplay wrote: | Go into Settings > Editor > Editor Shortcuts. Near the bottom of the list of shortcuts you will find HTML tags and the first one is Ctrl+Enter for Add HTML <br>, which you can change to whatever you like. |
That function only let me change the short cut key combination, not the command as such, or add more key combinations (which I really don't understand the need for?), hence no way (in GUI at least) to change it to <br /> which IS the proper syntax and as I would like to have it too. This is on PhpED 6 (6026), bug?
I also notice it comes with 2 instances of commands with duplicated shortcuts, not good. Although I cannot tell if this is a result of the update from 5.9.5, although I know I have never changed anything in this dialogue, ever.
|
|
 |
 | |  |
Guru master
Joined: 24 Jul 2009 |
Posts: 737 |
|
|
 |
Posted: Thu Jun 09, 2011 5:32 am |
|
 |
 |
 |
 |
Ahh, you're correct, I didn't try changing the command and you can't change it.
However, I just edited a HTML file with an XHTML 1.0 Transitonal DOCTYPE and PhpED does insert <br /> when I press ctrl+Enter:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head></head>
<body>
<br />
</body>
</html> |
So it appears PhpED has some 'intelligence' with br's but I'm not sure if it is correct, because the PhpED 6.0 default XHTML file template still inserts <br>. At the very least, it looks like if you adjust your HTML DOCTYPE's to something suitable, then you can get <br /> to work, at least with HTML files if not PHP files.
|
|
 |
 | |  |
 |
 | |  |
 |
 | |  |
Site Admin
Joined: 13 Jul 2003 |
Posts: 8363 |
|
|
 |
Posted: Thu Jun 16, 2011 8:29 am |
|
 |
 |
 |
 |
7sedm wrote: | and have to change manually in every project. |
There are three things affecting the rules:
-current document DTD. If you use DTD, no other settings of HTML version have any effect
-setting of HTML version in the project that the HTML file belongs to. If project specific settings for parser are enabled - they have effect on the files, unless they have their own DTDs (per p1)
-setting of HTML version in Tools->Settings->Code Insight->Settings->Target HTML Version. It's the last resort.
|
_________________ The PHP IDE team
|
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
|
|
|
|  |