若 UEditor 的 name 與 id 都是 myEditor,可使用 UE.getEditor('myEditor').getContent() 取得內容。
UE.getEditor('myEditor').getContent()
頁面中的 textarea 可設定 name 與 id 為 myEditor。在較新版本的 UEditor 中,常會以 getEditor 建立或取得編輯器實例。
若要在表單送出前同步內容,可監聽 submit 事件,將 getContent() 的結果寫回 textarea 或隱藏欄位,方便後端接收。