Are there any alternatives out there that truly allow rich text formatting in a text box-like object? The functions that this board has are fairly simple to create and I have replicated them myself. I have seen commercial rich text boxes, but I have not seen any open-source/freeware versions to date.

    I am currently working on my own editor, but dont know when I will release it

    features today are
    bold, italic, underline, lists, text color, text size, text alignment
    Insertion of images and tables (with update attribute posibilities)
    etc. etc.

    A good start to learn how to build an wysiwyg editor for the Windows enviroment take a look at the articles at the MSDN dev. network

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/editing/editing_entry.asp

    also take a look here for a list of comercial and GPL editors here:

    http://www.bris.ac.uk/is/projects/cms/contribute/

    regards Thomas

      If this is what it takes to make a decent text box, I might just stick with the styling used by this forum. I would like to make it available to everyone without any downloads or special plugins. I can always make an ActiveX control or Java applet to do this, but I am trying to keep page size to a minimum.

        Ì thînk yøùr bést bét îs tø ùsé ã Jãvã ãpplét. Yés, thé fîrst tîmé ã ùsér løãds thé pãgé, ît wîll tãké møré tîmé, bùt îf ît's ã pãgé thãt's ùséd ãll thé tîmé, sùbséqùént ãccéss tø thé pãgé wîll nøt tãké thãt løng, sîncé thé Jãvã ãpplét wîll bé cãchéd. Jãvã îs sùppørtéd by énøùgh brøwsérs tø wãrrãnt thé ùsãgé, ÌMØ.

          Well, not that you mention the caching, it's not such a bad idea. I had not even thought of that. Thanks, Java may be the route I choose now.

            are you wanting something along the lines of when you use the textbox in say hotmail sending messages?

              If it is something similar to what Yahoo! formally used, then it's exactly what I'm looking for (maybe with a little less features).

                you may want to download this webmail client:

                http://www.nuralstorm.net/software.php

                it has hotmail-like features for sending emails, you may be able to use it to try what you are doing, it is a function called bbstyle for the body textarea:

                it has:

                bold, italic, underline, font, bodytag, tables, titles, img, link

                and you can select parts of the message and click bold, and it will wrap that around only what you selected(like phpBB does, so you could probably get it from there also)

                  I hate using other people's components (I know that's part of the beauty of open-source, but I am very stubborn sometimes.) I think what I might just do is to create a text box like in this forum and set up a "Live Preview" sort of thing in an <iframe>. Hmmm......any suggestions there?

                    I agree, sometimes you have to do it yourself, but looking at others code for learing is a great idea.

                    Another Idea is to have a TEXTAREA and copy the value of that TEXTAREA to eg. an DIV, IFRAME or whatever using innerHTML,
                    this should be highly accessable.

                    SIMPLYFIED EXAMLPLE:

                    <TEXTAREA ID="myTextArea" cols=80 rows=12 onKeyUp="Javascript: document.etc.etc.myDIV.innerHTML=document.etc.etc.MyTextArea.value">

                    <DIV id="myDIV"></DIV>

                    Regards Thomas A

                      Thank you, Thoand, this sounds like the best idea for me. I download the NuralStorm mail program, found the bbstyle() function, but could not decypher what it was doing. No comments, and a lot of external function calls. Does anyone else have an example that can update text inside a textbox, rather than only at the end of the input like this forum.

                        well that bbstyle is fairly simple, it is just taking care of whatever you clicked, and checking to see if you have selected anything before you clicked, whatever you click on, say the bold button, it passes a number to the function, thats why it is bbstyle(number), it then uses if's etc... to look for the number and process it

                        for example when clicking on the bold button, it says this:

                        onClick="bbstyle(0)"

                        in the button tag, and that sends the 0 back to the function to process it

                        get the idea now, if not you may want to look into something else

                          Yeah yeah, I understand most of how the function begins and always what is output, but I don't understand the queue or stack they seem to implement to determine where the cursor is. That's the main part this is stumping me.

                            that would be this, its property you can get with javascript


                            if ((clientVer >= 4) && is_ie && is_win)
                            theSelection = document.selection.createRange().text; // Get text selection

                            if (theSelection) {
                            	// Add tags around selection
                            	document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
                            	document.compose.body.focus();
                            	theSelection = '';
                            	return;
                            }

                              Oh ok, I didn't know that existed. Does this work with Netscape (R.I.P.) or Mozilla, because I noticed you checked for I.E. only?

                                first of all, i didn't write the webmail client, and secondly,...

                                it works in Mozilla Firebird(0.6), and kinda works in Nutscrape 7 (it won't do the selection, but if you click once on the bold, it will open it, then if you click it again, it will close it)

                                  The answer is no!
                                  Have been fooling around with this to long now 🙂

                                  Because there are a some differences on how browseres handles selections, however you can get around this (see the URL below)

                                  NOTE: None of the Machintosh browsers has implemented methods etc. for selections (maybe Mozilla for OSX, have not tried it out yet)

                                  If you want text editing features that work across all platforms you only have one choise I think: JAVA applets

                                  About selections in IE and Netscape

                                  best regards Thomashttp://www.webreference.com/js/column12/index.html

                                    If there is one thing that pisses me off more than any else in web design, it is the fact that web browsers are so incompatible on some issues. Thanks for the link, Thoand, this is a great explanation. Thanks all, I'll leave this post unresolved until I can get my form working.

                                      yeah well, that article is in reference to nutscrape 4.x and IE 4.x, both of which are antique and generally not even considered anymore

                                      both only have a 1% market share as of may 2003

                                      http://www.thecounter.com/stats/2003/May/browser.php

                                      [edit]but yes, it only works REALLY well in IE, you lose some functionality in selection in others, but still seems to outperform vbulletins implementation, IMO[/edit]

                                        Write a Reply...