Activer éditeur TinyMCE Pour les extrait des articles

Pour ajouter L’éditeur TinyMCE à l’extrait de vos articles ajouter le code suivant dans le fichier function.php de votre thème WordPress.


function tinymce_excerpt_js(){ ?>

<script type="text/javascript">

	jQuery(document).ready( tinymce_excerpt );

	function tinymce_excerpt() {

	jQuery("#excerpt").addClass("mceEditor");

	tinyMCE.execCommand("mceAddControl", false, "excerpt");

	}

</script>

<?php }

add_action( 'admin_head-post.php', 'tinymce_excerpt_js');

add_action( 'admin_head-post-new.php', 'tinymce_excerpt_js');

function tinymce_css(){ ?><style type='text/css'>

	#postexcerpt .inside{margin:0;padding:0;background:#fff;}

	#postexcerpt .inside p{padding:0px 0px 5px 10px;}

	#postexcerpt #excerpteditorcontainer { border-style: solid; padding: 0; }

</style>

<?php }

add_action( 'admin_head-post.php', 'tinymce_css');

add_action( 'admin_head-post-new.php', 'tinymce_css');
0 0 votes
Évaluation de l'article
S’abonner
Notification pour
guest

0 Commentaires
Commentaires en ligne
Afficher tous les commentaires