Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to implement border-radius or padding? #55

Closed
07akioni opened this issue Mar 27, 2024 · 2 comments
Closed

Is it possible to implement border-radius or padding? #55

07akioni opened this issue Mar 27, 2024 · 2 comments

Comments

@07akioni
Copy link

07akioni commented Mar 27, 2024

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?

@07akioni
Copy link
Author

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/

@zhgchgli0718
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants