jodit | Jodit - Best WYSIWYG Editor | Editor library

 by   xdan TypeScript Version: 4.2.10 License: MIT

kandi X-RAY | jodit Summary

kandi X-RAY | jodit Summary

jodit is a TypeScript library typically used in Editor applications. jodit has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

An excellent WYSIWYG editor written in pure TypeScript without the use of additional libraries. Its file editor and image editor.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              jodit has a medium active ecosystem.
              It has 1419 star(s) with 323 fork(s). There are 57 watchers for this library.
              There were 10 major release(s) in the last 6 months.
              There are 196 open issues and 609 have been closed. On average issues are closed in 38 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of jodit is 4.2.10

            kandi-Quality Quality

              jodit has 0 bugs and 0 code smells.

            kandi-Security Security

              jodit has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              jodit code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              jodit is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              jodit releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              jodit saves you 6301 person hours of effort in developing the same functionality from scratch.
              It has 19306 lines of code, 0 functions and 526 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed jodit and discovered the below as its top functions. This is intended to give you an instant insight into jodit implemented functionality, and help decide if they suit your requirements.
            • The configuration object .
            • Constructs an image editor .
            • Create an iframe document .
            • Adds event listeners to storage
            • Apply style to a font
            • Create a resizer instance .
            • Creates a new FileBrowser .
            • Initialize local files
            • Bind table navigation
            • send image files to upload
            Get all kandi verified functions for this library.

            jodit Key Features

            No Key Features are available at this moment for jodit.

            jodit Examples and Code Snippets

            How to upload image with Jodit uploader and coldfusion?
            JavaScriptdot img1Lines of Code : 51dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            
            
            
            
            
            
            
            
            
            
            
            
            
            
                
                     
            
                    arrayAppend(responseStruct["images"],"#this_image.serverFile#"); 
                
            
            
                
            #serializeJSON(responseStruct)#
            
            var editor = new Jodit('#editor',
                {
                   uploader: {
                   

            Community Discussions

            QUESTION

            Cannot find module 'enzyme' from 'src/setupTests.js'
            Asked 2021-Dec-28 at 15:38

            I'm trying to test a react component using both jest and enzyme, i've installed the necessary package for them, then configured my setupTests.js as shown below, but still have the same error that Enzyme module is not found, and "shallow" as well. this is where i am trying to use Shallow from enzyme

            ...

            ANSWER

            Answered 2021-Dec-28 at 15:38
            1. Install all these dependencies in dev. In my case I am using typescript, if you are using javascript, skip types. Run npm i -D and all these dependencies.

              @types/enzyme @types/enzyme-adapter-react-16 enzyme enzyme-adapter-react-16 jest-environment-enzyme jest-enzyme @testing-library/jest-dom @testing-library/react @testing-library/user-event @types/jest ts-jest

            2. In root of your project, create a file named jest.config.js and inside put this code :

            module.exports = { preset: 'ts-jest', testEnvironment: 'node', modulePathIgnorePatterns: ["/dist/"], };

            1. In the same root of the project, create a file called jest.config.unit.js and put this code there:

            Source https://stackoverflow.com/questions/70494999

            QUESTION

            `onBlur` is not triggered in 'Jodit` wyswig editor code editor mode, `useCallback` is not working correctly
            Asked 2021-Nov-14 at 15:38

            I have made a codesandbox example with my case and need help making it work. Here is the link to the example.

            Repro steps:

            1. Type something on the jodit editor
            2. Mouse click on the outside of the editor and you will see the log that says onBlur is triggered.
            3. Switch to code edit mode using icon on the top-left.
            4. Modify something on the html.
            5. Mouse click on outside of the editor and you will NOT see any additional log.

            My initial goal is to confirm this mechanism is by design or a bug and I tried to ask to the community before opening a ticket on the github repository.

            You may also have noticed that the logging system is not working properly in my example.

            I tried to stack all the logs - onChange, onBlur but it is showing only the last log. It works fine when I click on the Add button. Maybe there is something wrong with react hook usage.

            Can someone please help me with the above issues?

            1. onBlur is not triggered on code edit mode in the Jodit editor. Is it by design or a bug?
            2. Why do I see only the latest log instead of the stacked logs?

            Thank you in advance.

            ...

            ANSWER

            Answered 2021-Nov-14 at 15:38
            1. onBlur is not called because inside jodit a separate textarea is used to display the code, this is either a bug in jodit-react or in jodit itself
            2. Inside jodit-react callbacks for textarea are added inside useEffect which is called only when the config is changed.
              For the correct display of the logs you need to fix the way of saving the logs to the state

            Source https://stackoverflow.com/questions/69955663

            QUESTION

            I'm trying to insert some HTML into jodit-react editor on my cursor position, it somehow inserts but not exactly at my cursor position
            Asked 2021-Apr-04 at 17:07

            I'm trying to insert the following block on the cursor position:

            Inserted Text

            I've used following methods to get the exact cursor position:

            • this.jodit.selectionStart
            • window.getSelection().getRangeAt(0).startOffset

            my function buttonClick inserts it inside the line but is unable to recapture the changed cursor position when I try inserting it.

            ...

            ANSWER

            Answered 2021-Apr-04 at 10:27

            Add below in the config object

            Source https://stackoverflow.com/questions/66921304

            QUESTION

            How to add Jodit editor to dynamically added text areas?
            Asked 2021-Feb-17 at 20:30

            I have this JavaScript:

            ...

            ANSWER

            Answered 2021-Feb-17 at 20:13

            The following line will always target the first element with the editor class:

            Source https://stackoverflow.com/questions/66249172

            QUESTION

            Component can't find imported element anymore when being shared
            Asked 2020-Dec-16 at 18:47

            What I did so far: I imported a component into the share module because I want to use it on 2 different Modules. Now when I'm recompiling the app it says that jodit-editor which is used by the shared component is not a known element. (worked completely normal before shared the component)

            This is how the shared Component look like:

            ...

            ANSWER

            Answered 2020-Dec-16 at 18:47

            The JoditAngularModule should be added to the imports of the shared module for your shared component to 'know' the element 'jodit-editor'.

            This is the import statement.

            Source https://stackoverflow.com/questions/65327264

            QUESTION

            Import npm package into a Vue.js Single File component
            Asked 2020-Dec-05 at 21:21

            I would like to use Jodit in a SFC, but I am not sure how this is supposed to be done. I realized there is a wrapper (jodit-vue), but for educational purposes, I would like to know how it's done without it. I created a Vue CLI project with default presets, and all I changed is the App.vue:

            ...

            ANSWER

            Answered 2020-Dec-05 at 21:20

            The jodit module exports the Jodit constructor, so your component would import it like this:

            Source https://stackoverflow.com/questions/65161363

            QUESTION

            How to disable libCheck and warnings for a specific library in the node_modules folder?
            Asked 2020-Aug-21 at 12:18

            I keep getting warnings from TS files in a node_modules library, that I don't want to see.

            The library in question is this here: https://github.com/xdan/jodit

            I import the library in my app.tsx like such:

            ...

            ANSWER

            Answered 2020-Aug-21 at 12:18

            Ok there is no good clean way of doing this, however, I did find a way to make it work.

            Since I don't want any validation from another library's files I decided just to add // @ts-nocheck to the files that were trowing warnings.

            Now, you have to go into the node_modules folder and find the library, and add that comment to the first line of all the .ts files that are causing you problems.

            After that you want to use the https://github.com/ds300/patch-package#readme module to patch the library, so you don't have to make these changes manually every time you install the library.

            And the last step, if you feel up for it is to go fix the bugs in the library and submit a pull request.

            So:

            1. Add the ignore comment to the files causing errors in the node_modules folder
            2. Patch the package
            3. Enjoy!

            Source https://stackoverflow.com/questions/63493557

            QUESTION

            Jodit: pasting text that calls the html paste pop up fails
            Asked 2020-May-28 at 19:54

            I'm adding a Jodit editor to a webpage. I'd like to be able to paste formatted text from, say, MS Word, into the editor. I can paste text that does not call the little pop-up for pasting html text, but not text with formatting. The console logs a warning that addRange(): The given range isn't in document. Indeed, logging window.getSelection().rangeCount returns 0 (instead of 1 in other cases). I have no idea what is wrong as pasting from various programs, of course, works on the website. Am I missing an event?

            ...

            ANSWER

            Answered 2020-May-28 at 19:54

            The problem was that the editor was in an ag-grid cell. The different selections in the dialog box when pasting from MS Word into the editor lay outside of the ag-grid cell, and therefore clicking in the dialog ended the ag-grid session mid-edit! As the behavior I was looking for is to keep the formatting, I simply turned off the dialog box (askBeforePasteFromWord: false, askBeforePasteFromHTML: false). To still handle the pasting from MS Word (because MS Word), added in Jodit's author's code to auto-handle (https://github.com/xdan/jodit/issues/197):

            Source https://stackoverflow.com/questions/61765207

            QUESTION

            Jasmine: Jodit is not defined, Unit testing
            Asked 2020-Apr-14 at 11:48

            I'm trying to test our customized Jodit editor in app but even automatic 'should create' test is failed. Failure message is 'Jodit is not defined'.

            jodit.component.ts

            ...

            ANSWER

            Answered 2020-Apr-14 at 11:48

            In your .spec.ts file, you have to import Jodit and bundle it the same way you have in your jodit.component.ts. Maybe the imports array of TestBed.configureTestingModule needs it as well.

            Add a typescript library to angular

            Check that out but in your tests you have to import it as well.

            I would use the Angular wrapper though if I were you: https://github.com/jodit/jodit-angular

            Source https://stackoverflow.com/questions/61206886

            QUESTION

            Fix vulnerabilities in NPM manually
            Asked 2020-Jan-27 at 10:30

            I cloned a repository and did an npm install but at the end some error occured. Now whenever I run npm audit I get the message

            ...

            ANSWER

            Answered 2020-Jan-27 at 10:30

            You'll have to use npm audit and actually read the audit log. In there will be advice on which versions can be installed to fix vulnerabilities.See https://docs.npmjs.com/cli/audit for more information on npm audit.

            Vulnerabilities

            You can get a report of all vulnerabilities using npm audit. In that report for each vulnerability you will also see a way to fix it. When you use npm audit fix you are telling npm to execute those fixes. Npm however will not automatically install fixes that might break your project, such as major versions changes. You'll have to manually execute the npm install commands for those if you decide the vulnerability is more important than having to deal with the possible breaking change.

            Peer dependencies

            Another common warning are peer dependency warnings. Peer dependencies specify not dependency, but compatibility. Check out this post for a way better explanation on peer dependencies: https://stackoverflow.com/a/34645112/1016004

            You can see a peer dependency warning for 2 reasons: the specified peer dependency is missing, or the peer dependency is of the wrong version. In both cases you will have to figure out the correct response yourself. The core question to answer is whether you can install the dependency in your project:

            • Do you use any deprecated features that will be removed in an update, do any breaking changes apply to your code, ...?
            • Do you have to revert to a version with a known vulnerability that you use in such a way that it might endanger user data, ... ?

            The simple solution, not recommended for production, is to just manually try to run npm install for both the vulnerabilities and peer dependencies with the proposed versions. Be sure to have version control or backups so that you can revert if you end up with more errors than you started with.

            If the simple solution doesn't cut it you'll have to look for other versions of packages that are part of the unsolvable constraints. Maybe previous versions of any of those packages can work together?

            Source https://stackoverflow.com/questions/59922953

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install jodit

            You can download it from GitHub.

            Support

            Internet Explorer 11Latest ChromeLatest FirefoxLatest SafariMicrosoft Edge
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i jodit

          • CLONE
          • HTTPS

            https://github.com/xdan/jodit.git

          • CLI

            gh repo clone xdan/jodit

          • sshUrl

            git@github.com:xdan/jodit.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Editor Libraries

            quill

            by quilljs

            marktext

            by marktext

            monaco-editor

            by microsoft

            CodeMirror

            by codemirror

            slate

            by ianstormtaylor

            Try Top Libraries by xdan

            datetimepicker

            by xdanJavaScript

            autocomplete

            by xdanJavaScript

            flipcountdown

            by xdanJavaScript

            jodit2

            by xdanJavaScript

            range2dslider

            by xdanJavaScript