The new Community suffers (as did the old) from a near-inability to paste code. Many Forms- and Munchkin-related questions beg for code snippets, but even with <PRE> tags these never look right and sometimes look downright awful. The ability to use a CodePen or jsFiddle embed would also suffice.
Hey Sanford, I agree, but perhaps this should be posted as an Idea. Scott K. Wilder would that be the best place for this, so members can vote on it?
I didn't put it there because I didn't want to get in trouble.
Sanford Whiteman - are you trying to paste HTML into a Doc? Tell me more how you want to use
use a CodePen or jsFiddle . Just to add code to a post/doc?
(Don't worry you will not get in trouble)
cc: Elliott Lowe
I mean that I want to type a code block into a discussion and have it be formatted with monospace font and (hopefully) highlighted, and also copy-and-paste-able.
Or, alternately, use the embed code from a code sandbox like CodePen or jsFiddle and have that show up.
For example, a CodePen embed usually looks like this (screenshot):
But if I do that same embed in the Community it comes out like:
for (var formPrefix = '#mktoForm_', formLaunchers = document.querySelectorAll('BUTTON[href^="' + formPrefix + '"]'), i = 0, imax = formLaunchers.length; i < imax; i++) { formLaunchers[i].onclick = function(e) { formId = this.getAttribute('href').slice(formPrefix.length); MktoForms2.loadForm("//app-aba.marketo.com", "XXX-XXX-XXX", formId, function(form) { MktoForms2.lightbox(form).show(); }) return false; } }
Thank you for the clarification!