I am trying to make a rich text editor situated in a dialog box, manually re-sizable(with mouse). Is there any dojo widget to bring it about?
Here is my code:
<div data-dojo-type="dijit/Dialog" data-dojo-id="myFormDialog" title="Editor">
<div class="dijitDialogPaneContentArea" data-dojo-attach-point="name">
<label id="editorLabel" for="name"><b>Insert your explanation below: </b></label>
<input id="editorInput" type="hidden" name="editorContent" data-dojo-attach-point="name" style="display:none" />
<div id="editorContent" dojoType="dijit/Editor" height="200px" extraPlugins=" ['createLink', 'unlink', 'insertImage'] "></div>
</div>
</div>
<button id="editorButton" data-dojo-type="dijit/form/Button" type="button" iconClass="dijitNoIcon" onclick="myFormDialog.show()" height="">Show Editor</button>
我没有找到dojo小部件,但是在css文件中添加此行就像是一种魅力:
.claro .dijitEditorIFrame{ resize:both; }
Use the following CSS, which enforce resize
on your textarea
.
textarea {
resize: both !important;
}
Live Example: https://jsfiddle.net/esrcju2p/7/
You can read more about resize
property here: http://www.w3schools.com/cssref/css3_pr_resize.asp
require(["dijit/form/Textarea", "dojo/domReady!"], function(Textarea){
var textarea = new Textarea({
style: "resize:both",
name: "myarea",
value: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.",
style: "width:200px;"
}, "myarea").startup();
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.