tinymce / tinymce

The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
https://www.tiny.cloud
Other
14.88k stars 2.24k forks source link

Codesample plugin does not highlight ObjectiveC and Swift #6037

Closed assimovt closed 3 months ago

assimovt commented 4 years ago

If you go to Codesample example from the official doc, open it in CodePen and insert { text: "Objective C", value: "objectivec" } (or { text: "Objective C", value: "objc" } which is an alias) as the list of languages, then add any Objective-C code, the code highlighting won't work. The same happens with Swift.

This probably could be fixed with external PrismJS as described in #4481 however if the codesample plugin is bundled with TineMCE, I think this should be supported out of the box.

ashfordneil commented 4 years ago

Hi!

Unfortunately we do have to be very strict with the set of languages that we bundle in with the code sample plugin, as each one increases the bundle size and delays editor loads. In future we may reevaluate which languages we bundle by default, based on how much they would increase bundle size and how popular they are. I'm going to leave this ticket open, and mark it as a feature request, so that when we get to that reevaluation we can count this as a vote for ObjectiveC / Swift.

In the mean time, the description in the issue you've linked is what you need to do. We also have a nicer write-up of that option in the docs here: https://www.tiny.cloud/docs/plugins/codesample/#codesample_global_prismjs

assimovt commented 4 years ago

@ashfordneil Thanks for clarifying. Yeah, I believe Swift/ObjectiveC are big enough to be in the default pack 😉

tiny-stale-bot commented 4 months ago

This issue is stale because it has been open 365 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 30 days.

tiny-stale-bot commented 3 months ago

This issue was closed because it has been stalled for 30 days with no activity.