My macros got changed by the rich text editor

Bo Fu asked on June 5, 2015 22:10


I am trying to use macros in static html web part. First I entered "<a href="{%currentDocument.GetValue("AdvertiseLink1")%}">" when I reopened it became "". It seems the editor automatically changed the content. Any ideas of how to avoid this?


Recent Answers

Ali Heristchian answered on June 7, 2015 08:38 (last edited on March 24, 2018 12:15)

GetValue method has two arguments (column name, default value). Use like this:

{%CurrentDocument.GetValue("AdvertiseLink1", "")|(user)zbynekh|(hash)29291b991aba0282b5d4c7b5ca21e4a2eccbe6b099b075c32119eee1c19fdf25%}
0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 7, 2015 09:40


The Static HTML web part uses WYSIWYG editor that process its input. However if you place your macro in the Source mode and Save the content, it should get resolved correctly on the live site (no matter how it gets rendered in the editor).

I would recommend to use the Static text web part instead, that is the source of the HTML by default.

Best regards,
Jan Hermann

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.