Open rickykoh opened 5 years ago
Master text isn't editable by design. You'll want to use regular objects and not create Slide Masters.
Hi, thanks for your reply.
As I am using the method addSlidesForTable() to create a HTML table, is there any ways I can add multiple text objects to the same slide with the HTML table?
As I've mentioned above that it seems like only one text object can be included instead of multiple text objects.
I've looked through the library codes and am wondering if it's possible to check whether the opts.addText is an array and perform a loop for newSlide.addText() at line 5309:
if ( opts.addText ) newSlide.addText( opts.addText.text, (opts.addText.opts || {}) );
The addSlidesForTable()
method merely converts an HMTL table into PPT slides. It's not meant to be used to build up complicated formatting, etc.
You'll want to use addTable()
and format from there. See examples
for code.
Reading through this thread I'm confused as to whether it's possible to add more than one piece of editable text to a slide generated via tableToSlides
. The normal usage of the slide.addText
method accepts an array of objects whereas the tableToSlides
method only accept one object. Is this intentional or am I simply using it wrong?
@elezotte - this section of the code has aged quite a bit and wasn't kept up to date with its peer methods.
I'll have to update it to handle array instead of solitary objects.
Hi, I know this is kinda old, but was it resolved?
Hi Team,
I'm aware of being able to use the addText() option for the method addSlidesForTable() to include text in master slide, as per issue #427 .
However, that only allow adding of one text object but does not allow an array of text objects, as shown below. An array of text objects will result in no text being inserted into the slide at all.
I am aware that I can also make use of the objects option in pptx.defineSlideMaster() to add texts, however that would result in the added text not editable in the slide. (I would like it to be editable)
Kindly assist.
Thank you.