ZhgChgLi/ZMarkupParser

Is it possible to implement border-radius or padding?

07akioni opened this issue · 2 comments

Still this can be marked as a question.

In the app I mentioned in previous issue #54, it can render markdown inline code like a HTML inline-block. I find padding & corner radius is not supported in iOS attributed text.

image

Is it possible to implement custom rendering border-radius or padding?

The app is 豆包(a ByteDance app, the company who made TikTok) in China mainland & CiCi outside China mainland.

豆包:https://www.doubao.com/
Cici:https://www.ciciai.com/

Similar to the previous response, if you can use styles set by NSAttributedString.Key(attributes), there is a possibility to implement them in ZMarkupParser, and vice versa. However, for features like "border-radius" or "padding," based on my past experience, it may require delving into TextKit at a lower level and might not be directly related to the conversion tool like ZMarkupParser.

如同上一篇的回應,只要能使用NSAttributedString+ NSAttributedString.Key(attributes) 設定的樣式,都有機會在 ZMarkupParser 實現,反之亦然;border-radius or padding 依照我過往的經驗可能要從底層 TextKit 下手,跟轉換工具無關了。

#54