[英]CKEDITOR : storing wordcount value to a variable
CKEDITOR:如果我通過了textarea的內容,我有一個表格和一個textarea(替換為ckeditor)我如何獲得wordcount值? 我在ckeditor中使用wordcount插件。 謝謝
//how do i store the wordcount?
CKEDITOR.replace('textarea', {
extraPlugins: 'wordcount,justify'
});
//how do i get the wordcount ?
<?= form_input($title,set_value('title')) . "</br>"; ?>
<textarea name="textarea" id="text" required></textarea>
<?= form_close(); ?>
//in php $text = $this->input->post('textarea'); //$textwordcount = wordcount of the textarea;
也許你可以用我的把戲
$text = strip_tags($this->input->post('textarea'));
$words = count(explode(' ',$text));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.