Reputation: 1438
I want to use CKEditor to author HTML templates. For instance, E-Mail templates.
So, let's say I want to create a new template which will look like this
Hello $FirstName,
We have a offer for you!
Obviously, author of this template, may want to format $FirstName as bold (we're editing HTML at least!)
Hello $FirstName,
We have a offer for you!
and after processing this will become
Hello Joe,
We have a offer for you!
if we're sending this to Joe.
But, I want to prevent author formatting some part of my custom variable tag $FirstName, or type within, etc.
Hello $First-Name, << this is BAD!
We have a offer for you!
Can I implement this restriction with CKEditor? If not (is not supported or way too hard) when editor will you suggest?
Upvotes: 0
Views: 2990
Reputation: 22023
You can use the placeholder plugin. As you can see it can only be edited using dialog. What's more in upcoming CKEditor 4.3 it was rewritten so the experience will be a lot better.
To build a CKEditor with this plugin, go to its page: http://ckeditor.com/addon/placeholder, add it to your editor and simply build it.
Upvotes: 1