Last active
August 29, 2015 14:02
-
-
Save davidmars/ff64e8e5f9db653ccf46 to your computer and use it in GitHub Desktop.
Affiche un champ texte éditable pour l'admin dans lequel il pourra saisir du texte enrichi au moyen de medium-editor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $this View */ | |
/* @var $vv VV_special_page */ | |
$vv = $_vars; | |
$richTextAttributes=""; | |
if(TheHuman::isAdmin()){ | |
//custom config for the rich text editor, hide and display buttons. | |
$richText=new RichText(); | |
$richText->h1=true; | |
$richText->h2=true; | |
$richText->underline=false; | |
$richTextAttributes=$richText->getMediumEditorAttributes(); | |
} | |
?> | |
<div class="text-style-sample" <?=$richTextAttributes?>> | |
<?=$vv->attrAdminFieldString( | |
"extraVars[sampleField_translated]", | |
FORMAT_STRING_RICH_TEXT, | |
"this is a test","div") | |
?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment