2013-02-06 39 views
4

当在一个对象上使用CKEditor 4 Inline Editing时,CKEditor添加一个“Title”属性,其中包含一个文本和对象ID。如何删除CKEditor 4在内嵌编辑时自动添加的“title”属性?

例如在CKEditor的直列例子中,我们可以看到下一个代码:

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

我想删除“标题”属性,因为我不喜欢的用户可以看到它(我的ID是更复杂的:))。

注意:我试图在CKEditor使用jQuery“removeAttr”函数创建它之后手动删除它,但这个 解决方案对我来说并不是很好,因为在IE浏览器中用户仍然会在第一次看到它,它会 仅在用户将鼠标移出对象后才能移除。

+0

的可能重复[?我怎样才能更改标题的CKEditor集内联实例](http://stackoverflow.com/questions/14502142/how-can-i -change-the-title-ckeditor-sets-for-inline-instances) – AlfonsoML

回答

8

CKEDITOR.config.title = FALSE;

了解更多详情,请访问this

+0

您可能想要在答案中添加更多细节;它现在还不是很清楚。 – mustaccio

+0

刚刚更新了参考链接。 –

+0

答案中的链接是无用的;以下是该属性本身的链接:http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title – Paul

0

你可以把CKEditor的配置对象编辑器功能初始化后,将删除标题:

on: {  
     instanceReady: function(event){ 
      $(event.editor.element.$).attr('title',''); 
     }, 
}, 
0

可以以删除将被创建的每个CKEDITOR标题中使用该代码。

CKEDITOR.on('instanceReady',function(event){$(event.editor.element.$).attr('title','');}); 
1
在你的配置

CKEDITOR.editorConfig = function(config) { 
    // Define changes to default configuration here. 
    // For the complete reference: 
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config 
    config.title=""; 
} 
0

我在笨视图页面尝试这样做,它为我工作。 我也用我自己的自定义工具提示为我的用户。

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


感谢
布拉汉姆开发亚达夫

0

我一直在使用

CKEDITOR.config.title = false; 

尝试,但它仍然存在显示标题。

经过一番研究,我做的是:

1.Go到〜/ CKEditor的/郎/ EN-gb.js删除了 'editorHelp' 价值

2。指定语言和标题,下同:

CKEDITOR.editorConfig = function(config) { 
config.language="en-gb"; 
config.title="Put your title here"; //cannot put blank, it will display "null"