Please add <code> tags or similar to the editor to add code!

User avatar
ludera
Ssr. Bludit
Posts: 20
Joined: Wed Apr 01, 2020 6:22 pm

Wow. That was fast! Thanks for that.
I downloaded the plugin, changed the Css and Js files with the ones that contain the languages and settings I wanted (just a subset of the languages available).

Is this supposed to add css to the colouring of the code. Well... it doesn't. Am I doing something wrong? I checked the posts that already had some code snippets added with tiniMCE
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Which language do you need?

TinyMCE supports: HTML, XML, JavaScript, CSS, Ruby, Python, Java, C, C#, C++. The CSS for these are included in the plugin.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
ludera
Ssr. Bludit
Posts: 20
Joined: Wed Apr 01, 2020 6:22 pm

Oh, ok. Then I'm ok with those. I'd include GLSL and HLSL, but it's ok if it doesn't have it.

Right now what is failing is c#, it comes by default. Should I do something else? I uploaded the plugin, activated it, and then reloaded the website. The colors work on the editor, but when saved it doesn't show the colors.

Thanks
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

ludera wrote: Mon Jul 27, 2020 5:21 pm Right now what is failing is c#, it comes by default.
Strange. It works with my test installation.

Have you choose C# in the drop-down list with the languages of TinyMCE?

Which theme do you use?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
ludera
Ssr. Bludit
Posts: 20
Joined: Wed Apr 01, 2020 6:22 pm

Ok! I fixed it. The problem was that the folder name on the zip file of the plugin was prism-1.0 . You have to remove the -1.0 . So it should be just prism/

Summary of what you have to do to add code snippets to Bludit:
  • Make sure you upload the plugin folder with the name bl-plugins/prism/ so that plugin.php is inside that folder
  • Go to your dashboard -> Plugins -> Activate Prism
  • Enable TinyMCE editor on the plugins list.
  • Add the word "codesample" again to the Plugins field too.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

ludera wrote: Tue Jul 28, 2020 10:37 am Ok! I fixed it. The problem was that the folder name on the zip file of the plugin was prism-1.0 . You have to remove the -1.0 . So it should be just prism/
Yes, that's a problem with the releases on GitHub. Perhaps I should add another archive just with the name "prism".

It is explained in the file readme, but this can be overlooked.

Thank you for your patience!
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply