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>
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.
You can completely disable the tool bar of the Rich text editor -- but that will render itself completely readOnly. If your template has multiple parts, then display the only the one that needs to be edited inside of the RTE. The rest can be displayed as a "Readonly" RTE. An example of ReadOnly RTE can be found in the UI Gallery
yes template is having multiple parts followed by both editable and non-editable parts but displaying the only one which is needs to be edited would be the final approach as the requirement is to give access to the entire mail template to the user. if i have only non-editable content then going for Read-Only RTE would be the best option but requirement is to have both read and write content within same RTE. Please let me know if we can achieve this within the same RTE.
This works only if I have text which can’t be deleteable but it’s doesn’t work if I have both editable and non editable (undeleteable text ). For instance,
if I place the cursor between text and words or at the end of the words , and press backspace or delete then I am able to delete the text words which I should not be able to. It works fine if I have only a text which can be non edittable.