Code Monkey home page Code Monkey logo

editorjs-mention-tool's People

Contributors

kreudev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

geekyayush

editorjs-mention-tool's Issues

vanilla example

Hello, great work @kreudev ! This was really a missing piece in EditorJS.
Is it possible to get a working example code without react ? using the default configuration there is a small issue


        var editor = new EditorJs({tools: {
            mention: {
                class: MentionTool,
                config: {
                    holder: 'editorHolder', // This is the editor Holder ( see below )
                    accessKey: "@", // Access key ( $ or @ )
                    allUsers: [ // The array with the data you want to show when the users type $
                        {
                            "id": "1234",
                            "name": "Variable 1",
                            "slug": "variable1"
                        },
                        {
                            "id": "12345",
                            "name": "Thing of v1",
                            "slug": "variable1.something"
                        },
                    ],
                    baseUrl: '', 
                    searchAPIUrl: ''
                }
            },
[..]
});

editor.js:2 Paste handling for «mention» Tool hasn't been set up because of the error TypeError: Cannot read properties of undefined (reading 'forEach')
    at MentionTool.cacheAllUsersAsUserListItems (index.js:273:1)
    at new MentionTool (index.js:54:1)
    at n.value (editor.js:2:429389)
    at e.processTool (editor.js:2:227620)
    at Array.forEach (<anonymous>)
    at w.value (editor.js:2:231492)
    at w.<anonymous> (editor.js:2:228716)
    at p (editor.js:2:356625)
    at Generator.<anonymous> (editor.js:2:357976)
    at Generator.next (editor.js:2:356996)

i'm getting this error on selecting mentions

Unhandled Runtime Error
NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

Call Stack
HTMLDivElement.eval
node_modules/editorjs-mention-tool/src/index.js (683:0)

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.