Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4324920
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:11:51+00:00 2026-05-21T09:11:51+00:00

I’m using the Edit-in-Place JQuery plugin, JEditable: http://www.appelsiini.net/projects/jeditable . I would like to use

  • 0

I’m using the Edit-in-Place JQuery plugin, JEditable: http://www.appelsiini.net/projects/jeditable.

I would like to use TinyMCE when editing, so I found some extra script to make it work: http://sam.curren.ws/index.cfm/2008/6/12/jEditable-TinyMCE-Plugin.

The problem I’m having is that, either JEditable or TinyMCE crashes the first time I try to edit something — but it works perfectly afterwards! Specifically, when I first click the area to edit, TinyMCE loads, but when I clicked on the textarea, the textarea vanishes and becomes the div I was about to edit (as if I never clicked to edit). However, afterwards, the plugin works perfectly unless I refresh the page.

CODE

        <script type="text/javascript" src="jscripts/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> <!-- TinyMCE -->
        <script type="text/javascript" src="jscripts/jquery-1.5.1.min.js"></script> <!-- JQuery-->
        <script type="text/javascript" src="jscripts/jquery.jeditable.mini.js"></script><!-- JEditable plugin-->
        <script type="text/javascript" src="jscripts/jquery.tinymcehelper.js"></script>
        <script type="text/javascript" src="jscripts/jquery.company.js"></script>
<div class="editable_textarea">Edit this div</div>

What’s happening is that when I click on the text “Edit this div”, TinyMCE loads. But then when I click on the textarea, the textarea vanishes and I just see the text “Edit this div” (as if I didn’t click to edit-in-place). I only have this problem when I load/refresh the page. Afterwards, everything works perfectly.

This is my code for jscripts/jquery.tinymcehelper.js (exactly the same as in http://sam.curren.ws/index.cfm/2008/6/12/jEditable-TinyMCE-Plugin):

$.fn.tinymce = function(options){
   return this.each(function(){
      tinyMCE.execCommand("mceAddControl", true, this.id);
   });
}

function initMCE(){
   tinyMCE.init({
        mode : "textarea",
        theme: "advanced",
        height: "100",
        plugins: "table, tinyautosave, imagemanager, spellchecker, autoresize",
        theme_advanced_buttons1_add_before : "tinyautosave, code, separator, delete_table",
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,fontsizeselect,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,code,|,forecolor,backcolor,|,insertimage,spellchecker",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left"
    });
}

initMCE();

$.editable.addInputType('mce', {
   element : function(settings, original) {
        var textarea = $('<textarea id="'+$(original).attr("id")+'_mce"/>');
        if (settings.rows) {
           textarea.attr('rows', settings.rows);
        } else {
           textarea.height(settings.height);
        }
        if (settings.cols) {
           textarea.attr('cols', settings.cols);
        } else {
           textarea.width(settings.width);
        }
        $(this).append(textarea);
           return(textarea);
        },
        plugin : function(settings, original) {
           tinyMCE.execCommand("mceAddControl", true, $(original).attr("id")+'_mce');
           },
        submit : function(settings, original) {
           tinyMCE.triggerSave();
           tinyMCE.execCommand("mceRemoveControl", true, $(original).attr("id")+'_mce');
           },
        reset : function(settings, original) {
           tinyMCE.execCommand("mceRemoveControl", true, $(original).attr("id")+'_mce');
           original.reset();
   }
});

Finally, this is my “customization” code:

// Jeditable customization
$(function(){
       $(".editable_textarea").editable('ajax/save.php?editnotetext',
        {
          type : 'mce',
          indicator : 'Saving...',
          tooltip : 'Click to edit...',
          name : 'note_text',
          submit : 'OK',
          cancel : 'Cancel',
          height : '100px'
       });
      $(".dblclick").editable('ajax/save.php?editnotename', { 
        tooltip   : 'Doubleclick to edit...',
        indicator : 'Saving...',
        event   : 'dblclick',
        name : 'name',
        style   : 'inherit'
      });
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:11:52+00:00Added an answer on May 21, 2026 at 9:11 am

    The first thing I noticed is that your initMCE() method isn’t exactly the same as in the link (I couldn’t get to the site, but was able to pull it up from Google cache). Specifically, the mode should be none.

    Looking at the TinyMCE docs, it would seem that mode: 'textarea' is meant for auto attaching to <textarea> elements. Whereas, mode: 'none' is meant for programatically adding the editor to a field, which is what the JEditable plugin is trying to do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.