pnp / sp-dev-fx-controls-react

Reusable React controls for SPFx solutions
https://pnp.github.io/sp-dev-fx-controls-react/
MIT License
383 stars 379 forks source link

quill.js:3195 addRange(): The given range isn't in document. #530

Closed ankurihg closed 1 year ago

ankurihg commented 4 years ago

quill.js:3195 addRange(): The given range isn't in document..

I am trying to integrate the same and it's simple but i am not getting why i am getting this warning and whenever i click outside the richtext box the text inside it disappears and nothing works.

export default class TestingTiny extends React.Component<ITestingTinyProps, ITestingTinyState> {
  constructor(props) {
    super(props);
    this.state = {
      richText: this.props.richText
    }
  }
  public handleEditorChange = (content, editor) => {
    console.log('Content was updated:', content);
    this.setState({ richText: content });
    this.props.onChange(content);
  }

  public render(): React.ReactElement<ITestingTinyProps> {
    return (
      <div className={ styles.testingTiny }>
        <div className={ styles.container }>
          <div className={ styles.row }>
            <div className={ styles.column }>
            <RichText value={this.props.richText}
              onChange={(text)=>this.props.onChange(text)}
            />
            </div>
          </div>
        </div>
      </div>
    );
  }
}

Package.json

{
  "name": "testing-tiny",
  "version": "0.0.1",
  "private": true,
  "main": "lib/index.js",
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  },
  "dependencies": {
    "@microsoft/sp-core-library": "1.10.0",
    "@microsoft/sp-lodash-subset": "1.10.0",
    "@microsoft/sp-office-ui-fabric-core": "1.10.0",
    "@microsoft/sp-property-pane": "1.10.0",
    "@microsoft/sp-webpart-base": "1.10.0",
    "@pnp/spfx-controls-react": "^1.17.0",
    "@tinymce/tinymce-react": "^3.5.0",
    "@types/es6-promise": "0.0.33",
    "@types/react": "16.8.8",
    "@types/react-dom": "16.8.3",
    "@types/webpack-env": "1.13.1",
    "office-ui-fabric-react": "6.189.2",
    "react": "16.8.5",
    "react-dom": "16.8.5"
  },
  "resolutions": {
    "@types/react": "16.8.8"
  },
  "devDependencies": {
    "@microsoft/sp-build-web": "1.10.0",
    "@microsoft/sp-tslint-rules": "1.10.0",
    "@microsoft/sp-module-interfaces": "1.10.0",
    "@microsoft/sp-webpart-workbench": "1.10.0",
    "@microsoft/rush-stack-compiler-3.3": "0.3.5",
    "gulp": "~3.9.1",
    "@types/chai": "3.4.34",
    "@types/mocha": "2.2.38",
    "ajv": "~5.2.2"
  }
}
ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

github-actions[bot] commented 4 years ago

Thank you for submitting your first issue to this project.

kunj-sangani commented 4 years ago

Hi @ankurihg

Can you please send the complete code Even can you try upgrading to the latest version which is 1.19.0 and check

michaelmaillot commented 1 year ago

Hi @ankurihg,

Do you still have issues with the RichText control?

ghost commented 1 year ago

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

ghost commented 1 year ago

Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.