Skip to content

prscX/react-native-richtext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRs Welcome

ReactNative: Native RichText (Android/iOS)

If this project has helped you out, please support us with a star 🌟

This library is a React Native bridge around native rich text libraries. It allows you to edit/format content providing below set of features:
  • FORMAT_STRONG / FORMAT_BOLD / FORMAT_EMPHASIS / FORMAT_CITE / FORMAT_ITALIC / FORMAT_BIG / FORMAT_SMALL / FORMAT_FONT / FORMAT_MONOSPACE / FORMAT_LINK / FORMAT_UNDERLINE / FORMAT_SUPERSCRIPT / FORMAT_SUBSCRIPT / FORMAT_CODE

  • Video / Camera / Audio / Gallery [Not Supported - Targeting it for future releases]

Note This library is support ReactNative >= 62

Visual Editor Visual Editor

📖 Getting started

$ yarn add @prscx/react-native-richtext

  • iOS

iOS Prerequisite: Please make sure CocoaPods is installed on your system

  • Android

  • Please add below script in your build.gradle

defaultConfig {
    multiDexEnabled true
    ...
}

buildscript {
    repositories {
        maven { url "https://jitpack.io" }
        ...
    }
}

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
}

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        ...
    }
}
  • Add below activity in your app activities:

<activity android:name="org.wordpress.aztec.demo.MainActivity" />

💻 Usage

import { RNRichText } from '@prscx/react-native-richtext';

RNRichText.Show({
    title: 'Editor',
    content: EXAMPLE,
    onDone: (content) => {
        console.log('on done: ' + content);
    }
});

💡 Props

  • General(iOS & Android)
Prop Type Default Note
content: mandatory string Specify html content which needs to be formatted
onDone func Specify done callback
  • Android
Prop Type Default Note
title string Specify html content which needs to be formatted

Below are the color properties using which you can customize your branding colors, define it in your app/res/colors.xml

<resources>

    <color name="headerBackgroundColor">#01a9da</color>
    <color name="headerTitleColor">#ffffff</color>
    <color name="headerBackColor">#ffffff</color>

    <color name="toolbarBackgroundColor">@color/white</color>
    <color name="toolbarIconNormalColor">@color/grey_darken_20</color>
    <color name="toolbarIconHighlightColor">@color/almost_black</color>
    <color name="toolbarIconDisabledColor">@color/grey_lighten_20</color>

</resources>

✨ Credits

🤔 How to contribute

Have an idea? Found a bug? Please raise to ISSUES. Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list below. ✨

📜 License

This library is provided under the Apache 2 License.

RNRichText @ prscX

💖 Support my projects

I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like 🚀

  • If you're feeling especially charitable, please follow prscX on GitHub.

    Buy Me A Coffee

    Thanks! ❤️
    prscX.github.io
    </ Pranav >