使用不同HTML格式的输出文本 [英] Output Text With Different HTML Format
问题描述
可以实现这样的功能:
HTML:
<p>ABC</p>
Output:
DEF
制作电子邮件模板,其中HTML部分必须具有< p> $ {__ VCG__VAL__FIRST_NAME}< / p>
c> $ {__ VCG__VAL__FIRST_NAME} 是一个变量)。该变量将被实际值替换。然而,用户不能在屏幕上看到它;他们会看到 $ {FIRST_NAME}
还有另一个限制:我不能给 id
或<$ c $
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.
推荐答案
这里是我放在一起的一个前一段时间,这是一个很简单的方法来做CKEditor。似乎这是你要找的。
Here's something I put together a while ago that seems like it's what you're looking for.
My fiddle
这篇关于使用不同HTML格式的输出文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!