SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: online text formatting?
-
Mar 22, 2001, 12:26 #1
- 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.
-
Mar 27, 2001, 05:29 #2
- 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.
-
Mar 27, 2001, 07:50 #3
- 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.aspLast edited by Scot-Bot; Mar 27, 2001 at 07:52.
Bookmarks