Hi Brian,
Thank you for contacting Syncfusion support.
Yes, it is possible. We need to bind double click event handler for the RTE’s Iframe and using that event we need to trigger any event in the parent window, where we need to set the allowEditing property in RTE to true. Kindly refer to the following code.
|
<div style="padding:10px">
<textarea id="rte"> This is test content </textarea>
</div>
<script>
var rteObj;
$(function(){
$("#rte").ejRTE({ allowEditing: false, create:"oncreate" });
$(document).on("dblclick", function(e) {
rteObj.setModel({ allowEditing: true});
});
});
function oncreate() {
rteObj = this;
var $head = this._rteIframe.contents().find("head");
var script = "<script> document.addEventListener('dblclick', function(e){ parent.$(parent.document).trigger('dblclick'); }); <\/script>";
$head.append(script);
}
</script> |
Regards,
Prince