I am trying to create a "code panel" component for my ember app. This will format code to look like what you might expect from an IDE (basic syntax highlighting, line numbers etc)
I have created the component code-panel
, and I have added
//Test Code Panel
function n(a){
var g = a + 1;
return g;
}
to my index.hbs
, as this is the way I ideally want to invoke this component... however I am having issues understanding how I can then take this and turn it in to what I want in the component? Is there some way I can access the value I would get from having in the code-panel.js
file, and then use that the generate all the HTML that would be needed to render it highlighted and line numbered?
Aucun commentaire:
Enregistrer un commentaire