Comments (6)
Right now there are multiple places
but .bold()
and .font(fontName: string)
can only be called from Run
though. I don't fully understand
from docx.
Yeah that's precisely the issue. Paragraph.bold()
should work, since DOCX allows setting the property paragraph-wide; ditto tables. We should also have RunStyle
object with a .bold()
method, and should add it to ParagraphStyle
from docx.
Does the office xml documentation even allow applying bold to paragraphs?
I assumed all that stuff was only available to the run. I could be (and hope that I am) wrong!
from docx.
I could have sworn there was an element for "paragraph run-style properties", but looking through the spec now it looks like I was wrong! I think I just got confused with the paragraph styles, which do indeed have a separate section for run-styles. So you can, e.g., define ListParagraph
to be indentend and bold.
from docx.
If bold is only available in the run, we would in future make .bold()
in the Paragraph
object which manually adds bold to all the Runs
, which will make it less tedious for the user
Otherwise the user would have to .bold()
every time, which might not be fun
But this is non-priority though, I don't see much reason for a user to bold an entire paragraph, it will look weird maybe 😂 . I don't think I've ever needed to bold an entire paragraph in any essay/dissertation I wrote
from docx.
Closing, stale
from docx.
Related Issues (20)
- Add accent characters
- The MathIntergral limLoc seems to be wrong
- Doesn't work with bg-black HOT 1
- Couple issues with embedded fonts HOT 3
- how to set field language 'TH' in TextRun HOT 1
- Error "Can't read the data of 'the loaded zip file'" from docx patcher HOT 4
- ImageRun not working with data of ArrayBuffer type HOT 6
- Can not find `patchDocument` in browser
- iterate paragraphs HOT 1
- Can I set the font in mathematical formulas to be non-italic?
- Generate Table Of Contents (TOC) programmatically HOT 1
- What I am doing wrong ?
- Inconsistency in bulleted lists between Mac Pages, MSWord, and Google Docs. HOT 1
- can i add background color on entire header section? please suggest me HOT 4
- Use fitText In TextRun HOT 1
- Table of Content manual update option missing
- Table Styling Issue - Default & externalStyles
- Corrupted document when using async await for image load HOT 1
- NPM 8.5.0 Package / wrong types for patchDocument HOT 4
- patchDocument - input.prepForXml Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docx.