Comments (4)
So in OfficeIMO the paragraph is actually a Run. That means when you do AddText it creates a run, but this is a WordParagraph. Using AddParagraph forces it to do one Paragraph, with one Run kinda.
So if you want you can do
p1 = p1.AddText("xxx")
p1.Italic = true;
p1 = p1.AddText("xxx2)
p1.Italic = false;
and it will give you what you want. You can also save them to seaprate variables. OfficeIMO has only a single concept of WordParagraph trying to simplify the OpenXML model.
from officeimo.
For example
var paragraph = document.AddParagraph("Adding paragraph with some text with special chars to check if FontFamily works correctly for those");
paragraph.Color = SixLabors.ImageSharp.Color.Red;
// this is only a test of setting FontFamily per paragraph. Please use document.Settings.FontFamily to set it per document.
paragraph = document.AddParagraph("Wszedł kot do domu, gdzie były różne buty. ");
paragraph.FontFamily = "Courier New";
paragraph = paragraph.AddText("Chodził tak sobie i chodził, i się nachodził. ");
paragraph.FontFamily = "Courier New";
paragraph = paragraph.AddText("A potem jeszcze pochodził, i wąchał. A wszystko to nagrało życie. ");
paragraph.FontFamily = "Courier New";
Look at the examples project - there are plenty of examples showing things
from officeimo.
p1.AddText(xxx).AddText(xxx)
as far as i know
from officeimo.
p1.AddText(xxx).AddText(xxx)
as far as i know
AddText
method is just concating text in current paragraph. But i wanna split text areas and having separated styles for them
from officeimo.
Related Issues (20)
- Upgrading DocumentFormat.OpenXML to version 3 HOT 1
- dotnet 8.0 error HOT 13
- Any way to implement numbered list (a., b., c., ....)? HOT 4
- Setting font size for list symbol HOT 7
- Any way to insert rich text HTML content? HOT 8
- Remove continue numbering & restart numbering for lists
- Add ability to merge & remove lists
- Image layout options HOT 8
- Mislabeled Behavior? HOT 8
- Potential Bug: Does iteration over TableCell's Paragraphs property allow mutation? HOT 21
- Stable and unlikely to change vs unstable and subject to change vs depreciated api HOT 13
- ContentControls.Add() is trimming space from user selection HOT 1
- How to display the specific gravity value in a pie chart HOT 2
- How to add image watermark? HOT 3
- how can I add a table with two rows and each row had diff columns and width? HOT 1
- Issue with Text Replacement in Multi-Line Text Boxes HOT 1
- ConditionalFormattingFirstColumn sample
- [Question] Does OfficeIMO provide support for HTML fragments? HOT 4
- [Question] Is Save As Web Page support? HOT 2
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 officeimo.