Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello.
I have a very strange task: I need to add umbraco macro as html tags in RTE.
The full task is: it's needed to show a content of a property from parent page (recursive=true") in special element (for example in <pre>) and add this content (umbraco macros and html tags) in RTE. I've created custom RTE ( http://www.enkelmedia.se/blogg/2013/12/4/umbraco-7-use-the-rich-text-editor-tinymce-in-a-custom-section.aspx) and try to add
<?UMBRACO_MACRO macroAlias="DetailDetail" IsDetail="0" IsReview="0" DetailId="5814311" EntityID="5814311" ViewId="" Style="" Type="" BannerId="" />
in "Source code" ("code" button) in RTE (tinyMCE3 and mine). After this the RTE change my code
<!--?UMBRACO_MACRO macroAlias="DetailDetail" IsDetail="0" IsReview="0" DetailId="5814311" EntityID="5814311" ViewId="" Style="" Type="" BannerId="" ?-->
and nothing shows.
Is it possible to add umbraco macro as html?
Ok, I've found a section <validElements> in \config\tinyMceConfig.config. Is it possible to add tag "?UMBRACO_MACRO" to valid Elements? The "?" is a control character for tinyMce. And how to render added macro in RTE? Any ideas?
I always change the validElements to this:
<validElements><![CDATA[*[*]]]></validElements>
Than all elements are valid so you can do much more in the RTE.
Jeroen
Thank you, Jeroen. It's possible to add
<?UMBRACO_MACRO macroAlias="DetailDetail"IsDetail="0"IsReview="0"DetailId="5814311"EntityID="5814311"ViewId=""Style=""Type=""BannerId=""/>
to RTE, but it doesn't render. I think I should somehow render it with js and postback.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Insert macro in RTE as HTML
Hello.
I have a very strange task: I need to add umbraco macro as html tags in RTE.
The full task is: it's needed to show a content of a property from parent page (recursive=true") in special element (for example in <pre>) and add this content (umbraco macros and html tags) in RTE. I've created custom RTE ( http://www.enkelmedia.se/blogg/2013/12/4/umbraco-7-use-the-rich-text-editor-tinymce-in-a-custom-section.aspx) and try to add
in "Source code" ("code" button) in RTE (tinyMCE3 and mine). After this the RTE change my code
and nothing shows.
Is it possible to add umbraco macro as html?
Ok, I've found a section <validElements> in \config\tinyMceConfig.config. Is it possible to add tag "?UMBRACO_MACRO" to valid Elements? The "?" is a control character for tinyMce. And how to render added macro in RTE? Any ideas?
I always change the validElements to this:
Than all elements are valid so you can do much more in the RTE.
Jeroen
Thank you, Jeroen. It's possible to add
to RTE, but it doesn't render. I think I should somehow render it with js and postback.
is working on a reply...