We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let's say I want to add an input text that allows entering only numbers.
How I would do that?
I saw in the editor.js docs a way to create a new tool, but I don't know how to replicate that in the React example that you provided.
I tried:
import React from 'react'; const Input = () => { const toolbox = { title: 'Input', icon: 'https://pics.freeicons.io/uploads/icons/png/6621521691571183084-512.png' }; const render = () => { return <input type="text" />; } const save = (blockContent) => { return { url: blockContent.value }; } return { toolbox, render, save }; } export default Input
And then I imported it into the content.js file as:
import Embed from "@editorjs/embed"; import Table from "@editorjs/table"; import List from "@editorjs/list"; import Warning from "@editorjs/warning"; import Code from "@editorjs/code"; import LinkTool from "@editorjs/link"; import Image from "@editorjs/image"; import Raw from "@editorjs/raw"; import Header from "@editorjs/header"; import Quote from "@editorjs/quote"; import Marker from "@editorjs/marker"; import CheckList from "@editorjs/checklist"; import Delimiter from "@editorjs/delimiter"; import InlineCode from "@editorjs/inline-code"; import SimpleImage from "@editorjs/simple-image"; import Input from "./input/input.js" export const EDITOR_JS_TOOLS = { embed: Embed, table: Table, marker: Marker, list: List, warning: Warning, code: Code, linkTool: LinkTool, image: Image, raw: Raw, header: Header, quote: Quote, checklist: CheckList, delimiter: Delimiter, inlineCode: InlineCode, simpleImage: SimpleImage, input: Input };
But it doesn't work.
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I have a similar use case. @GilbertMizrahi were you able to achieve this?
Sorry, something went wrong.
No branches or pull requests
Let's say I want to add an input text that allows entering only numbers.
How I would do that?
I saw in the editor.js docs a way to create a new tool, but I don't know how to replicate that in the React example that you provided.
I tried:
And then I imported it into the content.js file as:
But it doesn't work.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: