Trying to Integrate Jeditable + MarkItUp and Thickbox / Lightbox

I was able to successfully integrate MarkItUp with Jeditable based on the instructions on these two sites. However, I would like the Jeditable / MarkItUp editing window to appear in the Thickbox or Lightbox overlay. So far, my attempts to do this have failed.

So, at the moment I have a standard code:

$.editable.addInputType('markitup', {
    element : $.editable.types.textarea.element,
    plugin  : function(settings, original) {
        $('textarea', this).markItUp(settings.markitup);
    }
});

$(".editme").editable("/content/save", {
    event   : 'dblclick',
    type      : 'markitup',
    submit    : 'OK',
    cancel    : 'Cancel',
    width     : 640,
    height    : 'auto',
    tooltip   : 'Double-click to edit...',
    onblur    : 'ignore',
    markitup  : mySettings
});

I found other messages here that show how to bring up the editing window by clicking on the link rather than the object itself, and I tried to integrate this with Thickbox calls, but to no avail.

It is amazing that someone is pointing me in the right direction. Thank!

+3
source share
1 answer

, , jeditable markitup, "" .

( ) , , dom. DOM ( ) ( /), dom.

jquery live. , (jeditable markitup), , , . jquery live :

$('a.cool').live('click',function(){
    // Do something cool
});

, DOM, .

, Google jQuery live jeditable markitup ( , ), . jeditable, , , :

// Change this:
$(this).bind(settings.event, function(e) {
// Into this:
$(this).live(settings.event, function(e) {

unbind:

// change this:
.unbind($(this).data('event.editable'))
// Into this:
.die($(this).data('event.editable'))

, , markitup. .

+2

Source: https://habr.com/ru/post/1737597/


All Articles