I want to add rich text into the textframe. I have manually converted the rich text to jason, but I don’t know how to add the format to the slide
- How to append Portion to paragraph?
- How to append paragraph to textFrame?
I want to add rich text into the textframe. I have manually converted the rich text to jason, but I don’t know how to add the format to the slide
@iyyb930,
Thank you for your inquiry.
I hope the following code snippet helps you to add portions and paragraphs to TextFrame objects.
Portion portion = new Portion();
portion.setText("text portion");
// add portion formatting here
Paragraph paragraph = new Paragraph();
paragraph.getPortions().add(portion);
someTextFrame.getParagraphs().add(paragraph);
Documents: Manage Paragraph
API Reference: Portion Class | Paragraph Class | ITextFrame Interface