I have been looking a lot for it but haven't found anithing...
(i want just some editor -i know the same it's hard to get done- like the one i'm using now, where i can share my code in my blog)(My own CMS)
So,
I guess some went through this one before, can i embed code using tinyMce?
any conclusion?
thanks a lot
PD: i've seen that stackoverflow uses a fork from WMD wich is not online but in github, anyone has an example of use? (only .js files there)
PD2: thanks a lot, again!
EDIT
Well, after some replies got to prettyprint -> here
wich only need to be loaded on $(document).ready() And will prettify (lol) any of those:
<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 turns into a <p>
on $_POST, why?
Edit two
this one works: {title : 'Codigo fuente', block : 'pre', classes : 'prettyprint'},
The problem it's that 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
by inline
, simply the style it's not even applied :?
Gracias!