Man, you are a GOD!
Finally it is working. Formula used:
testDelete = '<p><font style="background-color: rgb(231, 99, 99);">{somePlaceholder}</font></p>';
testDelete = string\replace(testDelete, '{somePlaceholder}', datetime\format(datumDalsiAktivity, 'Europe/Amsterdam', 'DD.MM.YYYY HH:mm'))
I had to use datetime\format because I was getting different date format even at a different timezone(probably the system's default timezone).
The good thing is that I am now getting what I want!
Thank you thousand times for your advice. One more time, sorry for being a dummy at the beginning.
Possibility to put variable into Wysiwyg
Collapse
X
-
You are right, I am so sorry for my hasty conclusion about this topic.
It is somehow starting to work as I would expect, I was just using the wrong syntax and logic.
Will keep you updated once I have an acceptable solution.
Thank you very much sir!Leave a comment:
-
> it is obviously not working.
A non-valid code won't be working.
> wysiwyg which is not technically string its html..
Wrong.
> I assume there is no way to put variable into wysiwyg then, right?
Wrong.
> Which is huge shame
This makes me feel frustrated.
You need something like:
Code:yourWysiwygFieldName = string\replace(yourWysiwygFieldName, '{datumDalsiAktivity}', 'SOME_TEXT_JUST_FOR_TEST');
Last edited by yuri; 09-01-2022, 10:36 AM.Leave a comment:
-
Sorry but I dont get it.
I cannot use string function on wysiwyg which is not technically string its html..
Tried:
testDelete = '<p>{datumDalsiAktivity}</p>';
string\replace(testDelete, {datumDalsiAktivity}, datumDalsiAktivity)
Where datumDalsiAktivity is the variable I need to use in Wysiwyg..it is obviously not working.
I assume there is no way to put variable into wysiwyg then, right? Which is huge shame, cause now I am not able to use styles on the variable I need to display on the Opportunity(with red background)..Leave a comment:
-
You can use a formula string\replace function to replace placeholders with needed values.Leave a comment:
-
> The editor (summernote) is quite restrict and strips out, what not should be inserted, e.g. code.
It's not true. We have placeholders for email templates, we have BPM process variables for emails.Leave a comment:
-
I guess, it is not possible. The editor (summernote) is quite restrict and strips out, what not should be inserted, e.g. code.Leave a comment:
-
Possibility to put variable into Wysiwyg
Hello,
I would like to ask you if there is any possibility to use variables inside Wysiwyg field.
I am trying to fill Wysiwyg via workflow with some variable/attribute we have in our project + some formatting, I tried pretty much everything that I know from other languages like:
testWysiwyg = <p>variableName</p> or testWysiwyg = <p>$variableName</p> or testWysiwyg = <p>{variableName}</p> and a lot of other syntaxes.
However, none of the above is working and I was not able to find any info about this topic.
Thanks a lot in advance!Tags: None
Leave a comment: