Hello,
I have a RTE control being displayed in a modal form. The problem is that the text area is not editable. I can click on the toolbar buttons, but not enter any text.
Serching the forum, I found the sugestion to use $(document).off('focusin.modal') on the show modal event, but it did not work.
Is there any solution for this problem? I am using Razor pages in ASP.NET.
Regards,
Alexandre
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modalAddService">
Launch demo modal
</button>
<div class="modal fade" id="modalAddService" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<ejs-richtexteditor id="rteID" created="onCreate">
</ejs-richtexteditor>
</div>
</div>
</div>
</div>
<script>
var defaultRTE;
function onCreate() {
defaultRTE = this;
}
$('#modalAddService').on('shown.bs.modal', function (e) {
defaultRTE.refreshUI();
});
</script>
|
Hello Indrajith,
I had to make a few modifications in my code to fit your example, but it worked and solved the problem.
Thanks for your help,
Alexandre