作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在努力设置 JHTML Area 的值。但没有运气。任何人都可以帮助我。我已经阅读了很多文章,但我没有找到任何关于它的内容。我也在这里搜索并发现了一个问题,但没有解决方案。
任何帮助,将不胜感激。
感谢致敬,
泽山
最佳答案
我已经解决了。在对 textarea 调用 JHTMLArea 方法之前,先复制 textarea 中的值,然后应用 htmlarea 函数。
$("#txtNotes").val($('#hdnNotesDescription').val());
$("#txtNotes").htmlarea(
{
// Override/Specify the Toolbar buttons to show
toolbar: ["bold", "italic", "underline", "link", "unlink", "orderedlist", "unorderedlist", "indent", "outdent", "justifyleft", "justifycenter", "justifyright"],
toolbarText: $.extend({}, jHtmlArea.defaultOptions.toolbarText,
{
"bold": "Bold",
"italic": "Italic",
"underline": "Under Line",
"link": "Hyperlink",
"unlink": "Remove Hyperlink",
"orderedlist": "Numbering",
"unorderedlist": "Bullets",
"indent": "Increase Indent",
"outdent": "Decrease Indent",
"justifyleft": "Align Text Left",
"justifycenter": "Center",
"justifyright": "Align Text Right"
}),
loaded:function(){
}
});
关于jhtmlarea - 如何在 JHTMLarea 中动态设置值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6174771/
我是一名优秀的程序员,十分优秀!