How to remove the "title" attribute that the CKEditor 4 add automatically on inline editing?
Asked Answered
P

9

6

When using CKEditor 4 Inline Editing on a object the CKEditor add a "Title" attribute that include a text and the object id.

e.g. In the CKEditor inline example we can see the next code:

<h2 id="inline-sampleTitle" title="Rich Text Editor, inline-sampleTitle"....>CKEditor<br>Goes Inline!</h2>

I like to remove the "title" attribute because i do not like the user to see it (my id is more complicated :) ).

Note: I was trying to remove it manually after the CKEditor create it using jQuery "removeAttr" function but this solution is not really good for me because in IE browsers the user still see it in the first time and it will remove only after the user mouse out from the object.

Presumably answered 6/2, 2013 at 14:1 Comment(1)
possible duplicate of How can I change the title ckeditor sets for inline instances?Winstead
S
11

CKEDITOR.config.title = false;

For More Details Visit this

Spurge answered 12/4, 2014 at 16:2 Comment(3)
You may want to add more detail to your answer; it is not very clear as it is now.Wiltz
Reference link just Updated.Spurge
The link in the answer is useless; here's the link to the property itself: docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-titleArchilochus
I
1

You can find here some details: How can I change the title ckeditor sets for inline instances?

Unfortunately, you cannot change it without modifying the code. I reported ticket for this http://dev.ckeditor.com/ticket/10042

Intrastate answered 7/2, 2013 at 9:24 Comment(1)
Thanks, I will wait for them to fix it.Presumably
U
1

See https://mcmap.net/q/1633125/-how-to-prevent-ckeditor-from-setting-the-title-to-its-iframe - looks like you can manually set the "title" attribute of the editor element to override the tooltip.

Underproduction answered 14/4, 2013 at 16:2 Comment(0)
R
1

in your config

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config
    config.title="";
}
Roma answered 13/12, 2013 at 8:56 Comment(0)
P
1

CKEditor fix it in version 4.2 so we can remove this fix now :) http://dev.ckeditor.com/ticket/10042

Presumably answered 13/12, 2013 at 15:28 Comment(0)
T
0

You can put in ckeditor config object function that will delete the title after editor is initialized:

on: {       
        instanceReady: function(event){
            $(event.editor.element.$).attr('title','');
        },
},
Teyde answered 10/5, 2013 at 20:42 Comment(0)
C
0

You can use this code in order to delete the title on every CKEDITOR will be created.

CKEDITOR.on('instanceReady',function(event){$(event.editor.element.$).attr('title','');});
Chainey answered 19/9, 2013 at 11:4 Comment(0)
R
0

i tried this in my codeigniter view page and it works for me. also i used my own custom tooltip for my users.

CKEDITOR.inline( 'ckeditor' );
CKEDITOR.config.title = false; // or you can use own custom tooltip message.


thanks
Braham Dev Yadav

Rata answered 22/5, 2014 at 11:46 Comment(0)
S
0

I have tried using

CKEDITOR.config.title = false;

but it still persist showing title.

After some research, what I done is:

1.Go to ~/ckeditor/lang/en-gb.js remove out 'editorHelp' value

2.Assign language and title, same as below:

CKEDITOR.editorConfig = function( config ) {
config.language="en-gb";
config.title="Put your title here"; //cannot put blank, it will display "null"
Showy answered 2/11, 2016 at 5:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.