У меня есть старый код, который мне нужно быстро обновить, мне нужно заменить старый fckeditor новым ckeditor. вот мой Javascript для вызова FCKeditorОбновление от fckeditor до ckeditor
<script type="text/javascript">
{
function swap_to_wysiwyg_short_description()
{
var oFCKeditor = new FCKeditor('short_description') ;
oFCKeditor.BasePath = 'fckeditor/' ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
document.getElementById('short_description_button').style.visibility = "hidden";
oFCKeditor.ReplaceTextarea() ;
}
}
</script>
это вызывает файл JavaScript:
fckeditor/fckeditor.js
Я думаю, вместо того чтобы изменить все мои файлы HTML я мог просто редактировать FCKeditor и сделать этот вызов CKEditor?
вот новый код для вызова CKEditor:
<script>
CKEDITOR.replace('short_description', {
filebrowserBrowseUrl: '/store/admin/kcfinder/browse.php',
filebrowserUploadUrl: '/store/admin/kcfinder/upload.php'
});
</script>
Как я могу изменить FCKeditor/fckeditor.js вызвать CKEditor без необходимости менять всю свою HTML-страницу?
Я знаю, но это очень старый код :( – user1398287