hidekih / editorjs-viewer-native Goto Github PK
View Code? Open in Web Editor NEWA React Native solution to parse outputData generated by EditorJs.
Home Page: https://www.npmjs.com/package/editorjs-viewer-native
License: MIT License
A React Native solution to parse outputData generated by EditorJs.
Home Page: https://www.npmjs.com/package/editorjs-viewer-native
License: MIT License
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
});
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>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.