GithubHelp home page GithubHelp logo

hidekih / editorjs-viewer-native Goto Github PK

View Code? Open in Web Editor NEW
38.0 1.0 3.0 2.91 MB

A React Native solution to parse outputData generated by EditorJs.

Home Page: https://www.npmjs.com/package/editorjs-viewer-native

License: MIT License

TypeScript 99.77% JavaScript 0.23%
react-native editorjs typescript

editorjs-viewer-native's Introduction

Olá, meu nome é Alexandre Hideki Siroma, sou um dev e gosto de fazer sites :D!


Icon-Js Icon-Ts Icon-React Icon-HTML Icon-CSS

#NeverStopLearning

editorjs-viewer-native's People

Contributors

hidekih avatar yngfoxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

editorjs-viewer-native's Issues

Info required on Paragraph Component (Not a Bug)

I am using a Paragraph component to render the text with styles. i.e

const EditorJsParagraph = (props: IParagraphProps) => {
	const { text } = props.data;

	return <VHtmlText text={text} textClass="text-base text-52 dark:text-52" />;
};
export default EditorJsParagraph;

I need to change the text color based on Light and dark mode. How can I pass the information to EditorJsParagraph component so that I can change the text color?

Desired Behaviour:

if (darkMode) {
return <VHtmlText text={text} textClass="text-base text-52 dark:text-52" />;
}
return <VHtmlText text={text} textClass="text-base text-50 dark:text-50" />;

Setup

const EditorJsViewerNative = createEditorJsViewer({
	tools: {
		header: { Component: EditorJsHeader },
		paragraph: { Component: EditorJsParagraph },
		list: { Component: EditorJsList },
		image: { Component: EditorJsImage }
	},
	showBlockFallback: true
});

Getting react native warning

Thanks for the package, it works great.
I have a small issue.

Usage:

const EditorJsViewerNative = createEditorJsViewer();
<EditorJsViewerNative data={{ blocks: JSON.parse(text) }} />

Data:

 LOG  [{"data": {"text": "test"}, "id": "97LefH_cM3", "type": "paragraph"}]

How can I fix that?

Screenshot 2023-05-29 at 17 09 44

Expo Console Error

VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead.

my code

      <ScrollView>
             <EditorJsViewerNative data={{blocks:JSON.parse(data.content)}} />
      </ScrollView>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.