Question

I want to disable all links in tinyMCE Preview popup, and also need to remove the heading preview from the popup box .

I'm using tinyMCE 4X. preview of tinyMCE Content is done by using preview plug in

Code:

$("body").delegate("#previewMail", "click", function(event) { 
  $.fancybox({ 
    'transitionIn': 'none', 'transitionOut': 'none', 'titlePosition' : 'inside', 'transitionIn' : 'none', 'transitionOut' : 'none', 'content':tinyMCE.activeEditor.getContent(), 
  }); 
}); 
$(document).on('click','.fancybox-inner',function(e){ 
  e.preventDefault(); 
});
Was it helpful?

Solution 2

I am fixed this issue by removing the TinyMCE preview , and now using fancy box for preview.

$("body").delegate("#previewMail", "click", function(event) {

 $.fancybox({ 
'transitionIn': 'none', 
'transitionOut': 'none',
 'titlePosition' : 'inside', 
'transitionIn' : 'none',
 'transitionOut' : 'none', 
'content':tinyMCE.activeEditor.getContent(),
 }); 
}); 

$(document).on('click','.fancybox-inner',function(e){ e.preventDefault(); });

OTHER TIPS

Use preventDefault():

$('#popup a').click(function(e){
   e.preventDefault();
}

Or, use return false:

$('#popup a').click(function(e){
       return false;
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top