Hi,
We are designing a template using Rich Text Editor, designed document looks like below.
From the UI side, we need to get plain readable text which consists of label information of all Account related fields placed in the editor.
Expecting an output string like " Account.CurrentTotal }{ Account.FinanceCharge }{ Account.LastPaymentAmount }{ Account.Alert }"
Can you suggest which method or function must be used in order to get the required output?
appreciate your help, any sample code will help us a lot.
Thanks and regards,
Ramesh
public BtnClick = (): void => {
var stringArray = [
'{Account.CurrentTotal }',
'{ Account.FinanceCharge }',
'{ Account.LastPaymentAmount }'
];
var content = '';
var arrayLength = stringArray.length;
for (var i = 0; i < arrayLength; i++) {
content = content + stringArray[i] + '<br>';
}
this.rteObj.executeCommand('insertHTML', content); }; |
Dear Gunasekar Kuppusamy,
Thanks for helping me to solve this problem, looks like you did it in a reverse output. Required template already designed with necessary information like below
I need to get an alert message with all information when I click on a button like below
hoping you can update the code sample with minimal changes to suit the required solution.
Thanks and regards,
Ramesh
alert((this.rteObj.value as any).replace(/<[^>]*>/g, '')); |