Hi Harutyun,
Greetings from Syncfusion support,
We have validated your reported query. Yes, you can prevent the Bold functionality in the Rich Text Editor. By preventing the default keydown action binding for the inputElement and resetting the originalEvent action. We have also prepared a sample that tries to meet your requirements.
<ejs-richtexteditor id="customKey" actionBegin="onbegin" created="created"></ejs-richtexteditor>
<script>
var defaultRTE;
function created() {
defaultRTE = this;
defaultRTE.inputElement.addEventListener("keydown", (args) => {
if (args.ctrlKey && args.keyCode === 66) {
args.preventDefault();
}
})
}
function onbegin(args) {
if (args.requestType === "bold") {
args.originalEvent.action = "non-bold";
}
}
</script>
|
Please let us know if the solution helps,
Regards,
Indrajith