Copied to clipboard

Flag this post as spam?

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


  • Lasse Kofoed 49 posts 177 karma points
    Apr 29, 2010 @ 11:19
    Lasse Kofoed
    0

    Macro in Richtext editor - codebehind

    Hello everyone.

    Literal ltrP = new Literal();

     

    wcDivBox.Controls.Add(ltrP);
    ltrP.Text = node.GetProperty("Text").Value;

     

    Gives me in Internet Explorer 

    <p>test i boksen</p>

     

    <?UMBRACO_MACRO macroAlias="CreateUser" /> 
    <p>&nbsp;</p>
    <p>&nbsp;</p>

    But if i use 

    <umbraco:Item Field="Text" runat="server" ID="textfield" />

    in my masterfile. then it displays my macro correct.

     

    So the question is. How do i render a macro from a richtexteditor ?

    Regards Lasse Kofoed

     

  • jaizedelmann 19 posts 41 karma points
    Apr 29, 2010 @ 13:20
    jaizedelmann
    0

    Someone must know this? :(

  • Lasse Kofoed 49 posts 177 karma points
    May 04, 2010 @ 10:28
    Lasse Kofoed
    0

    This works, dont think this is the correct way to do this..! 

    ltrP.Text = library.RenderMacroContent(library.GetItem(node.Id, "Text"), node.Id);
  • Jesper Hauge 298 posts 487 karma points c-trib
    May 04, 2010 @ 10:37
    Jesper Hauge
    0

    This looks very convoluted to me. Can you explain a bit more what you're trying to do?

    Are you trying to insert the content of a document property in a p-tag on a masterpage? If that's the case:

    <p><umbraco:Item runat="server" Field="propertyName" /></p>

    Should do it

    Regards

    Jesper Hauge

  • Lasse Kofoed 49 posts 177 karma points
    May 04, 2010 @ 10:48
    Lasse Kofoed
    0

    Hello Jesper,

    Rendering different types of elements code behind.

    And one has a richtext editor, where the editor can insert a createuser/signup macro.
    Its not possible in advance to tell where the content is to be placed.

    So i need some .net code to check if the richtext editor has a macro. And if it does i need a way to get render the macro and get the macro properties.

     

  • Lasse Kofoed 49 posts 177 karma points
    May 04, 2010 @ 10:51
    Lasse Kofoed
    0

    **Macro parameter 

Please Sign in or register to post replies

Write your reply to:

Draft