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

Advice/Doc: Decorating onParsed #293

Closed
thepian opened this issue Sep 16, 2019 · 4 comments
Closed

Advice/Doc: Decorating onParsed #293

thepian opened this issue Sep 16, 2019 · 4 comments
Labels
is:FAQ candidate A canonical issue to put in the FAQ. meta

Comments

@thepian
Copy link

thepian commented Sep 16, 2019

Based on the documentation it seems straight forward to add methods/data to nodes in onParsed and used it in alterData. That approach doesn't seem to work however. Is there a recommendation somewhere for how to do it?

@itokun99
Copy link

same issue, we need more doc or implementation about altering node in this library. please advice

@jsamr jsamr added is:FAQ candidate A canonical issue to put in the FAQ. meta labels Jul 4, 2020
@r3dm4n
Copy link

r3dm4n commented Nov 1, 2020

Still no docs.

@jsamr
Copy link
Collaborator

jsamr commented Nov 2, 2020

onParsed returns the root elements of the render tree (a temporary structure later translated to react elements). In the documented example, a "mycustomblock" element is added after the fourth root element. This element could also have a children property. There are no exposed functions to help end-user building this data structure yet. The transient data structure is being currently revised and formalized to account for a good amount of limitations, including whitespace collapsing, see RFC #421. We will provide a more elaborated documentation when these changes are implemented though.

@jsamr
Copy link
Collaborator

jsamr commented Jan 16, 2021

I am closing because the onParsed utility will be discontinued in the foundry release (v6).

@jsamr jsamr closed this as completed Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:FAQ candidate A canonical issue to put in the FAQ. meta
Projects
None yet
Development

No branches or pull requests

4 participants