Jump to content

cherche tuto pour intégré le wyshywig de prestashop


kod
 Share

Recommended Posts

Bonjour, je souhaite développer un tout  petit module dans prestashop.

 

je pense crée une table ps_text par exemple,

dans edit_page.tpl faire appelle à un editeur de texte , car

mettre du HTML pur c'est pas pratque,

 

conaissez vous un bon tuto qui explique cela ?

 

merci de votre réponse :)

Share this post


Link to post
Share on other sites

j'ai vu qu'il fallait mettre ce bout de code

mais où  (je suis sous la 1.5)?

dans un _page.tpl ?

j'ai mis un formulaire de type textearea dans la méthode diplayForm(),

et grâce à la méthode

 

public function getContent()

 

j'ai pu obtenir le lien configuration du plugin,

mais je le whysiwig n'apparaîte pas

 

http://www.hostingpics.net/viewer.php?id=751460taille.png

 

<!-- Load TinyMCE -->
<script language="javascript">
tinyMCE.init({
mode : "textareas",
width: "100%",
height: "100px",
inlinepopups_skin : "concreteMCE",
theme_concrete_buttons2_add : "spellchecker",
relative_urls : false,
document_base_url: '<?php echo BASE_URL . DIR_REL?>/',
convert_urls: false,
plugins: "paste,inlinepopups,spellchecker,safari",
theme : "advanced",
theme_advanced_toolbar_location : "top",
editor_selector : "ccm-advanced-editor",
theme_advanced_blockformats : "p,address,pre,h1,h2,h3,div,blockquote,cite",
theme_advanced_buttons1 : "bold,italic,underline,|,bullist,|,undo,redo,|,pasteword,formatselect",
theme_advanced_buttons2 :"",
theme_advanced_buttons3 :"",
theme_advanced_toolbar_align : "left",
theme_advanced_blockformats : "p,h2,h3",
spellchecker_languages : "+English=en"
 
//,styleselect,fontselect,fontsizeselect,strikethrough,justifyfull,justifyleft,justifycenter,justifyright,|
});
 
</script>
<!-- /TinyMCE -->

Edited by kod (see edit history)

Share this post


Link to post
Share on other sites

finalement je pense que j'ai trouvé il faut ajouter la ligne

autoload_rte c'est tout

 

  'autoload_rte' => true, // Cette ligne active tinymce sur le champs

 

        $this->fields_form[1]['form'] = array(
            'tinymce' => true,
            'legend' => array(
                'title' => $this->l('Footer\'s various links Configuration'),
                'image' => _PS_ADMIN_IMG_.'information.png'
            ),
            'input' => array(
                array(
                    'type' => 'checkbox',
                    'name' => 'cms_footer',
                    'values' => array(
                        'query' => array(
                            array(
                                'id' => 'on',
                                'name' => $this->l('Display various links and information in the Footer'),
                                'val' => '1'
                            ),
                        ),
                        'id' => 'id',
                        'name' => 'name'
                    )
                ),
                array(
                    'type' => 'cms_pages',
                    'label' => $this->l('Footer links:'),
                    'name' => 'footerBox[]',
                    'values' => BlockCMSModel::getAllCMSStructure(),
                    'desc' => $this->l('Please mark every page that you want to display in the footer CMS block.')
                ),
                array(
                    'type' => 'textarea',
                                     'autoload_rte' => true, // Cette ligne active tinymce sur le champs
                    'label' => $this->l('Footer informations:'),
                    'name' => 'footer_text',
                    'rows' => 5,
                    'cols' => 60,
                    'lang' => true
                ),

Edited by kod (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More