I've developing some method via inheriting from **UmbracoApiController** class.
my problem is when I try to save some html string to content editor like "<b>some</b>", then in the Umbraco-UI I get <p>some</p>, Meaning: the text is saved but without his markup html. - So I need to save with html markup.
I search on Google and in this lovely forum but I not found any solution!
Please help! :)
This is the code (content is simple rich editor typed field from umbraco):
// Get the Umbraco Content Service
var contentService = Services.ContentService;
var Page = contentService.CreateContent(
tip.Name, // the name of the product
tipPage, // the parent id should be the id of the group node
"content", // the alias of the product Document Type
0);
var k = new System.Web.HtmlString(tip.Text); // tip.Text = "<...."
Page.SetValue("content", "<b>some</b>");// k is NOT WORKING Either);
// finally we need to save and publish it (which also saves the product!) - that's done via the Content Service
Html markup not saved in Umbraco 7
Hi everyone!
I've developing some method via inheriting from **UmbracoApiController** class.
my problem is when I try to save some html string to content editor like "<b>some</b>", then in the Umbraco-UI I get <p>some</p>, Meaning: the text is saved but without his markup html. - So I need to save with html markup.
I search on Google and in this lovely forum but I not found any solution!
Please help! :)
This is the code (content is simple rich editor typed field from umbraco):
// Get the Umbraco Content Service
var contentService = Services.ContentService;
var Page = contentService.CreateContent(
tip.Name, // the name of the product
tipPage, // the parent id should be the id of the group node
"content", // the alias of the product Document Type
0);
var k = new System.Web.HtmlString(tip.Text); // tip.Text = "<...."
Page.SetValue("content", "<b>some</b>");// k is NOT WORKING Either);
// finally we need to save and publish it (which also saves the product!) - that's done via the Content Service
contentService.SaveAndPublishWithStatus(Page);
is working on a reply...