Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Output Text With Different HTML Format

Is it possible to achieve something like this:

HTML:
<p>ABC</p>

Output:
DEF

I asked this because I want to make an email template where the HTML part must have <p>${__VCG__VAL__FIRST_NAME}</p> (where ${__VCG__VAL__FIRST_NAME} is a variable). The variable is to be replaced by the actual value later. However, the user must not see it on the screen; instead they will see ${FIRST_NAME} There is another constraint: I can't give id or class attributes to the element containing ther word that I want to replace.

I originally asked this question here: CKEditor4: Make Text Differ from its HTML, but nobody seemed familiar with CKEditor. So, it's even better if there's an easier way to do it with CKEditor.

like image 607
Edwin Avatar asked Nov 11 '22 00:11

Edwin


1 Answers

Here's something I put together a while ago that seems like it's what you're looking for.

My fiddle

like image 134
Pixel Rubble Avatar answered Nov 14 '22 21:11

Pixel Rubble