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

@LucasR93
Copy link
Contributor

LucasR93 commented Mar 8, 2019

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 Mar 12, 2019
Copy link
Owner

Sub6Resources left a comment

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. 😉

@elsesiy

This comment has been minimized.

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

This comment has been minimized.

Copy link
Owner

Sub6Resources commented Mar 18, 2019

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

@elsesiy

This comment has been minimized.

Copy link

elsesiy commented May 1, 2019

@Sub6Resources Any update on this? Thanks!

@Sub6Resources Sub6Resources merged commit fdd8c29 into Sub6Resources:master May 13, 2019
2 checks passed
2 checks passed
WIP Ready for review
Details
ci/circleci: build Your tests passed on CircleCI!
Details
@Sub6Resources

This comment has been minimized.

Copy link
Owner

Sub6Resources commented May 13, 2019

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.