var source = UE.getEditor('source');
UE.Editor.prototype.placeholder = function (justPlainText) {
var _editor = this;
_editor.addListener("focus", function () {
var localHtml = _editor.getPlainTxt();
if ($.trim(localHtml) === $.trim(justPlainText)) {
_editor.setContent("");
}
});
_editor.addListener("blur", function () {
var localHtml = _editor.getContent();
if (!localHtml) {
//_editor.setContent('<p style="color: #CDCDCD">' + justPlainText + '</p>');
_editor.setContent(justPlainText);
}
});
_editor.ready(function () {
_editor.fireEvent("blur");
});
};
source.placeholder("此处输入问题描述,请在附件中上传图片……");
<script id="source" name="workTask.description" type="text/plain" style="width:99%;height:300px" >${workTask.description}</script>