Do libertarians have more fun?
|
Home
|
Warnings for the Temporarily Irish
File Under:"Why Didn't I Think of This?"
I stumbled on this really great idea last night: Live Previewing. Take the text you're typing into a textbox or textarea and insert it into a <div> tag somewhere on the page. Update on "onkeyup" events.
You can try it in the comments section right now -- just check "Live Preview" and type some text in the comment field. Add a few HTML tags -- links, images, whatever. It's all instantly previewed. The effect is really only about 5 lines of javascript, with an extra few lines of xhtml.
As a note, this behaves better in Firefox than IE, which spasms around on incomplete tags until they're fully typed in.
What I'd like to do with this is create a
Markdown
style parser so users don't have to know HTML. Maybe combine it with a certain
library
to let users write blog entries in real time directly onto their front pages. Sound good?
3/16/2005 10:36 AM
Weblog
1
[
Close Comments
]
1
This is a "Live Preview" test. What's funny is that the text that shows in the preview frame is more accurate that the text shown when you click "preview" -- it automatically insert linebreaks.
It needs a little tweaking -- the user will always be able to break the page layout or maybe even perform some sort of script injection.
I'm afraid this is what was preoccupying me when I walked into the
coffee shop last night
. Doesn't matter if you're a geek with a problem on the brain or a deer in the high beams, the effect is the same. ;)
Eric
3/16/2005 10:53 AM
Comment On File Under:"Why Didn't I Think of This?"
Name
URL
My Linkblog
My Photos
Latest Tags
Summer
Photo
Storm
Mobile
Haskell
Wedding
Politics
[
View All
]
Archives
2011
2011 July
2010
2010 September
2010 August
2010 July
2010 June
2010 May
2010 April
2010 February
2009
2009 December
2009 November
2009 October
2009 September
2009 August
2009 July
2009 June
2009 May
2009 April
2009 March
2009 February
2009 January
2008
2008 December
2008 November
2008 October
2008 September
2008 August
2008 July
2008 June
2008 May
2008 April
2008 March
2008 February
2008 January
2007
2007 December
2007 November
2007 October
2007 September
2007 August
2007 July
2007 June
2007 May
2007 April
2007 March
2007 February
2007 January
2006
2006 December
2006 November
2006 October
2006 September
2006 August
2006 July
2006 June
2006 May
2006 April
2006 March
2006 February
2006 January
2005
2005 December
2005 October
2005 September
2005 August
2005 July
2005 June
2005 May
2005 April
2005 March
2005 February
2005 January
2004
2004 December
2004 November
2004 October
2004 September
[
Login
]