2016-09-13 5 views
0

jquery-textcompleteをckeditorとtinyMCEと統合しようとしました。jQuery-textcomplete CKEditor/TinyMCEとの統合

このエラーが発生しました。

TypeError: CKEDITOR.instances.issue_notes is undefined 

あなたは私のCKEditorバージョン/ TinyMCEのでjQueryの-textcompleteを統合するための少しの助けを与えることができます。あなたはhttps://jsfiddle.net/btjapqkp/

HTML、ここでのサンプルコードを見ることができます。これは、ある

<script src="https://code.jquery.com/jquery-3.1.0.js" type="text/javascript"> 
</script> 
<script src="https://cdn.ckeditor.com/4.5.10/standard/ckeditor.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.5.10/adapters/jquery.js"> 
</script> 

はJavaScript

$(document).ready(function(){ 
    tinymce.init({ selector:'#three' }); 
    $('#two').ckeditor(); 
    $('.editable').textcomplete([{ 
    match: /(^|\b)(\w{2,})$/, 
    search: function (term, callback) { 
     var words = ['google', 'facebook', 'github', 'microsoft', 'yahoo']; 
     callback($.map(words, function (word) { 
     return word.indexOf(term) === 0 ? word : null; 
     })); 
    }, 
    replace: function (word) { 
     return word + ' '; 
    } 
    }]); 
}); 

答えて

0

のでjqueryの-textcompleteのバグ。その問題を解決するには、下のURLを見てください。近い将来、このソリューションはjquery-texcompleteにマージされます。それでは、あなたは腹を立てて解決する必要はありません。

https://github.com/yuku-t/jquery-textcomplete/issues/285