【やりたいこと】
CKEditorのテキストボックス内に初めから文字を入力したい。
http://ckeditor.com/
【困っていること】
DOMをどうやって指定すればいいのかわからない
以下ソース(一部割愛)
<div class="container"> <form action="confirm.php" method="POST" onsubmit="insertCKE()"> <div class="form-group"> <label for="title">タイトル</label> <input type="text" name="title" class="form-control" placeholder="title" value="<?php echo $return_title;?>"> </div> <div class="form-group" id="text_form"> <label for="text" value="test">内容</label> <div id="editor"></div> <!--ここがCKEditorの表示部分です--> <input type="hidden" name="id" value="<?php echo $result?>"> <input type="hidden" name="text1" value="hello" id="text1"> </div> <input type="submit" value="更新" name="c"> <input type="submit" value="保存" name="h"> </form> </div> <script src="https://cdn.ckeditor.com/4.5.6/standard/ckeditor.js"></script>
上記のソースが投稿内容を編集しなおす⇒投稿内容を編集できるよう入力欄に表示させる
といった画面にしたいのですが、
CKEditorのテキストエリア内にDOMを指定する方法がわかりません。(TT)
ちなみに中身を吐き出すときは
var confirmText = CKEDITOR.instances.editor.getData();
で出力することが出来ました。
どなたかご存知のかたはいらっしゃらないでしょうか....
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/23 16:46