November Happy Hour will be moved to Thursday December 5th.

Dragging Blocks into Rich Text Editor - Rendering Issue

Vote:
 

Hi

As per the article below 

https://webhelp.episerver.com/latest/en/platform/blocks.htm

We can drag blocks into Rich text editors.

In our site it allows us to drag the block (screenshot above) but it does not render on the site.

It just shows the name of the block

We are using Html.Raw to dispaly the rich text content in the razor view.

Could someone please assist.

Regards

Sandeep

#205346
Jul 06, 2019 0:49
Vote:
 

Hi Sandeep,

Please use Html.PropertyFor

@Html.PropertyFor(x=>x.PropertyName) 

Thanks

Ravindra

#205348
Jul 06, 2019 17:31
Vote:
 

I would also recommend you to use the 

@Html.PropertyFor(x=>x.PropertyName)

But there is one more option is 

@Html.DisplayFor(x=>x.PropertyName)

Here, the only difference is that @Html.PropertyFor() provides the on page editing feature but the @Html.DisplayFor() will only render the property (will not be editable in on page editing mode).

That's it.

Thanks

#205349
Jul 06, 2019 19:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.