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 [

    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 language="javascript" src="../tinymce/jscripts/tiny_mce/
    <script type="text/javascript">
    tinyMCE.init( {
    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)' } );

    <div id="content(151-25)" title="Click to edit"> HERE IS THE CONTENT
    <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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.