And here is the my method (minus the middle boring part).
public class OverrideSave
{
public static void ContentService_Saving(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.SaveEventArgs<Umbraco.Core.Models.IContent> e)
{
foreach (var c in e.SavedEntities)
{
var list = c.PropertyTypes.Where(x => x.PropertyEditorAlias == "Umbraco.TinyMCEv3").ToList();
if (list.Count > 0)
{
List<Property> propList = new List<Property>();
foreach (var i in list)
{
propList.Add(c.Properties.Where(x => x.Alias == i.Alias).FirstOrDefault());
}
if (propList.Count > 0)
{
foreach (var t in propList)
{
// Do a lot of fun stuff here...
t.Value = (object)doc.DocumentElement.OuterHtml;
}
}
}
}
}
}
On Saving Override removes Macros from content
I have a method overriding the Umbraco.Core.Services.ContentService.Saving. It's just adding some class to images.
But now I started enabling some Macros to be added in the rich-text editor and the Macros disappear after saving.
After much digging I found out that if I override the saving method some how the Macros get removes.
If anyone else had to deal with this I would love some insight on what is going on.
Here is how I override it:
And here is the my method (minus the middle boring part).
is working on a reply...