Open Gaozn opened 2 months ago
You need to always ask questions in english, because GitHub is a global comprehensive community, To avoid consuming the maintainer's energy, We should all maintain good asking habits to facilitate more users with questions to find the same questions. you can also consider using my modified DTCoreText, which adds a public interface.
pod 'DTCoreText', :git => "https://github.com/vickyleu/DTCoreText.git"
I use kotlin multiplatform for development, you can change to swift or objective-c according to the open interface
val stringBuilder = DTHTMLAttributedStringBuilder(
hTML = data,
options = options,
documentAttributes = null
)
if(density!=null){
// 表格处理
stringBuilder.registerTagHandlers(tagHandlers = TableHandler(maxWidth, density).allHandlers())
stringBuilder.registerTagHandlers(tagHandlers = listOf(MathHandler(maxWidth, density)))
stringBuilder.registerTagHandlers(tagHandlers = listOf(Base64ImageHandler(maxWidth, density)))
stringBuilder.registerTagHandlers(
tagHandlers = listOf(
PTagHandler(),
ATagHandler(maxWidth),
EmTextBlockHandler()
)
)
}
rt.