Open tilsammans opened 6 years ago
@tf I have an idea how to get this working again!
How about page contents get stored in Redux, instead of the component itself? It would fix everything I am pretty sure.
Can you elaborate? As part of the seed data, page content is already held in the redux store.
What if I
UPDATE_PAGE_ATTRIBUTE
with the changed HTML as value?That might work. Still the actual work of parsing HTML, rendering embeds and replacing links would be pretty much the same - just in the context of a a Redux reducer instead of the PageContent
component, right?
Yes!
And if there is no published API in the reducer to work with the configuration attributes, I am sure we can formalise them to some extent. It seems useful to have the individual elements separately.
(my long-standing wish to change the h2 span
titles to regular headings, for example. 😉)
I'd be totally open to discuss such an API. Still, from my point of view, the hard part is performing the parsing/rendering - ideally in a SSR compatible way. Once that's figured out, deciding whether to introduce an API that is used by the PageContent
component directly or integrating it via Redux looks a bit like a second step.
The h2 span
battle still would have to won on the component level, though. :wink:
12.0.0.pre is not compatible with Pageflow 12.
I need to figure out how to mesh with ReactDOM over there.