ponzu-cms / ponzu

Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
https://docs.ponzu-cms.org
BSD 3-Clause "New" or "Revised" License
5.7k stars 384 forks source link

Extending the rich text editor to add code #238

Closed msmshazan closed 5 years ago

msmshazan commented 6 years ago

Is it possible to extend the rich text editor to add code with syntax highlighting? If so then how? I know it's possible to add code using the quill editor.

nilslice commented 6 years ago

@msmshazan - it is possible, but you would need to load a plugin. The rich text editor is created using a custom version of Summernote called Materialnote

You technically can add options to this, but it might be easier to just implement your own input field type. I'm sorry I don't have more direction for you, but please feel free to keep this issue open and track progress or ask questions if you decide to create your own input type. For examples of existing Ponzu editor inputs, see the Richtext implementation here: https://github.com/ponzu-cms/ponzu/blob/master/management/editor/elements.go#L217

olliephillips commented 5 years ago

Closing this issue. It appears to be answered/resolved. Please reopen if not the case.