RichTextView icon indicating copy to clipboard operation
RichTextView copied to clipboard

How to show content with html format and correct Language format?

Open nazmulkp opened this issue 5 years ago • 5 comments

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.


 


nazmulkp avatar Mar 01 '19 16:03 nazmulkp

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.

oitan avatar Mar 02 '19 10:03 oitan

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
        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.

nazmulkp avatar Mar 02 '19 12:03 nazmulkp

I cannot promise you anything, but let me try. Can you send the file?

oitan avatar Mar 02 '19 20:03 oitan

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 avatar Mar 06 '19 10:03 nazmulkp

@nazmulkp @oitan any updates on this?

aelkady avatar May 13 '19 15:05 aelkady