Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Content management system


Message #1 by bmcelhany@h... on Wed, 13 Feb 2002 17:50:55
contenteditable=true
actually someone provided a really good example of this last week...

-----Original Message-----
From: Phil Sayers [mailto:philipsayers@m...]
Sent: Wednesday, February 13, 2002 12:50 PM
To: javascript
Subject: [javascript] RE: Content management system


Since it's an intranet,

Can you take advantage of the MSHTML editing in the browser (IE only)

Basically you use a <DIV> tag with a property I think it's editable=true

Then you can provide javascript/DHTML buttons.

Hold on...

Here's an MSDN link
MSDN Home >  MSDN Library >  HTML and Dynamic HTML >  Scriptable Editing
>  OverViews/Tutorials > Creating Editable Webpages..

-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...] 
Sent: Wednesday, February 13, 2002 5:51 PM
To: javascript
Subject: [javascript] Content management system

Hi,

I have an online form that allows users to enter content for a web page.

The data is saved to a database and then displayed (via an ASP page) on 
our intranet site. What I'd like to do, is give users the ability to add

basic formatting (bold, headers, font color, paragraphs, etc.) without 
requireing them to understand any HTML.

Right now, I've got buttons (bold for example) that when clicked add the

<b> and </b> tags to the end of what they're typing in the textbox. This

obviously requires them to place the cursor between the two tags and
type 
in the text that they want bolded. As easy as this sounds, I've found
from 
experience that even this may be too much to ask.

My questions are: 1) is there a way, using JavaScript to append the 
necessary start and end tags to the text in the text box, and then have 
the cursor automatically "backed up" the necessary number of spaces? 2)
Is 
there any way to actually DISPLAY the format (i.e. when they hit 
the "bold" button, they will acutally see bold text on their data entry 
screen)?

Thanks in advance for any ideas!

Brian
$subst('Email.Unsub').



  Return to Index