How to remove title attribute from tinymce textarea

I am using jQuery-ui tooltip and tinimce 4,

the problem is when tinymce is loaded into the text box, there is a title attribute "Rich Text AreaPress ALT-F10 for toolbar..." that displays the jqueryui tooltip all the time.

I tried to remove the header using js, but nothing changed:

 document.getelementbyid('message_ifr').RemoveAttribute('title'); 

Is there a way to remove the title from tinymce or the jqueryui hints in the text box?

EDIT:

this is tinymce code:

 tinymce.init({ mode : "exact", elements : "message,notes", plugins: "advlist autolink lists link image charmap hr anchor pagebreak code fullscreen table ", toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image table code fullscreen", menubar: false, statusbar: false, }); 

and jquery-ui hint code:

 $(function() { $( document ).tooltip({ content: function() { return $(this).attr('title'); } // br }); }); 
+9
javascript jquery-ui tinymce
source share
7 answers

I just figured out the correct solution for my problem:

(thanks to: raina77ow for this violin )

STEP 1:

after tinymce integration code add this:

 tinymce.init({ // ... }); var ed = tinymce.activeEditor; var ifr = tinymce.DOM.get(ed.id + '_ifr'); ed.dom.setAttrib(ifr, 'title', ''); 

STEP 2

change the jquery-ui hint function from document to '[title]' , for example:

 $(function() { $( '[title]' ).tooltip({ content: function() { return $(this).attr('title'); } }); }); 
+6
source share
 tinymce.init({ setup: function( editor ){ editor.on('init', function( e ){ $('#' + e.target.id + '_ifr').removeAttr('title'); }); } }); 

Used by jQuery!

+2
source share

This is how you remove the name using js,

 document.getElementById('message_ifr').removeAttribute('title'); 

You tried,

  $(document).tooltip({ content: function () { return $(this).prop('title'); } }); 
+1
source share

If you want to remove the tooltip, you just check the JQueryUI function and add the line at the top:

 $('#cphMain_txtEditor').tooltip('disable'); 

as an example:

  $(function () { $('#HeaderTextBox').tooltip('disable'); $('#cphMain_txtEditor').tooltip('disable'); $(document).tooltip({ position: { my: "center bottom-20", at: "center top", using: function (position, feedback) { $(this).css(position); $("<div>") .addClass("arrow") .addClass(feedback.vertical) .addClass(feedback.horizontal) .appendTo(this); } } }); }); 

here I removed the tooltips from two places, one regular text field (HeaderTextBox) and the TinyMCE editor (#txtEditor), but since I have a main page with content content, I need to add this too (cphMain), so the identifier is cphMain_txtEditor.

0
source share

What I did was not very clean, but it did the job. I opened the main tinymce.min.js, searched for "Rich", found a bit between two commas (.., title = blabla Rich blabla, ...) and deleted it.

Great work, and it does not eliminate any functionality.

0
source share

The problem I had was a hint:

Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help

when running over an instance of TinyMCE.

Rather annoying.

To disable, I just searched tinymce.min.js for the "Rich Text Area" and deleted it.

0
source share

Just do it

$ ('. mce-edit-area iframe'). attr ("title", "");

0
source share

All Articles