使用不同HTML格式的输出文本 [英] Output Text With Different HTML Format

查看:112
本文介绍了使用不同HTML格式的输出文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以实现这样的功能:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆