SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Guru dale_burrell's Avatar
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Formatting Input Data

    Hi,

    Is there any way to allow user to enter formatted text (i.e. bold, italics, large etc) without them having to know about HTML?

    IE provides a proprietary method, the CONTENTEDITABLE tag, but I'm looking for a more general solution.

    Thanks,

    Dale

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    <html
      <
    head
        <
    title></title
        <
    script type="text/JavaScript"

          function 
    Init() 
          { 
            
    iView.document.designMode 'On'
          }

          function 
    boldIt() 
          {
            
    iView.document.execCommand('bold'falsenull); 
          } 
        
    </script> 
      </head>

      <body onLoad="Init()"> 
        <iframe id="iView" style="width: 200px; height:70px"></iframe><br /><br />
        <input type="button" onClick="boldIt()" value="Toggle Bold"> 
      </body> 
    </html> 
    for more info look here

    http://www.devguru.com/features/tuto.../wysiwyg1.html

    heres an example
    http://www.devarticles.com/supportfile.php?articleId=90

    hope that helps

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, that's still IE only.

    You (currently) cannot create a fully cross-browser WYSIWYG HTML editor unless you use Java.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


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
  •