Skip to content
New issue

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

Using UNSAFE_componentWillReceiveProps #89

Open
duypham90 opened this issue Aug 9, 2020 · 0 comments
Open

Using UNSAFE_componentWillReceiveProps #89

duypham90 opened this issue Aug 9, 2020 · 0 comments

Comments

@duypham90
Copy link

duypham90 commented Aug 9, 2020

Hello @olezhek85,
I see the old PR before that of you: https://github.com/summernote/react-summernote/pull/83/files

I have some issue in console log when use this library
I attached the file and the way I used it below,
Please help me take a look it.
Thanks

image

import React from 'react';
import './globals';
import ReactSummernote from 'react-summernote';
import 'react-summernote/dist/react-summernote.css';
import 'react-summernote/lang/summernote-vi-VN';
import '~/../bootstrap/js/dist/modal';
import '~/../bootstrap/js/dist/dropdown';
import '~/../bootstrap/js/dist/tooltip';

export default function Form() {

  function onChange(content: any) {
    console.log('onChange', content);
  }

  return (
    <div className="container">
      <ReactSummernote
        value="Default value"
        options={{
          lang: 'ru-RU',
          height: 350,
          dialogsInBody: true,
          toolbar: [
            ['style', ['style']],
            ['font', ['bold', 'underline', 'clear']],
            ['fontname', ['fontname']],
            ['para', ['ul', 'ol', 'paragraph']],
            ['table', ['table']],
            ['insert', ['link', 'picture', 'video']],
            ['view', ['fullscreen', 'codeview']]
          ]
        }}
        onChange={onChange}
      />
    </div>
  );
}

Here is the package.json

{
  "name": "trendsvn",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "bootstrap": "^4.5.0",
    "jquery": "^3.5.1",
    "node-sass": "^4.14.1",
    "popper.js": "^1.16.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-google-login": "^5.1.21",
    "react-router-dom": "^5.2.0",
    "react-scripts": "3.4.1",
    "react-summernote": "^2.0.2",
    "typescript": "~3.7.2"
  },
  "scripts": {
    "start": "set HTTPS=true&&react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "@types/jest": "^24.0.0",
    "@types/node": "^12.0.0",
    "@types/react": "^16.9.43",
    "@types/react-dom": "^16.9.0",
    "@types/react-router-dom": "^5.1.5",
    "@types/jquery": "^3.5.1"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant