
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
editorjs-viewer-native
Advanced tools
This lib provide a component to render in a React Native a JSON generated by Editor.js!
Version 1.0.0 is now available!
npm i editorjs-viewer-native
or
yarn add editorjs-viewer-native
CodeDelimiterHeaderImageLinkListMarkerParagraphPersonalityQuoteSimple ImageUnderlineCustom block typeSee the update plans
Create a component using function createEditorJsViewer.
import { ScrollView } from 'react-native';
import { createEditorJsViewer } from "editorjs-viewer-native";
import dataFromEditorJs from "./data.json";
const EditorJsViewerNative = createEditorJsViewer();
export default function App() {
return (
<ScrollView>
<EditorJsViewerNative data={dataFromEditorJs} />
</ScrollView>
);
}
If you want to use your custom component to render any supported plugin block, you can define a Component in createEditorJsViewer config object.
import { ScrollView, Text } from 'react-native';
import { createEditorJsViewer, IHeaderProps } from "editorjs-viewer-native";
import dataFromEditorJs from "./data.json";
const MyHeader = ({ data }: IHeaderProps) => {
return <Text>{data.text}</Text>
}
const EditorJsViewerNative = createEditorJsViewer({
tools: { // Updated to "tools" in v1 (before was toolsParser)
header: {
Component: MyHeader // Updated to "Component" in v1 (before was CustomComponent)
}
}
})
export default function App() {
return (
<ScrollView>
<EditorJsViewerNative data={dataFromEditorJs} />
</ScrollView>
);
}
Now the component MyHeader will render all data of type header.
If you want to render a custom block type, you can define a customTools in createEditorJsViewer config object.
// outputData.json
{
"blocks": [
{
"id": "customBlock_id2",
"type" : "randomColeredText",
"data" : {
"text" : "The color of this text is generated randomic"
}
}
]
}
import { ScrollView, Text } from 'react-native';
import { createEditorJsViewer, IHeaderProps, IComponentBlockProps } from "editorjs-viewer-native";
import dataFromEditorJs from "./data.json";
interface IRandomColeredTextData {
text: string;
}
// ! Any componente will receive "data" and "containerStyle"
// "data" contain the data of block
// "containerStyle" is a simple style to prevent margim top on first element or margimBottom on last component
const RandomColeredTextBlock = ({ block, containerStyle }: IComponentBlockProps<IRandomColeredTextData>) => {
const randomColor = `#${Math.floor(Math.random()*16777215).toString(16)}`;
return (
<Text style={[{ color: randomColor }, containerStyle]}>{block.data.text}</Text>
);
};
const EditorJsViewerNative = createEditorJsViewer({
customTools: {
randomColeredText: { // Name of your custom block type
Component: RandomColeredTextBlock
}
}
})
export default function App() {
return (
<ScrollView>
<EditorJsViewerNative data={dataFromEditorJs} />
</ScrollView>
);
}
Now the component MyHeader will render all data of type header.
If you want to show a message for unsupported blocks (good for test, bad for production) set showBlockFallback as true inside createEditorJsViewer config object.
const EditorJsViewerNative = createEditorJsViewer({
showBlockFallback: true // Update to "showBlockFallback" (before was unknownBlockFallback)
})
Feel free to clone/fork this project!
FAQs
A React Native viewer for JSON created by EditorJs
We found that editorjs-viewer-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.