AllInJoe Posted July 11, 2020 Share Posted July 11, 2020 (edited) Hey there, i am looking for help with the shop information. there is a field to set comments. Which ist actually perfect for our needs. but the input textarea doesn’t support HTML. maybe someone can bring me to the right direction because i really don’t know for what I have to search to make a textarea giving HTML output. thanks in advance and sorry for my english Edited July 11, 2020 by AllInJoe (see edit history) Link to comment Share on other sites More sharing options...
AllInJoe Posted July 11, 2020 Author Share Posted July 11, 2020 I mena this: Shop Settings -> Contact -> Shops -> "if exisitng shop/store" Edit -> Comments Just to make it more visible i upload screenshots what i mean. Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2020 Share Posted July 11, 2020 (edited) Prestashop version ? Edited July 11, 2020 by Guest (see edit history) Link to comment Share on other sites More sharing options...
AllInJoe Posted July 11, 2020 Author Share Posted July 11, 2020 Hi thanks for reply, -- Prestashop version ? 1.7.6.7 Page name ? Its still in localhost BO or FO ? Actually the Input comes from the BO, i was trying to add a HTML code in the field but the FO output is like not rendering just giving text output without formating. You cut it so you can't see what's going on and where it is. Sorry i made now the example with the PS Demo Link: https://demo.prestashop.com/#/en/front *attachments* Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2020 Share Posted July 11, 2020 ./controllers/admin/AdminStoresController.php find: array( 'type' => 'textarea', 'label' => $this->trans('Note', array(), 'Admin.Global'), 'name' => 'note', 'lang' => true, 'cols' => 42, 'rows' => 4, ), replace to: array( 'type' => 'textarea', 'label' => $this->trans('Note', array(), 'Admin.Global'), 'name' => 'note', 'lang' => true, 'cols' => 42, 'rows' => 4, 'class' => 'rte', 'autoload_rte' => true, ), Link to comment Share on other sites More sharing options...
AllInJoe Posted July 11, 2020 Author Share Posted July 11, 2020 Thank you for your help. So the editor is showing in the BO. But if i add simple HTML code like line breaks or bold font etc. its not showing in the FO. After saving the store information and going back to the editor, the HTML is not saving. All the HTML Tags are removed. So i add the html code in the database, {prefix}_store_lang -> note and the result in the FO is like in the attachment. Do i need to change it in the template file or is it again a controler? Link to comment Share on other sites More sharing options...
AllInJoe Posted July 11, 2020 Author Share Posted July 11, 2020 Link to comment Share on other sites More sharing options...
Guest Posted July 12, 2020 Share Posted July 12, 2020 (edited) Ok, add 'validation' => 'isCleanHtml', after 'autoload_rte' => true, Or find save to database and delete pSQL. Edited July 12, 2020 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted July 12, 2020 Share Posted July 12, 2020 Open ./classes/Store.php find 'note' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 65000), change to 'note' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 65000), Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now