68
Views
5
Comments
Solved
[CKEditor.Reactive] Dynamic URL in CK editor
ckeditor-reactive
Reactive icon
Forge asset by Fábio Fantato
Application Type
Traditional Web, Mobile, Reactive

Hi,

I have a requirement to send emails in my application. The email content is configurable using CKEditor. In the mail content there are some values that will be different, based on the ID. So I'm using placeholders during the configuration and replacing them dynamically when mail is being sent out. The highlighted text in below image are palceholders. 

In the above content, {ReqID} will be replaced by REQ001,REQ002,etc based on ID. I need the {ReqID} to be a link that will navigate to the detail page of my application.


I want the mail to be in below format

          Hello Gowtham,

          Request REQ001 is assigned to you.

          Request ID: REQ001

          Status: Pending


{ReqID} to be replaced with REQ001 and to be a hyperlink to the detail page.


How can I achieve the above using CKEditor?


Thanks,

Gowtham 

2023-02-26 23-17-33
Kshitij Raheja
Solution

Hey @Gowtham

I have seen your other reply i think the problem is in your replace method when you are using replace put your data in the <a> tag like <a href="https://www.example.com">Email_Placeholders.Request_Number</a>

Let me know if that solves the issue

Regards
Kshitij Raheja

 

2023-10-30 06-03-17
Gowtham

Thanks a lot @Kshitij Raheja 

This helps to resolve my problem

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi @Gowtham 

follow these steps

1. make list of the element of (assigned_user, req_id, status and their values) by using structure  text and text value.

2. and use this function in loop

2. and put the code into the html code and pass these variable like this in ck editor.


link for more details - https://ckeditor.com/docs/ckeditor5/latest/features/html/html-embed.html

if you need more help. try to attach your OML. would like to help you.

hope this will help

Regards,

Prince

2023-10-30 06-03-17
Gowtham

Hi @Prince Aadil khan Panwar ,

Thanks for your reply. I'm already using the replace function

What I need is 

  1. {ReqId } to be dynamic - This is working 
  2. {ReqId} to be hyperlink to detail page - I have the URL, not sure to embed the URL to {ReqId} 
2024-05-08 06-29-37
Prince Aadil Khan Panwar

follow this

click on source


again click on Source


Regards,

Prince

2023-02-26 23-17-33
Kshitij Raheja
Solution

Hey @Gowtham

I have seen your other reply i think the problem is in your replace method when you are using replace put your data in the <a> tag like <a href="https://www.example.com">Email_Placeholders.Request_Number</a>

Let me know if that solves the issue

Regards
Kshitij Raheja

 

2023-10-30 06-03-17
Gowtham

Thanks a lot @Kshitij Raheja 

This helps to resolve my problem

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.