-
Notifications
You must be signed in to change notification settings - Fork 19
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
A Few Things... #28
Comments
Maybe const preset = reactPreset.extend((tags, options) => ({
+ ...tags,
quote: node => ({
tag: "blockquote",
content: node.content
})
})) If this is the issue I'd be happy to submit a PR to update the docs. UPDATE: That does seem to be the issue, I'll submit a PR (#29). |
When using `@bbob/react`s `<BBCode>` component, the following error is thrown if this change is not included... ``` Warning: Each child in a list should have a unique "key" prop. ``` Mentioned in JiLiZART#28
@JiLiZART take a look when you get a chance and let me know your thoughts. I'm pretty much done for now (have been integrating into a project it over the last day or two) but I'm still happy to help with these issues. I submitted PRs for the obvious fixes/updates but I wanted to hear what you had to say on the other things before moving forward. Again, thanks for your work on this project. |
Maybe I could apply the lowercase here? I don't know if there's any other implications, but in my experience all bbcode tags should be fine lower-cased. |
Yes, |
@skipjack Thanks for contributing! Any help would be helpful. |
When using `@bbob/react`s `<BBCode>` component, the following error is thrown if this change is not included... ``` Warning: Each child in a list should have a unique "key" prop. ``` Mentioned in #28
i use version 2.5.2
has error
i seen #42 seem fix this issue ? |
I just published 2.5.3 you can try |
@JiLiZART thanks, it's work for me |
I freeze this due inactivity |
First I want to start by saying this library is fantastic, thanks for your work on it. Before using this lib, I tried regexes which ended up getting overly complex and slow. I'm happy to submit PRs for everything below, just wanted to talk through some of it through beforehand.
I noticed a few bugs so far...
PropTypes
error from@bbob/react
(fix(react): fix broken prop type definition #27).reactPreset.extend
doesn't work, butpresetHTML5.extend
does (docs: correct react preset usage #29).Warning: Each child in a list should have a unique "key" prop.
with react (fix(bbob-react): removeunique "key" prop
warning #30).[*]
tags inside lists don't work in react.These ones are necessary, but would be nice to have...
getUniqAttr
fromplugin-helpers
so preset authors and consumers can use it.Uppercase Tags
For example, something like
[B]
kind of works in the demo because most browsers will automatically recognize and lowercase it (at least in the inspector) so it will still be rendered. That said the styling attributes you're adding with theb
definition are lost and the demo only shows it bold because of default browser styling.In react however, the following error is thrown:
To fix this issue, I simply injected a little preset before the main one to lowercase all tag names:
That works, but feels a little hacky so I'm thinking this probably makes sense as a built-in but I'm not sure where to put it.
The text was updated successfully, but these errors were encountered: