You can’t set settings for python or css or plaintext. You should set it every time you choose language again, again and again. If you have a lot of source codes on you site it’s a pain to use it.
- This topic was modified 3 months, 2 weeks ago by sergeyklochko.
Hey Sergey, it should save the last settings configuration you used, so if you spend time setting it up on code block 1, when you add code block 2 it should match.
Can you describe your workflow a bit? When you switch from css to python, for example, are you also changing a lot of the other settings?
Let me explain. I started populating my site and tried a few plugins. Yours seemed to be really the best. I chose it and started making pages. Each one has 4-10 blocks of python, console or some data. 3 slightly different design styles. I filled everything in with copy-paste. Around page 40 I found a typo in one of the earlier examples and decided to fix them right on the page. I suddenly discovered that the tab size for python is 2 spaces. I fixed it to 4, but it turns out that this fix only works for this window and doesn’t affect the others. Then it turned out that changing the titles or themes, doesn’t change any other settings in the other examples. So there is no way to get a consistent look across the entire site except to go through all the boxes and make manual changes.
With the exception of this nuance – a great plugin. I bought themes, because I thought that suddenly for money will be available a little bit more functionality, but then I realized that it will not help me in any way. I would like to use a new theme (with dark/light mode support) for each type of code blocks, but I can’t do it once for the whole site. And fixing 160 pages of 4-10 blocks by hand is a hell of a job. My site grow and will be 250+ pages soon. It’s looks like choosing your plugin was a mistake.
- This reply was modified 3 months, 2 weeks ago by sergeyklochko.
I understand now. This is valuable feedback, thank you.
The issue is that the plugin renders entirely in the VS Code syntax engine (oniguruma/textmate) right in the browser as you type. The highlighting is dynamically applied right there, then stored in the database pre-rendered. This works in contrast to other plugins that do the rendering in the browser every time the user requests a page. So just given how the plugin works, it’s not even possible to have a global setting like this.
It’s a tradeoff of performance for your users for this inconvenience. I felt it was worth it, but maybe I need to do a better job at communicating this tradeoff.
However, I have been brainstorming some ideas to combat this. For example, I was thinking I could add an admin page that loads up every code block on your site, and gives you the ability to apply a style there. So if you have 200 python code blocks, I could load in all of those, and you could make a style change, then press a button to apply it to all of them. It would need to render them in the browser still (so could be slow), but there would be a tool to at least make it less painful than manually going back page by page.
Does that seem like a reasonable approach? An admin page to manage this process?
Okay I’ll focus on that next. Stay tuned. Thanks again for the feedback on this. I don’t know exactly when I can deliver it but I’ll comment here when it’s ready to try out.
If anyone ends up here and wants to follow progress on this. I’ve opened an issue on GitHub with some thoughts (feedback is always welcome and encouraged!): https://github.com/KevinBatdorf/code-block-pro/issues/268
- You must be logged in to reply to this review.