csharp-mvc: wrap data-insert-image with images array

This commit is contained in:
sshakndr
2025-10-09 13:24:02 +07:00
parent ae6c07c5b2
commit fa3886c46b

View File

@ -327,13 +327,18 @@ namespace OnlineEditorsExampleMVC.Models
logoConfig.Add("directUrl", directMailMergeUrl.ToString());
}
var result = new Dictionary<string, object>
{
{ "images", new List<Dictionary<string, object>>{logoConfig} }
};
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var token = JwtManager.Encode(logoConfig); // encode logoConfig into the token
logoConfig.Add("token", token); // and add it to the logo config
var token = JwtManager.Encode(result); // encode logoConfig into the token
result.Add("token", token); // and add it to the logo config
}
logoUrl = jss.Serialize(logoConfig).Replace("{", "").Replace("}", "");
logoUrl = jss.Serialize(result).Replace("{", "").Replace("}", "");
}
// get a mail merge config