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

RichText view mode trouble #287

Closed
vvvvvvvesna opened this issue Apr 29, 2019 · 5 comments
Closed

RichText view mode trouble #287

vvvvvvvesna opened this issue Apr 29, 2019 · 5 comments
Labels
status:fixed Issue fixed in current or prior release. type:bug

Comments

@vvvvvvvesna
Copy link

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

version of the library: [1.13.0]

Expected / Desired Behavior / Question

No problem work in view mode

Observed Behavior

If youre try to open page with rich text editor in view mode it will not render complete. Need to click edit page then publish it, and only then it will display correctly.

Steps to Reproduce

1)Build webpart with rich text editor
2) pass dynamic isEditMode to props of Richtext Editor
3) Deploy it on page
2) Open page - there are no text editor. Click edit - it appear. click Publish - all ok. Reload page - here we go again

image

@niranjan747
Copy link

Facing the same issue , any updates to this ?

@estruyf
Copy link
Member

estruyf commented May 17, 2019

@hugoabernier any chance you can take a look at this?

@estruyf estruyf assigned estruyf and unassigned estruyf May 17, 2019
@joeljeffery
Copy link
Contributor

joeljeffery commented May 23, 2019

Here's a quick hack if anyone needs this right now:

image

class SafeRichText extends RichText {
  public componentDidMount() {
    if (this.props.isEditMode) {
      super.componentDidMount();
    }
  }
}

Swap <SafeRichText /> in place of <RichText />

Here's the original code:
image

I think the brace at line 140 needs to be moved down to line 149, then the problem should go away :)

Joel

@estruyf
Copy link
Member

estruyf commented Jul 9, 2019

@joeljeffery has fixed this, and the changes are applied in the latest beta version of 1.14.0. Please feel free to test it out. More information about how to use a beta version can be found here: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/

@joelfmrodrigues
Copy link
Collaborator

Closing as fixed

@joelfmrodrigues joelfmrodrigues added the status:fixed Issue fixed in current or prior release. label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed Issue fixed in current or prior release. type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants