RichTextView
RichTextView copied to clipboard
How to show content with html format and correct Language format?
I spend a lot of time show this content as a description but I am failed to manage this can anyone guide how can display it
`A'ishah said that the Messenger of Allah used to start the prayer by reciting the Takbir (Allahu Akbar; Allah is Greatest) and then recite,
الْحَمْدُ للَّهِ رَبِّ الْعَـلَمِينَAll praise and thanks be to Allah, the Lord of all that exists. (Ibn Abi Hatim 1:2).
Above content coming from the API from a Nobel Book, I have no control about content, HTML tag, and Arabic.
Problem description:
I able to show text with HTML tag but Arabic content always set it left the position. it should be right according to Arabic language rule.
I am not sure, since I did not check, but I guess the problem is that the constraints used to set text position are not leading/trailing anchor but left/right anchors. Leading and trailing anchors are language/region dependent, and left/right are not. You could check if I guessed right or not.
Thank you for your response. Yes! I tried with your suggestion and but no luck for me .
![screen shot 2019-03-02 at 6 45 33 pm](https://user-images.githubusercontent.com/8841075/53682018-ba44e780-3d1b-11e9-8256-1a303139a2f1.png)
backgroundCornerRadiusView.addConstraint(NSLayoutConstraint(item: tafsirDetailsLabel, attribute: .trailing, relatedBy: .equal, toItem: backgroundCornerRadiusView, attribute: .trailing, multiplier: 1, constant: 0))
backgroundCornerRadiusView.addConstraint(NSLayoutConstraint(item: tafsirDetailsLabel, attribute: .leading, relatedBy: .equal, toItem: backgroundCornerRadiusView, attribute: .leading, multiplier: 1, constant: 0))
if you want then I can give you a JSON file that is a single content based file.
I cannot promise you anything, but let me try. Can you send the file?
Sorry for may delay here is my content that's . come from the server https://docs.google.com/document/d/1cGcFCgJMaM8kTNbNpmZJC-udB2Z4EqTTgVhzSmL1L7E/edit?usp=sharing
@nazmulkp @oitan any updates on this?