Skip to content
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

Is it possible to set wordwrap to true #1529

Closed
rockcitystore opened this issue May 26, 2022 · 2 comments · Fixed by #1552
Closed

Is it possible to set wordwrap to true #1529

rockcitystore opened this issue May 26, 2022 · 2 comments · Fixed by #1552

Comments

@rockcitystore
Copy link

rockcitystore commented May 26, 2022

hi i have some trouble,
here is now style:
image
and here is what i want :
image

in word app ,i can set wordwrap( docs.microsoft.com ) to true

image

, but with docx.js, i try blow code and not work

const  doc = new Document({})
class WordWrap extends IgnoreIfEmptyXmlComponent {
            constructor() {
                super('w:pPr');
                this.root.push(new OnOffElement('w:wordWrap', true));
            }
        }
        doc.Settings.addChildElement(new WordWrap());

so Is it possible to set wordwrap? thank u so much

@rockcitystore rockcitystore changed the title how to set wordwrap to true Is it possible to set wordwrap to true May 26, 2022
dolanmiu added a commit that referenced this issue Jun 14, 2022
dolanmiu added a commit that referenced this issue Jun 15, 2022
@rockcitystore
Copy link
Author

rockcitystore commented Jun 27, 2022

seems this issue same as #722 ,
and #1552 not fixed this,
i have run demo 72 still not work
image

with this option blow it work
image

image

@dolanmiu FYI and thanks

dolanmiu added a commit that referenced this issue Oct 25, 2022
@dolanmiu
Copy link
Owner

dolanmiu commented Oct 25, 2022

Sorry about the late response, but hopefully this PR fixes the issue:

#1738

I added the wrong property, it is the wordWrap property which should've been added

@rockcitystore

dolanmiu added a commit that referenced this issue Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants