rael9 / token-replacement-ckeditor-plugin Goto Github PK
View Code? Open in Web Editor NEWA CKEditor plugin for adding tokens using the WYSIWYG
License: GNU General Public License v2.0
A CKEditor plugin for adding tokens using the WYSIWYG
License: GNU General Public License v2.0
I expect not, but I'm looking to use token-replacement to edit mail templates, and mine will include configurable links.
Hey guys, great plugin :)
do you probably have an idea how to display the "Display Text" instead of [[value]]? the [[value]] should only be used when exporting the data. To give a reason: we have dynamic attributes (like Company, Street, Size etc), which are uniquely identified by UUID. So if I pick for example Company, the tag is [[9bca08e6-f61f-441a-9341-2ea92ea60733]]. Inserting [[Company]] is not so nice, since the name of the Attribut could change. So in a perfect world, I'd love to have just the non editable word "Company" (with the yellow background) in my editor while [[9bca08e6-f61f-441a-9341-2ea92ea60733]] will be exported.
Best regards,
Matt
It seems to choke on any token with a character following a {
in either start or end token strings
config.tokenStart = "{%";
config.tokenEnd = "%}";
config.tokenStart = "{A";
config.tokenEnd = "A}";
Uncaught TypeError:
Cannot read property 'AA' of undefined(anonymous function) @ VM7641:3
editor.addCommand.exec @ plugin.js?t=FB9E:1860
exec @ ckeditor.js:185
CKEDITOR.tools.extend.execCommand @ ckeditor.js:252
CKEDITOR.tools.extend.click @ ckeditor.js:669
d.execute @ ckeditor.js:670
(anonymous function) @ ckeditor.js:671(anonymous function) @ ckeditor.js:31
CKEDITOR.tools.callFunction @ ckeditor.js:31
onclick @ url..:1
I wanna know if this is the expected behavior, if so, how can we make this happen? .. I can try a PR soon.
See on the image below, the first token (the highlighted one), were added by the button on the toolbar, the second one, was inserted manually by the user when typing. I was expecting both to be highlighted and treated as a token.
I can't seem to add to toolbar
'Token'
not working
Hi @rael9,
Can you give me a hint please on how can I add a placeholder to the select list, like "Select an option" because for now I only get an empty
placeholder.
Thank you
Hello @rael9
I have a email template which loads in the editor when it starts. I would like to treat all text that is started with a specific string to be treated as token in my CKEditor.
I tired, tokenStart : '@@model.' and tokenEnd: '', but then it only treats @model. as a token not the whole string. In my editor, there is a string like @Model.Recipient.Name If I use tokenStart : '@@model.' and tokenEnd: 'e', it only treats "@Model.Re" as token. And for tokenStart : '@@model.' and tokenEnd: 't', it doesn't treat the string as token at all.
I have a dropdown with "@Model.Recipient.Name" as value, and if I add it from the dropdown, in all above mentioned cases it works fine.
I am very new with CKEditor. Please suggest me how can I make the editor to treat all string that starts with @model as token.
I would like to give my users the ability to add new tokens if they want. Is there a possibility to add new tokens on the fly? Ideally, I would like to add the capability to be incorporated in the token replacement plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.