backdrop-ops / forum.backdropcms.org

The Forum for BackdropCMS.org.
https://forum.backdropcms.org/
4 stars 10 forks source link

Add a "Code" button on the forum CKEditor #76

Open docwilmot opened 5 years ago

docwilmot commented 5 years ago

Instead of having to use styles dropdowns.

jenlampton commented 4 years ago

Is there already a code button in ckeditor, or do we need to write our own?

serundeputy commented 4 years ago

looks like there exists a button: https://ckeditor.com/docs/ckeditor4/latest/examples/codesnippet.html

works nice too.

need to figure out how to add that to our button set.

yorkshire-pudding commented 1 year ago

There are some contrib modules now that I think would work well: https://github.com/backdrop-contrib/ckeditor_codesnippet https://github.com/backdrop-contrib/prism https://github.com/backdrop-contrib/highlightjs https://github.com/backdrop-contrib/highlightjs_wysiwyg

I haven't evaluated these, but we really really need some flexible code formatting to make the best of the forum as a place to find answers. I don't if possible but it would also be good to have the details - summary containers that we have on github so when someone pastes in the json from a view, it can be collapsed.

klonos commented 1 year ago

Whatever the solution we end up with, we need to implement it in the b.org site, as well as the API/docs site, since we are using code snippets there as well.

jenlampton commented 1 year ago

The other sites don't usually have editors where we use codefilter, so I don't think we have editor integration anywhere, yet. Let's just be careful not to duplicate that filter, if we choose an alternative filter (with editor integration) we should remove codefilter and confirm the pages still render properly afterword (we may need some theme updates).

On Fri, May 12, 2023, 5:33 AM Greg Netsas @.***> wrote:

Whatever the solution we end up with, we need to implement it in the b.org site, as well as the API/docs site, since we are using code snippets there as well.

— Reply to this email directly, view it on GitHub https://github.com/backdrop-ops/forum.backdropcms.org/issues/76#issuecomment-1545672256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADBER5PH2OHV5CSG3W22E3XFYUX5ANCNFSM4GNEOFVA . You are receiving this because you commented.Message ID: @.***>