Kevin Batdorf
Forum Replies Created
-
So you mean have it render on the server, or something else? If so, it’s not possible because the block renders in the browser (as you type), and not on the server.
There’s not as the plugin hooks into the core editor. Divi would have to add support for the editor for it to work.
So you have two options I think.
- Advanced but effecient: Go to the link I shared above, copy the code, and add it to your theme. However, if you have a non-custom theme that could get an update (for example if you downloaded the theme somewhere instead of custom made), it would override this change. In that case you have the option of using a “child theme” or adding a “must use plugin” but just let me know if you want me to explain those.
- Use a plugin to adjust user capabilities. This one from PublishPress looks perfectly fine and has high usage. The team there looks active in maintaining the plugin and supporting users, so I’d argue it’s trustworthy to install (should always evaluate everything you add though). They should provide an admin interface for adding it.
Let me know if still stuck though and I’ll help debug any issues.
Forum: Plugins
In reply to: [Code Block Pro - Beautiful Syntax Highlighting] hide scroll barHey, right now there is no built in solution, but are you comfortable adding some CSS? Can you see this issue here where another user provided a solution? https://github.com/KevinBatdorf/code-block-pro/issues/250#issuecomment-2302015099
Here’s the snippet though:
div[class*='code-block-pro']:not(.x) pre span.line {
white-space: pre-wrap;
}Hey, so to allow authors and others to add html to a page, right now you need to give them the unfiltered_html capability. The reasoning is that wordpress will strip out any html otherwise, so you’d end up with broken code blocks. I built the plugin to persist the entire html markup so that it works in a completely static way so that it requires no serverside processing.
Are you okay giving them that permission? If so, then you can just add this code snippet to give them access: https://neilsonwebdesign.com/filtering-user-capabilities-in-wordpress/
its just a cosmetic/presentation decision though. If someone copies your code either with the copy button or by manually selecting the text and copying it, they will get the literal characters you typed in, not anything different.
I’m not disagreeing with you in principle though.I’m happy to consider to feedback, of course, and adapt the plugin over time. I know what I prefer personally might not be the best choice “ethically” as a default (most people use the default settings so I have a responsibility to make those settings the best for the community as a whole).
I’ll ask around and get some more opinions on it too.
its really just a stylistic choice, I guess. I personally like ligatures so I made that the default. I understand not everyone does though. What can I really do besides flip a coin and choose a setting, right? I went with my own preference (love it or hate it).
But I think regardless it would copy/paste the normal characters either way.
Forum: Plugins
In reply to: [Pattern CSS - Pattern and Block Styles] does this work in FSE-edit-mode?hey yeah it should work anywhere a pattern exists. I know you said you figured it out but did everything work as expected? I don’t get much feedback here so I appreciate everything!
Hey Bryan, if you go to the settings area and look for fonts, you can change the font to a non-ligature style font.
I believe if you copy paste the code even with ligatures enabled it’s still valid c++ though as you’re not getting the single character. It’s purely for style. But you can choose from multiple front styles there.
Let me know if that doesn’t work.Forum: Reviews
In reply to: [Animate In View] Boy, this is good!Hey, thanks for the review and feedback! It should fade in actually already, and if you set the starting position to “none” then it won’t slide. Is that what you’re looking for?
As for the remaking of the block, yeah I can see that being an issue. The only way around that would be is if I added the functionality as a filter to every block. I’m not sure that would be welcomed though. Maybe as an “advanced mode” or something I could enable that. What do you think?
Forum: Reviews
In reply to: [Code Block Pro - Beautiful Syntax Highlighting] best plugin for block editorHey thanks for the review and the tip. I’m actually not sure how to handle that because this is only required in non-block themes. Block themes will have spacing applied to every block, so if I add it for everyone, those themes would have too much spacing.
I’ll look into it though more closely. Maybe I can keep the specificity low so that those block theme override whatever I put.
Forum: Reviews
In reply to: [Pattern CSS - Pattern and Block Styles] never delete reviewI’m happy to provide support. Not sure whether you saw my last two replies or not. The mods will delete reviews that are actually support requests, as it’s just not the place for them (they may delete this one as well). Better to post on the support forum so others can see if they are having the same issue.
https://www.ads-software.com/support/plugin/pattern-css/
You can also open an issue on GitHub too https://github.com/KevinBatdorf/pattern-css/issues
Can you tell me what page you’re on (editing a post?), and which block it’s crashing on? I can fix it if I can reproduce it locally.
- This reply was modified 4 months ago by Kevin Batdorf. Reason: grammar clarity
I can give you some CSS for line wrapping. There’s a few issues on GitHub too where it has been discussed too. You can check those out:
https://github.com/KevinBatdorf/code-block-pro/issues?q=line+wrap
For global styling, I need to rewrite the plugin to support a big breaking change in the underlining engine, and given that Gutenberg doesn’t have a clean path toward upgrading blocks that change their underlining implimentation (unless you support both old and new), I need to plan it out a bit more. It’s likely I’ll have to support two versions of the block, and then just default to the new block for future blocks. The next version, however, will be powered by css variables, so a global settings could be used to override them.
I do want to have some way to upgrade existing blocks if it’s possible, but I don’t currently know what that will look like, I also don’t have a timeline when any of this will be done as It’s a pretty big undertaking. it’s definitely something I want to do though. Sorry it’s not the greatest news!
Thanks for the review and for giving it a try!
Forum: Reviews
In reply to: [Code Block Pro - Beautiful Syntax Highlighting] Perfect!Thank you for giving it a try ??