Closed assimovt closed 3 months 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
@ashfordneil Thanks for clarifying. Yeah, I believe Swift/ObjectiveC are big enough to be in the default pack 😉
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.
This issue was closed because it has been stalled for 30 days with no activity.
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.