-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Placeholder type Body is defaulting in a hanging indent #589
Comments
Hi @colmben Thanks for reporting this. I just checked and the issue persists on the newest 3.0 codebase, so i'll look into what may be causing it. |
Hi @gitbrent |
let pptx = new PptxGenJS();
pptx.defineSlideMaster({
title: "MASTER_SLIDE",
bkgd: "FFFFFF",
objects: [
{
placeholder: {
options: {
name: "title",
type: "title",
x: "5%",
y: "5%",
w: "90%",
h: "10%",
fontSize: 18,
},
text: "",
},
},
{
placeholder: {
options: {
name: "body",
type: "body",
x: "5%",
y: "20%",
w: "90%",
h: "80%",
fontSize: 14,
paraSpaceBefore: 0,
paraSpaceAfter: 0,
},
text: "",
},
},
],
});
const testSlide = pptx.addSlide("MASTER_SLIDE");
testSlide.addText("Slide Title", {
placeholder: "title",
valign: "top",
autofit: true,
});
testSlide.addText(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
{
placeholder: "body",
autofit: true,
valign: "top",
}
);
pptx.writeFile("Issue589-" + getTimestamp()); |
Thanks @colmben @Smithvinayakiya - This is now fixed in master branch. |
Thanks @gitbrent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thanks for a great library!
I am seeing an issue whereby when I try to add text using a placeholder of type Body I am getting a default hanging indent of .95cm. You can see this in the 3rd slide of the online Master slides demo pptx.
I can't figure out a way to change or work around this. paraSpaceBefore, paraSpaceAfter and indentLevel all seem to be ignored when using placeholders. Is it possible to use a placeholder to add text without getting that hanging indent?
Thanks :)
Edit - a fiddle illustrating the point, the added text has a hanging indent.
https://jsfiddle.net/7muse9ca/
The text was updated successfully, but these errors were encountered: