I guess it is the same thing as the formatting of the input area here - imagine that when you hit enter, you would still go down to a new line, but there would be a gap between them, so that the 2 lines of text are separated, as if they were seperate paragraphs.
(This is not for me, but for basic users who wouldn't be able to add <p> tags manually!)
Yes it is possible with JavaScript. Sounds like you're looking for an extremely basic WYSIWYG rich text editor based in JS. If you take a look at the list of web based WYSIWYG editors at http://www.geniisoft.com/showcase.nsf/WebEditors, you'll soon see the browser nightmares associated with them. But if you only are concerned with P tags, it might not be as bad. Are there any other elements you want to format besides P tags?
What I want to do is change the way that a textarea looks in Wordpress's admin area.
So that when you hit return, you go down 2 lines, instead of one. But I want this to be a cosmetic change only, and not change the data that is saved to the database when you save the article.
But in wordpress if you only go down one line and not two carriage returns it will only convert that character to a <br /> when it comes back out in the site again. You need the two carriage returns to get it to auto-convert to <p> tags instead.
ps: nice to see another familiar face from the lussumo board. ;)
hey nifkin, knew I knew that name from somewhere ;-)
maybe this was a stupid question in the first place, but here goes...
the reason i ask is that i'm not viewing the posts in wordpress, but in a flash website, as i'm just using wordpress as a basic cms.
in flash, the <br /> results in a new paragraph (that's flash for ya!), so I was just wondering if i could tweak the textarea to reflect this oddity...
AKAIK you cannot control spacing like that individually using current CSS specs... doncha just hate anythiung below CSS3? Correct me if I'm wrong, have been before.
The Wordpress as a CMS for Flash thing, well, it is slightly strange, but as our blog is Wordpress powered, I thought it would be easier for our non-techy marketing people if they could update the news on our website using the same control panel. It also means I can easily build an RSS feed for a Flash website if I want as well.
It's also a project I'm running - http://wordpressmeetsflash.projectpath.com/ - if anyone here wants to get involved - still looking for some people with wordpress plugin experience...
With JavaScript you could definitely do it... If all you are looking for is the visuals for non-techies, that may work. Just maybe an onKeyPress for the enter key... The only thing that would hinder that is if Flash interpreted <p> as different than <br />.