-
Notifications
You must be signed in to change notification settings - Fork 151
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
Prism plugins #2
Comments
No, they’re unfortunately not :) The point is more or less that it’ll be a quick affair to implement most visual features from scratch, (although libraries on top of this one aren’t out of the question of course.) The CodeSandbox example has a small line number indicator for instance. |
@kitten I'm wondering what are the challenges in supporting existing Prism plugins. And could you share the CodeSandbox example link ? |
@detj The challenge is that this is purely intended to render to React with no output that is target by Prism's existing plugins. So you'd choose this library specifically to build a specific style of code highlighting in React :) So it's about granularity |
maybe provide a hooks version just like https://github.com/tannerlinsley/react-table, will be easy to implement a plugin, just like const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
state: { expanded },
} = useTable(
{
columns: userColumns,
data,
},
useExpanded // Use the useExpanded plugin hook
) |
Are Prism plugin supported? I guess not since they operate in DOM Nodes.
The text was updated successfully, but these errors were encountered: