[MGNLFE-31] In React library, cannot get inEditor, inEditorPreview outside a page Created: 18/Mar/20 Updated: 20/Apr/20 Resolved: 08/Apr/20 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Canh Nguyen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 5m | ||
| Time Spent: | 2d 7h 25m | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Epic Link: | SPA Editor |
| Sprint: | 6.2.1 Ramp-up 21 |
| Story Points: | 2 |
| Description |
|
In the angular-editor library, it is straightforward to get the inEditor and inEditorPreview statuses via a fiunction call. In the react-editor library it is not available from the hosting app. Please change the react-editor library to make this a simple function call as in the angular library. Workaround - reimplemnt the window and mgnlRefresh checking in your own app. Reason Apps need to know if they are running in the context of the Page editor BEFORE they instantiate a <Page> component - because they need to decide whether to load the tempalateDefinition REST endpoint or not. |