Question

S&P Global
IN
Last activity: 22 Oct 2019 15:24 EDT
How to have undeleteable text or words in rich text editor
We have requirement where we have mail template for which we are using correspondence, we have to give access to the end user to edit the template. The template contains some text which can be editable by the user and some which can’t deleteable by the user.please suggest me if there is any approach to achieve this.
I have tried by setting contenteditable ="false" but it works only if i have the text which can't be editable by the user. but it's not working if i have both editable and non editable text. for instance,
<p><span contenteditable="false">Pega </span></p>
<p><span>pdn</span></p>
for the above instance, if i place the cursor between pega and pdn , i am able to delete the pega text by clicking backspace and delete button. but my requirement is pega text shouldn't be deletable even if i click backspace and delete button i should be able to edit only the pdn text.
please let me know if any approach by which i can achieve this.
Thanks