I searched a lot, but did not find anithing ...
(I want some -i editor to know that this is hard to do - like the one I use now, where I can share my code on my blog) (My own CMS)
So,
I guess someone went through this earlier, can I embed code using tinyMce ?
any conclusion?
Thank you very much
PD: I saw that stackoverflow uses a fork from WMD , which is not online, but on github, who has a usage example? (there are only .js files there)
PD2: thanks a lot, again!
EDIT
Ok, after some answers hit prettyprint -> here
which needs to be loaded only on $ (document) .ready () And there will be a prefix (lol) of any of them:
<pre class="prettyprint"> code here </pre>
So, I'm trying to add this format to tinimce with:
style_formats : [ {title : 'Bold text', inline : 'b'}, {title : 'Blue text', inline : 'span', styles : {color : '#006'}}, {title : 'Blue header', block : 'h1', styles : {color : '#006'}}, --> {title : 'Codigo fuente', inline : 'pre', classes : 'prettyprint'}, {title : 'Example 2', inline : 'span', classes : 'example2'}, {title : 'Table styles'}, {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'} ],
But if I use it, then it turns into <p> on $ _POST, why?
Change two
works: {title : 'Codigo fuente', block : 'pre', classes : 'prettyprint'},
Problem i get
<pre ..>line 1</pre> <pre ..>line 2</pre>
..
and I would like to apply:
<pre..> line1 line2 </pre>
how can i solve this? if I change block to inline , just a style that he didn't even apply :?
Gracias!