Skip to content

[iOS] CJK text remains visually upright after toggleItalic despite <i> output #739

Description

@zhenyu-hong

Before submitting a new issue

  • Tested with the latest stable library version (1.1.0).
  • Tested with a supported React Native version (0.86.2).
  • Searched existing issues and found no duplicate for CJK/Chinese italic rendering.

Bug summary

On iOS, EnrichedTextInput.toggleItalic() applies the expected <i> markup to selected Chinese, English, and numeric text, but Chinese glyphs remain visually upright. English letters and numbers in the same editor visibly render in italic.

The reproduction intentionally uses the system font and does not configure a custom font family or application-level faux-italic fallback. I am reporting this to clarify whether this is an expected platform-font limitation that should be documented, or whether the native renderer should provide consistent visual feedback for CJK text.

Library version

react-native-enriched-html@1.1.0

Environment info

System:
  OS: macOS 26.5.2
  CPU: (10) arm64 Apple M4
  Memory: 32.00 GB
Binaries:
  Node: 22.22.2
  npm: 11.18.0
  Watchman: 2026.07.20.00
Managers:
  CocoaPods: 1.17.0
SDKs:
  iOS SDK: iOS 26.5
IDEs:
  Xcode: 26.6/17F113
npmPackages:
  react: 19.2.3
  react-native: 0.86.2
  react-native-enriched-html: 1.1.0
Runtime:
  Expo SDK: 57.0.0
  New Architecture: enabled
Device:
  iPhone 17 simulator
  iOS 26.5

Steps to reproduce

  1. Clone the reproduction repository.
  2. Run npm install.
  3. Run npm run ios.
  4. Tap Italicize Chinese, Italicize English, and Italicize Numbers.
  5. Tap Read generated HTML.
  6. Compare the visual rendering with the generated HTML.

Expected behavior

All three selected ranges should have clear italic visual feedback, or the unsupported CJK italic behavior should be documented/exposed so apps can avoid presenting a control that appears ineffective.

Actual behavior

The generated HTML correctly contains:

<html>
<p><i>中文测试</i> <i>Hello</i> <i>123</i></p>
</html>

However, Hello 123 visibly renders in italic while 中文测试 remains visually upright.

Reproducible example repository

https://github.com/zhenyu-hong/react-native-enriched-html-cjk-italic-repro

Screenshot

Chinese text remains upright while English and numbers render in italic

Additional context

The reproduction uses only the library's public setSelection(), toggleItalic(), and getHTML() APIs. It has no custom toolbar, navigation, state management, or custom font configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions