Edit in place with tinyMCE

Discussion in 'Javascript' started by RonY, Apr 8, 2007.

  1. RonY

    RonY Guest

    Hi all,

    I am trying to find out an edit in place with tinyMCE support, so that
    users can click on content and change it without any refresh page.

    I have found some script that use prototype and a script called
    eip.js, but i would like to know how to incorporate the tinyMCE editor
    when the user - here is the link [
    http://www.nick-dunn.co.uk/blog/2006/08/animating-editinplacejs-with-...
    ]

    Does any know how or where to integrate the tinyMCE editor?

    Here is my code:

    +++++++++++++++++++++++++++++++++

    <script type="text/javascript" src="prototype.js"></script>
    <script type="text/javascript" src="moo.fx.js"></script>
    <script type="text/javascript" src="editinplace.animated.js"></
    script>
    <script language="javascript" src="../tinymce/jscripts/tiny_mce/
    tiny_mce.js"></script>
    <script type="text/javascript">
    tinyMCE.init( {
    theme:"advanced",
    mode: "exact",
    elements : "content(151-25)"
    })

    Event.observe(window, 'load', init, false);
    function init() {
    // Overide the default saving_text and add the animated
    GIF and saving message
    EditInPlace.defaults["saving_text"] = "<img
    src='indicator.gif' /><span class='eip_" +
    EditInPlace.defaults["saving_class"] + "'>Saving
    changes, please wait.</span>";
    // Set the save_url to a CF page (which simply returns the
    saved content as plain text)
    EditInPlace.defaults["save_url"] = "update.cfm";
    // Make the editableText
    EditInPlace.makeEditable( { id:'content(151-25)', type:
    'textarea', cols: '100' } );
    EditInPlace.makeEditable( { id:'price(151-25)' } );
    }
    </script>

    <div id="content(151-25)" title="Click to edit"> HERE IS THE CONTENT
    </
    div>
    <span id="price(151-25)" title="Click to edit">36</span>

    +++++++++++++++++++++++++++++++++

    But i want to load the tinyMCE when the user clicks to edit the field
    NOT upon page load, as what is happening now.

    Thanks heaps guys,
    RonY, Apr 8, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Manfred W

    tinymce

    Manfred W, Aug 12, 2005, in forum: Java
    Replies:
    2
    Views:
    556
    Roedy Green
    Aug 12, 2005
  2. Replies:
    3
    Views:
    434
    Oliver Wong
    Jul 19, 2006
  3. jsimon
    Replies:
    0
    Views:
    365
    jsimon
    Dec 13, 2006
  4. Ravi Katta

    tinyMce validation problem?

    Ravi Katta, Aug 26, 2008, in forum: Ruby
    Replies:
    1
    Views:
    189
    Mark Thomas
    Aug 26, 2008
  5. Installing TinyMCE Help

    , Jun 5, 2007, in forum: Javascript
    Replies:
    8
    Views:
    176
Loading...

Share This Page