Page 2 of 2

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

Posted: Mon Jul 27, 2020 4:59 pm
by ludera
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

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

Posted: Mon Jul 27, 2020 5:15 pm
by Edi
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.

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

Posted: Mon Jul 27, 2020 5:21 pm
by ludera
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

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

Posted: Mon Jul 27, 2020 5:36 pm
by Edi
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?

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

Posted: Tue Jul 28, 2020 10:37 am
by ludera
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.

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

Posted: Tue Jul 28, 2020 11:31 am
by Edi
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!