Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Huw Reddick 274 posts 857 karma points
    30 days ago
    Huw Reddick
    0

    Macro in RTE works in backofffice but just displays text in the front end

    yet more macro woes,

    I have just created a macro to allow back office editors to select image crops

    backoffice view enter image description here

    website view enter image description here

    As you can see there are a couple of other macros above the image which work fine both in the back office and when rendered in the front end. Anyone have any pointers as to what to look for or where, is it an RTE issue or a macro issue?

  • Huw Reddick 274 posts 857 karma points
    29 days ago
    Huw Reddick
    0

    In the back office RTE it renders this

    <h3>Macro content widgets</h3>
    <p>Button Macros</p>
    <div class="umb-macro-holder LinkButton umb-macro-mce_2 mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="LinkButton" linkTitle="Green Test" linkUrl="umb://document/9f7db4cf75274e1ba31a6ddbbd00d726" linkColour="green" /> --><ins><a href="umb://document/9f7db4cf75274e1ba31a6ddbbd00d726" class="btn btn-md green-btn linkbutton">Green Test</a></ins></div>
    <div class="umb-macro-holder LinkButton umb-macro-mce_1 mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="LinkButton" linkTitle="Orange link button" linkUrl="umb://document/354a41d3fb02498f86abbb170d060e3a" linkColour="orange" /> --><ins><a href="umb://document/354a41d3fb02498f86abbb170d060e3a" class="btn btn-md orange-btn linkbutton">Orange link button</a></ins></div>
    <p> </p>
    <p>image crop macro ??</p>
    <div class="umb-macro-holder CroppedImage umb-macro-mce_1 mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="CroppedImage" croppedImage="umb://media/57370813c0184ecbb3d9caabec93f69a" crop="Thumbnail" cropAlias="ColumnHeader" /> --><ins>
    <div class="CroppedImage"><img class="cropped" src="/media/cuedovyy/technician-500x400.jpg?center=0.34,0.532&amp;mode=crop&amp;width=300&amp;height=100&amp;rnd=132519806963100000" alt="" /></div>
    </ins></div>
    

    But in the front end I get

    <h3>Macro content widgets</h3>
    <p>Button Macros</p>
    <div class="umb-macro-holder LinkButton umb-macro-mce_2 mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="LinkButton" linkTitle="Green Test" linkUrl="umb://document/9f7db4cf75274e1ba31a6ddbbd00d726" linkColour="green" /> --><ins><a href="umb://document/9f7db4cf75274e1ba31a6ddbbd00d726" class="btn btn-md green-btn linkbutton">Green Test</a></ins></div>
    <div class="umb-macro-holder LinkButton umb-macro-mce_1 mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="LinkButton" linkTitle="Orange link button" linkUrl="umb://document/354a41d3fb02498f86abbb170d060e3a" linkColour="orange" /> --><ins><a href="umb://document/354a41d3fb02498f86abbb170d060e3a" class="btn btn-md orange-btn linkbutton">Orange link button</a></ins></div>
    <p> </p>
    <p>image crop macro ??</p>
    <div class="umb-macro-holder CroppedImage umb-macro-mce_1 mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="CroppedImage" croppedImage="umb://media/57370813c0184ecbb3d9caabec93f69a" crop="Thumbnail" cropAlias="ColumnHeader" /> --><ins>Macro alias: <strong>CroppedImage</strong></ins></div>
    

    What is causing the img tag to not be rendered? This appears to happen outside off the Rte.cshtml as checking Model.value it has already removed the img before doing any url/link parsing

  • Huw Reddick 274 posts 857 karma points
    6 days ago
    Huw Reddick
    0

    Weirdly I just discovered that if you hit the view code button for the RTE and submit that, everything renders fine in backoffice and the UI ???

    Anyone know what might be causing that?

Please Sign in or register to post replies

Write your reply to:

Draft