我在jsp頁面上有一個dojo編輯器。 dojo編輯器是必填字段之一,我有一個適當的驗證。有一種情況是一些標籤被追加。在追加時我找不到特定的模式,但在編輯器上選擇並複製所有內容和粘貼後發生的大部分時間。因此,在這種情況下,編輯內容爲將標籤添加到dojo編輯器內容
<div id="dijitEditorBody">content which user entered</div>
問題:當用戶刪除其進入的標籤仍然存在並得到提交的所有內容。在這種情況下ATLEAST視覺編輯器有沒有內容,但該領域存在以下值:
<div id="dijitEditorBody"></div>
或
<div id="dijitEditorBody"><br /></div>
所以跳過驗證並顯示當數據從數據庫中檢索一個空的編輯器?
我很困惑爲什麼這些標籤被追加?
我不知道我明白...爲什麼你粘貼HTML代碼到編輯器中? – Philippe 2011-12-19 18:07:00
@Phillipe對於混淆,我很抱歉。我沒有在編輯器中粘貼html代碼。在這種情況下,「編輯器內容」正被複制並粘貼到編輯器中。這個內容沒有這個div標籤。但是在提交時我發現編輯器內容附加了一個div標籤。我不確定這個div標籤是從哪裏來的。 – SJ11 2011-12-19 18:34:45
你用什麼版本的dojo? – Philippe 2011-12-19 18:42:29