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

Custom tags or classes #2

Closed
britzl opened this issue Feb 26, 2018 · 1 comment

Comments

@britzl
Copy link
Owner

commented Feb 26, 2018

Add the ability to apply custom tags and then provide a function to return all nodes with a specific tag/class

@britzl

This comment has been minimized.

Copy link
Owner Author

commented Feb 27, 2018

Fixed in https://github.com/britzl/defold-richtext/releases/tag/2.0.0

local words, metrics = richtext.create(...)
local bold_words = richtext.tagged(words, "b")
for _,bold_word in pairs(bold_words) do
	print(bold_word.text, bold_word.node)
end

@britzl britzl closed this Feb 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.