Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
Prevent update editor for readonly text
Browse files Browse the repository at this point in the history
  • Loading branch information
Andries Smit authored and Andries Smit committed Mar 28, 2019
1 parent 4247e7e commit 1090a92
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rich-text",
"widgetName": "RichText",
"version": "1.3.2",
"version": "1.3.3",
"description": "Rich inline or toolbar text editing",
"scripts": {
"start": "webpack-dev-server --hot --open",
Expand Down
2 changes: 1 addition & 1 deletion src/components/RichText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class RichText extends Component<RichTextProps> {
if (prevProps.readOnly && !this.props.readOnly && this.props.readOnlyStyle !== "text") {
this.setUpEditor(this.props);
}
if (this.quill && this.props.value !== this.quill.root.innerHTML) {
if (this.quill && this.props.value !== this.quill.root.innerHTML && !(this.props.readOnly && this.props.readOnlyStyle === "text")) {
this.updateEditor(this.props);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="RichText" version="1.3.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="RichText" version="1.3.3" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="RichText.xml"/>
</widgetFiles>
Expand Down

0 comments on commit 1090a92

Please sign in to comment.