I am using jquery-ui tooltip and tinimce 4,
the problem is when tinymce is loaded in a textarea there is the title attribute "Rich Text AreaPress ALT-F10 for toolbar..."
that display a jqueryui tooltip all the time.
I have tried to remove the title with js, but nothing changed:
document.getelementbyid('message_ifr').RemoveAttribute('title');
Is there a way to remove the title from tinymce or the jqueryui tooltip on the textarea?
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 tooltip code:
$(function() {
$( document ).tooltip({
content: function() { return $(this).attr('title'); } // br
});
});
And if you would like to remove only a special instance of TinyMCE, you can also pass the appropriate ID: Of course, you can also use other selectors such as classes, for example. Older versions of TinyMCE can be removed using the line tinyMCE.execCommand ('mceRemoveControl', false, 'myid'), where you have to adjust "myid".
The regular expression (also called regex) can then change the attributes to remove style. TinyMCE’s APIs offer the main methods to get content, and remove style from the content with regular expressions or other means. The tinymce.activeEditor.getContent is a common and reliable method to get content from TinyMCE.
If you only would like to remove the editors, that are bind to textareas or divs, you can use one of the following commands: And if you would like to remove only a special instance of TinyMCE, you can also pass the appropriate ID: Of course, you can also use other selectors such as classes, for example.
When you sign up for a FREE API key, you not only receive access to premium plugins for 14 days, but for that same period you also receive support for your project development. Get your FREE TinyMCE API key today for your app!
I have just figured out the correct solution for my problem:
(thx to: raina77ow for this fiddle )
STEP 1:
after the 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 tooltip function from document to '[title]', like this:
$(function() { $( '[title]' ).tooltip({ content: function() { return $(this).attr('title'); } }); });
tinymce.init({
setup: function( editor ){
editor.on('init', function( e ){
$('#' + e.target.id + '_ifr').removeAttr('title');
});
}
});
Used jQuery !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With