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

Added custom textstyle and edgeinsets callback #72

Merged
merged 2 commits into from
May 13, 2019

Conversation

lucasreiners
Copy link
Contributor

Hi, first of all: really great work, I really appreciate it!
For a recent project we were missing the possibility to change the textstyle and the margins of specific elements when we use the "useRichText" flag.
I implemented CustomEdgeInsets and CustomTextStyle callbacks in the style of your CustomRender to provide custom textstyles to the element and margins to the containing BlockText object.

The CustomTextStyle callback supplies the node and the childStyle, so we can use the childStyle to modify it (e.g. change color depending of a css class) or simply create a completely different style.

@Sub6Resources Sub6Resources self-requested a review March 12, 2019 04:29
Copy link
Owner

@Sub6Resources Sub6Resources left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a great pull request. Do you think you could also add support for the HtmlOldParser? If not, let me know and I can do it myself. I don't have a lot of spare time, though, so it will probably take a couple weeks to merge this if I do it myself. 😉

@Sub6Resources Sub6Resources added the enhancement New feature or request label Mar 12, 2019
@elsesiy
Copy link

elsesiy commented Mar 18, 2019

@Sub6Resources If I see this correctly, the HtmlOldParser already has support for an even broader customization through the customRender. Adding the Insets and TextStyle would be redundant IMHO. What do you think?

@Sub6Resources
Copy link
Owner

@elsesiy You're right. I didn't think of that before. I'll work on merging this.

@elsesiy
Copy link

elsesiy commented May 1, 2019

@Sub6Resources Any update on this? Thanks!

@Sub6Resources Sub6Resources merged commit fdd8c29 into Sub6Resources:master May 13, 2019
@Sub6Resources
Copy link
Owner

This has been released in version 0.9.7. Thank you for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants