-
Notifications
You must be signed in to change notification settings - Fork 11
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
Integration with WordPress page builder plugins #36
Comments
Hi, @rieckpil |
Thanks for the quick response! Is there any queuing mechanism for WordPress to include the resource for the plugin that I should use or should I just manually ensure that those static files are part of each |
@rieckpil |
I've added those three stylesheets and one JavaScript to my custom page that is built with a page builder plugin (Thrive Apprentice): and added the code snippet by hand with a |
This is strange. Maybe there are some errors in Browser console? You can try to debug the script in urvanov_syntax_highlighter.min.js especially: $(document).ready(function () {
UrvanovSyntaxHighlighterSyntax.init();
}); |
Oh. I understand. There should be some code in PHP side. |
It is not just Javascript highlighting. I was mistaken |
What PHP code would I need to add to those pages? |
In old Crayon there were possible to use it without any wordpress: In this forked version the code should be the same but with prefix UrvanovSyntaxHighlighter instead Crayon. You can try to adapt it. Unfortunately, I don't know how Thrive Architect works. You can try to check "Capture pre tags as Crayons" settings. Maybe it works already? Maybe it just turned off? I don't sure about Thrive Architect or any other page builders. I don't know how it works.. But the highlighting works for comments and standard posts of any type with just pre tag. Or it can be harder then we thought at the beginning |
Thanks for laying out potential next steps. I'll give it a try. btw. do you have a donation link for accepting USD or a PayPal account? The link on the WordPress plugin page is only for ₽/RUB. |
You can try here: https://paypal.me/urvanov |
I just tried to donate money but PayPal canceled the request with "The recipient can currently not receive money" 😓 |
lol |
Maybe it is just some restrictions 'cause I am in Russia. |
Okay, damn :/ Then I'll try it again in some weeks 👍 |
Thanks a lot for all your efforts in making the Crayon plugin work seamlessly with recent WordPress and PHP versions 💯
I don't have much experience with WordPress plugin development but wanted to ask what it would take to make the plugin work with other WordPress page builder plugins (Thrive Architect to be specific). Which scripts/resources would I have to include/enqueue for pages that are generated with a page builder? I don't need the widget for creating a new code snippet, adding the raw HTML via
<pre>...</pre>
would work for me if it then highlights the syntax correctly 👍If you could lay out a possible integration on a high level, that'd be great 🙌🏻
The text was updated successfully, but these errors were encountered: