Comments (3)
I tried a whole bunch of things today related to this. Changed the
< p >
tags to
< div >,
also just removed them. Same issue.
One other related issue - if the list has the bullets removed:
<ul style="list-style-type:none">
then the second and further lines are all indented as if the list item did have a bullet item.
from dtcoretext.
Well, I found one way to fix this. In NSAttributedStrings+HTML.m, add the noted line:
else if ([tagName isEqualToString:@"p"])
{
if (tagOpen)
{
currentTag.paragraphStyle.paragraphSpacing = defaultFontDescriptor.pointSize;
currentTag.paragraphStyle.firstLineIndent = currentTag.paragraphStyle.headIndent + defaultParagraphStyle.firstLineIndent; // ADDITION
}
}
In the "li" code block, there are some difficult to understand dependencies between headIndent and firstLineIndent - changing headIndent there causes all sorts of problems to your example HTML. The above code appears to have no affect.
from dtcoretext.
I found the problem, modified the code, generated a pull request, and Oliver accepted and incorporated it. So now done. There is a new property you can provide in the options dictionary that lets you set the headIndent (list item paragraphs).
from dtcoretext.
Related Issues (20)
- Help, help, if the HTML contains tables, DTAttributedTextContentView cannot display the tables correctly. Is there a solution? HOT 2
- UNICODE_SPACE : character ' ' cannot be specified by a universal character name HOT 2
- Crash calculating the bounding rect on iOS 15 HOT 7
- DTAttributedTextContentView will cause Zombie layer object crash when Using DTTiledLayerWithoutFade HOT 11
- 图片content-type 不以 image开头 HOT 1
- Ask if it is collectionView how to use Thank you HOT 1
- Nested list render issue
- Picture position is invalid HOT 1
- Switch to Secure Object Archiving APIs
- Set spacing between lines.
- Disable bitcode HOT 1
- I have a improvement for support Image display, I think this change can be merged ? HOT 1
- Empty anchor element support HOT 5
- support for css rem HOT 2
- Found the crash of iOS, hope to get your help HOT 5
- XCode 14.3 warning when compiling DTCompatibility.h HOT 1
- DTCoreText support .xhtml file ? HOT 1
- issue crash when load html
- On iOS 16, enabling VoiceOver and rendering custom views using DTAttributedTextContentView causes crashes. HOT 7
- issue crash when load html
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 dtcoretext.