Llevaba tiempo intentando instalar algún plugin para poder colocar código (Javascript, CSS, HTML...) y al final me he decantado por uno muy sencillo de instalar y muy completo.
INSTALACION
- Descargar el archivo IG_Syntax_Hiliter.zip
- Descomprimimos la carpeta que hay dentro del .zip
- Copiamos la carpeta que hay dentro de esa carpeta (ig_syntax hiliter plugin) al directorio /wp-content/plugins/
- Renombramos la carpeta "ig_syntax hiliter plugin" a "ig_syntax hiliter"
- Activar el plugin en el menú de administración
- Modificamos el archivo quicktags.js que se encuentra en “wp-includes/js/” Ahí encontrarás en la línea # 126 lo siguiente:
JavaScript:
-
edButtons[edButtons.length] =
-
new edButton('ed_more'
-
,'more'
-
,'<span id="more-32"></span>'
-
,''
-
,'t'
-
,-1
-
);
Añade acto seguido:
JavaScript:
-
//----- Start iG:Syntax Hiliter Plugin's Quick Tags -----
-
edButtons[edButtons.length] =
-
new edButton('ed_shAS'
-
,'ActionScript'
-
,'[as]'
-
,'[/as]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shASP'
-
,'ASP'
-
,'[asp]'
-
,'[/asp]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shC'
-
,'C'
-
,'[c]'
-
,'[/c]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shCPP'
-
,'C++'
-
,'[cpp]'
-
,'[/cpp]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shCSHARP'
-
,'C#'
-
,'[csharp]'
-
,'[/csharp]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shCSS'
-
,'CSS'
-
,'[css]'
-
,'[/css]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shDELPHI'
-
,'DELPHI'
-
,'[delphi]'
-
,'[/delphi]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shHTML'
-
,'HTML'
-
,'[html]'
-
,'[/html]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shJAVA'
-
,'JAVA'
-
,'[java]'
-
,'[/java]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shJS'
-
,'JavaScript'
-
,'[ js ]'
-
,'[ / js ]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shMySQL'
-
,'MySQL'
-
,'[mysql]'
-
,'[/mysql]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shPERL'
-
,'PERL'
-
,'[perl]'
-
,'[/perl]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shPHP'
-
,'PHP'
-
,'[php]'
-
,'[/php]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shPYTHON'
-
,'PYTHON'
-
,'[python]'
-
,'[/python]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shRuby'
-
,'RUBY'
-
,'[ruby]'
-
,'[/ruby]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shSMARTY'
-
,'SMARTY'
-
,'[smarty]'
-
,'[/smarty]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shSQL'
-
,'SQL'
-
,'[sql]'
-
,'[/sql]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shVB'
-
,'Visual Basic'
-
,'[vb]'
-
,'[/vb]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shVBNET'
-
,'VB.NET'
-
,'[vbnet]'
-
,'[/vbnet]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shXML'
-
,'XML'
-
,'[xml]'
-
,'[/xml]'
-
,''
-
);
-
edButtons[edButtons.length] =
-
new edButton('ed_shCode'
-
,'CODE'
-
,'[code]'
-
,'[/code]'
-
,''
-
);
-
//----- End iG:Syntax Hiliter Plugin's Quick Tags -----
Ahora ya tienes 21 nuevos botones en tu editor con éstos nombres:
ActionScript, ASP, C, C++, C#, CSS, DELPHI, HTML, JAVA, JavaScript, MySQL, PERL, PHP, PYTHON, RUBY, SMARTY, SQL, Visual Basic, VB.NET, XML & CODE que te generarán sus respectivas etiquetas.
Yo solo instalé estos 8 lenguajes: HTML, ActionScript , JavaScript, MySQL, PHP, SQL, XML, Code