pepperstreet VIP
Total posts: 3,837
03 Июнь 2013 05:26

Hello, just had a quick idea while browsing "stackoverflow" and "angeldesk"...

How would you submit and show code snippets in a Cobalt content type? Mainly HTML/PHP/JS/CSS. Is there any mini-editor or geshi thing which allows to create something like that in a Cobalt field? Output should have line# and copy-to-clipboard, raw-display in new window.

Or use a special J! code editor and an HTML field and "geshi"?! But that would lack the copy and new window option.

Any thoughts?

EDIT:

I just found...

The latter is almost what I want, but WITH the need to enter content plugin Syntax. The language type should be made by simple selection on Cobalt submission...

JED! Category - Code Display

Последние изменения: 02 Март 2014


Sergey
Total posts: 13,748
03 Июнь 2013 07:25

Is this the same as template editing in the other topic?


Sergey
Total posts: 13,748
03 Июнь 2013 08:18

I see. You can use textarea and insert gist embeds :) But I understand what you mean. Thew only thing that code example in separate field is not very practical. As usual it is required that user could insert code examples anywhere in the article.


pepperstreet VIP
Total posts: 3,837
03 Июнь 2013 12:54

insert gist embeds

Thanks for the heads-up. Almost the functionality I want (in a Cobalt field and form). I can see they make use of ACE editor. Seems to be available for Joomla, too. Among other special code editors. Maybe an option, as I mentioned in my initial post.

Работает на Cobalt