[#4106] added custom Prism.js bundle and registered new TinyMCE codesample languages
This commit is contained in:
@@ -1433,6 +1433,32 @@ export default class CommonHelper {
|
||||
"codesample",
|
||||
"directionality",
|
||||
],
|
||||
codesample_global_prismjs: true,
|
||||
codesample_languages: [
|
||||
{ text: 'HTML/XML', value: 'markup' },
|
||||
{ text: 'CSS', value: 'css' },
|
||||
{ text: 'SQL', value: 'sql' },
|
||||
{ text: 'JavaScript', value: 'javascript' },
|
||||
{ text: 'Go', value: 'go' },
|
||||
{ text: 'Dart', value: 'dart' },
|
||||
{ text: 'Zig', value: 'zig' },
|
||||
{ text: 'Rust', value: 'rust' },
|
||||
{ text: 'Lua', value: 'lua' },
|
||||
{ text: 'PHP', value: 'php' },
|
||||
{ text: 'Ruby', value: 'ruby' },
|
||||
{ text: 'Python', value: 'python' },
|
||||
{ text: 'Java', value: 'java' },
|
||||
{ text: 'C', value: 'c' },
|
||||
{ text: 'C#', value: 'csharp' },
|
||||
{ text: 'C++', value: 'cpp' },
|
||||
// other non-highlighted languages
|
||||
{ text: 'Markdown', value: 'markdown' },
|
||||
{ text: 'Swift', value: 'swift' },
|
||||
{ text: 'Kotlin', value: 'kotlin' },
|
||||
{ text: 'Scala', value: 'scala' },
|
||||
{ text: 'Julia', value: 'julia' },
|
||||
{ text: 'Haskell', value: 'haskell' },
|
||||
],
|
||||
toolbar: "styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image_picker table codesample direction | code fullscreen",
|
||||
paste_postprocess: (editor, args) => {
|
||||
cleanupPastedNode(args.node);
|
||||
|
||||
Reference in New Issue
Block a user