+ Reply to Thread
Results 1 to 2 of 2




  

Thread: Very very basic & crossbrowser rich-text editor

      
  1. #1
    I'm New! orhuns is on a distinguished road
    Join Date
    December 16, 2009
    Posts
    2
    Rep Power
    0
    Feedback Score
    0

    Default Very very basic & crossbrowser rich-text editor

    i want to make an very very basic rich-text editor, which works in all browser types.

    i have the code at below.. but it only works on -8 IE browsers.
    could someone help me to make this code crossbrowser..

    Code:
    <script type="text/javascript">
    <!--
        function formatText (tag) {
            var selectedText = document.selection.createRange().text;
            
            if (selectedText != "") {
                var newText = "[" + tag + "]" + selectedText + "[/" + tag + "]";
                document.selection.createRange().text = newText;
            }
        }
    //-->
    </script>
    
    <form name="my_form">
        <textarea name="my_textarea"></textarea><br />
        <input type="button" value="bold" onclick="formatText ('b');" />
        <input type="button" value="italic" onclick="formatText ('i');" />
        <input type="button" value="link" onclick="formatText ('link');" />
    </form>

  2. #2
    Jedi Master antwerp is on a distinguished road
    Join Date
    December 18, 2009
    Posts
    17
    Rep Power
    3
    Feedback Score
    0

    Default Re: Very very basic & crossbrowser rich-text editor

    I'd recommend you to install firebug ( a firefox extension ) and see where's the error

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Your Niche Will Make You Rich
    By maxlazer in forum Work at Home
    Replies: 4
    Last Post: May 31st, 2010, 4:46 am
  2. Casino cash - I'm rich!
    By marsguitars in forum Forum Lounge
    Replies: 22
    Last Post: Jan 20th, 2009, 12:31 am
  3. Replies: 3
    Last Post: Sep 30th, 2008, 5:43 pm
  4. 2 Content Rich Blogs
    By silverwebworks in forum Websites
    Replies: 7
    Last Post: May 23rd, 2008, 1:02 pm

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
WebTalkForums
WebTalkForums
Recent Forum Threads