Include custom macro in Newsletter Rich Text Editor
Hi,
I've built a custom macro to include in to the Newsletter Studio rich-text editor. The macro needs to show the results inline within the editor, but when I add the macro, I get the following error:
Request error: The URL returned a 404 (not found):
/umbraco/backoffice/UmbracoApi/Macro/GetMacroResultAsHtmlForEditor
Does anyone know what could be causing this? The macro is fine when included in the default Umbraco rich-text editor, so I would imagine the issue lies with the GetMacroResultsAsHtmlForEditor expecting a different editor?
Further to this, I've tried switching Newsletter Studio to use a new rich-text editor data type and I still get the same error. It seems to be an issue with Newsletter Studio not necessarily being aware of macro's when rendering the content?
So I'm going to try the routes mentioned in that post, but in the meantime - is there any movement on being able to use macro's here, or is it simply not an option?
The reason is that a macro most of the time needs to be what I call "content aware". Since you can use stuff like "Model.CurrentNode" - what is the current node when you render a macro in a rich thext editor in the Newsletter Studio -section?
One solution could be to say that the macros in Newsletter Studio always has the root node (id -1) as the current node but that feels a little bit "hacky" - another solution would be to include a content picker so that the user can choose the "current node" for the macro - also a little bit hacky.
I would love to get your feedback on the other approaches - I'm willing to work togheter to figure out how it would be best to add a macro in the newsletter-section.
Include custom macro in Newsletter Rich Text Editor
Hi,
I've built a custom macro to include in to the Newsletter Studio rich-text editor. The macro needs to show the results inline within the editor, but when I add the macro, I get the following error:
Does anyone know what could be causing this? The macro is fine when included in the default Umbraco rich-text editor, so I would imagine the issue lies with the
GetMacroResultsAsHtmlForEditor
expecting a different editor?Further to this, I've tried switching Newsletter Studio to use a new rich-text editor data type and I still get the same error. It seems to be an issue with Newsletter Studio not necessarily being aware of macro's when rendering the content?
...me again!
In case anyone else comes across this post with the same problem, I just discovered this response from Markus (developer of Newsletter Studio):
Hi!
So I'm going to try the routes mentioned in that post, but in the meantime - is there any movement on being able to use macro's here, or is it simply not an option?
Hi Ed!
The reason is that a macro most of the time needs to be what I call "content aware". Since you can use stuff like "Model.CurrentNode" - what is the current node when you render a macro in a rich thext editor in the Newsletter Studio -section?
One solution could be to say that the macros in Newsletter Studio always has the root node (id -1) as the current node but that feels a little bit "hacky" - another solution would be to include a content picker so that the user can choose the "current node" for the macro - also a little bit hacky.
I would love to get your feedback on the other approaches - I'm willing to work togheter to figure out how it would be best to add a macro in the newsletter-section.
is working on a reply...