jQueryを使用したASP.NETMVC3でのWYMEditorの使用について質問があります。WebページのWYMEditorでデフォルトのテキストを設定したいのですが。私がそのようにしている場合:
<script type="text/javascript">
jQuery(function() {
jQuery(".wymeditor").wymeditor( { html : '<strong>some text</strong>'});
});
問題はなく、wymeditorは適切な形式のテキストを表示しますが、私はそのように試していますか?
<script type="text/javascript">
jQuery(function() {
jQuery(".wymeditor").wymeditor( { html : '@ViewBag.HtmlText'});
});
(HtmlTextは私が保持する場所で可変です: <strong>some text</strong>
)WymEditorはフォーマットされていないテキストを表示します<strong>some text</strong>
。HtmlEncodingなどを試しましたが、動作しません。