RZRichTextView
RZRichTextView copied to clipboard
保存草稿出错:Incorrect NSStringEncoding value 0x8000100 detected. Assuming NSASCIIStringEncoding. Will stop this compatibility mapping behavior in the near future.
rz_codingToCompleteHtml 里面改为: NSDictionary *exportParams = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding) }; 就可以了
再有删除线或者下划线的文本后面取消下划线或删除线继续输入,输入显示没有问题,保存草稿后,加载草稿,都会显示删除线或下划线的bug
感谢提醒,显示删除线下划线这个bug已解决
感谢提醒,显示删除线下划线这个bug已解决
你好,方便贴一下修复这个bug,OC的相关代码吗,我这边使用这个库有更改一些接口和方法,不好升级。
你先下载demo
NSAttributedStringRZRichText.swift
看看这个里边的func replaceAttributes(_ attributes: [NSAttributedString.Key: Any], range: NSRange) -> NSMutableAttributedString
这里边的方法属性,是涉及到的需要修改的
另外,在设置修改属性的时候,这些相关的属性,比如删除线style= none, 背景色阴影颜色为nil或者透明这些,也需要移除typingAttributes的属性
使用replaceAttributes的原因,是因为需要移除这些会导致bug的属性,/// RZRichtext使用,替换掉属性,部分属性如果不存在,则需要移除之前的,比如删除线等等