fixed CKEditor replace with dynamic JS function