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

Cannot remove bullet from list or handle <lh></lh> tag #630

Open
9 of 15 tasks
Navipro70 opened this issue Apr 5, 2023 · 2 comments
Open
9 of 15 tasks

Cannot remove bullet from list or handle <lh></lh> tag #630

Navipro70 opened this issue Apr 5, 2023 · 2 comments
Labels
bug Crush'em all.

Comments

@Navipro70
Copy link

Decision Table

  • My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
  • My issue does not look like “The HTML element <yyy> is not rendered”

Good Faith Declaration

Description

I have next html with <lh></lh> tag:

<ul>
<lh>Text 1</lh>
<li>Text 2</li>
<li>Text 3</li>
</ul>

Current behavior:
Library ignores <lh></lh> tag and renders as standard <li></li> tag, but without text and with bullet

Expected behavior:
Library renders it as list header tag without marker (bullet, etc.) and with text

Maybe library has posibility to ignore marker (bullet) for specific tag, for example with <lh style="list-style-type: none;"></lh> or by overriding the tag specs in customHTMLElementModels, but I've read docs and didn't find any solution

React Native Information

-

RNRH Version

"react-native-render-html": "^6.3.4"

Tested Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Reproduction Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Minimal, Reproducible Example

Additional Notes

Example with screenshots for html:

<ul>
  <lh>Text 1</lh>
  <li>Text 2</li>
  <li>Text 3</li>
</ul>

Current behavior:
Снимок экрана 2023-04-05 в 20 35 19

Expected behavior:
Снимок экрана 2023-04-05 в 20 37 54

@Navipro70 Navipro70 added the bug Crush'em all. label Apr 5, 2023
@Navipro70
Copy link
Author

Maybe someone else meet this issue, just add next code to props, it will fix it

customHTMLElementModels = {{
    lh: HTMLElementModel.fromCustomModel({
      contentModel: HTMLContentModel.textual,
      mixedUAStyles: {
        backgroundColor: colors.white,
        transform: [{ translateX: -12 }],
      },
      tagName: 'li',
    })
}}

@jsamr
Copy link
Collaborator

jsamr commented Apr 6, 2023

We should definitely support LH tag properly. Reopening to track this effort

@jsamr jsamr reopened this Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crush'em all.
Projects
None yet
Development

No branches or pull requests

2 participants