SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm currently working on an online content management system which allows users to edit html-pages without seeing the HTML-tags.

    Is it possible to use buttons for text formatting? I would like to have buttons for adding a link and adding headers. But without showing the user the html-tags.

    Could anyone help me with this problem? Any help would be appreciated!

    J.

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    D¨n ╔ideann, Alba
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, there's a solution (I think) but it requires IE5+. i'll get back to you on this.


  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    D¨n ╔ideann, Alba
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, Im gonna give u the jist of the solution since i don't really have time to go right into it.

    Basically, what u need to do is to define an area of your page as being contentEditable, which allows users to actually type over the contents of a specified zone. To embolden a word, the user would drag the mouse over that word (just like in a wordprocessor) and then click on a button to make that textRange bold.

    While this is going on, the contents of the editable zone would be copied to an hidden field, including the added formatting tags. Click on a button/hyerplink to upload/submit to database/CGI script.

    I'm 80% sure this can be done, and will probably try it myself, just not right now.

    As u can imagine, this would be on helluva script to code, so if u do attempt it, tell us how u get on. The results (if successful) should be quite impressive!

    Go here to find out more about the contentEditable property of IE5+ ...

    http://msdn.microsoft.com/workshop/c...or/default.asp
    Last edited by Scot-Bot; Mar 27, 2001 at 06:52.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •