Inline image alignment + text around #873
Answered
by
jansenbe
Nevinia210
asked this question in
Q&A
-
Hello, var newPage = Program.context.Web.NewPage();
PageImageOptions options = new PageImageOptions()
{
Alignment = PageImageAlignment.Left,
Height = 300,
Width = 300
};
var textWebPart = newPage.NewTextPart("");
var htmlImageCode = newPage.GetInlineImage(textWebPart, "imageURL", options);
textWebPart.Text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur sagittis hendrerit ante. Etiam quis quam. Fusce nibh. Pellentesque pretium lectus id turpis. Nulla est. Aliquam erat volutpat. Nulla accumsan, elit sit amet varius semper, nulla mauris mollis quam, tempor suscipit diam nulla vel leo. Praesent id justo in neque elementum ultrices. Nulla est. Donec iaculis gravida nulla. Maecenas lorem." +
htmlImageCode +
"Etiam commodo dui eget wisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce tellus. Nullam at arcu a est sollicitudin euismod. Duis condimentum augue id magna semper rutrum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer malesuada. Nulla non lectus sed nisl molestie malesuada. Nulla accumsan, elit sit amet varius semper, nulla mauris mollis quam, tempor suscipit diam nulla vel leo. Duis pulvinar. Aliquam id dolor. Vestibulum fermentum tortor id mi. Nunc auctor.";
newPage.AddControl(textWebPart);
newPage.Save("Example.aspx"); |
Beta Was this translation helpful? Give feedback.
Answered by
jansenbe
Jun 8, 2022
Replies: 1 comment 1 reply
-
@Nevinia210 : can you realize your requirement using the UI? If so, then in theory it should be possible via code as well, if not then it's also a no go for a code based solution. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Nevinia210
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Nevinia210 : can you realize your requirement using the UI? If so, then in theory it should be possible via code as well, if not then it's also a no go for a code based solution.