Hebbian Posted August 2, 2013 Share Posted August 2, 2013 I've already made a module that use TinyMCE to write the description, it runs nicely, but after submission, I notice that the HTML tags from tinyMCE are not saved to the database. How to prevent the strip tags? Sorry for the bad english. Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted August 2, 2013 Share Posted August 2, 2013 Hi, Are you saving it to the configuration table? If so, use Configuration::updateValue('valueName', $value, true); The magic word here is "true" 1 Link to comment Share on other sites More sharing options...
Hebbian Posted August 2, 2013 Author Share Posted August 2, 2013 Hi, Are you saving it to the configuration table? If so, use Configuration::updateValue('valueName', $value, true); The magic word here is "true" No, it's not configuration I guess. Already solved by change array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true) into this array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true) Link to comment Share on other sites More sharing options...
vekia Posted August 2, 2013 Share Posted August 2, 2013 thanks for confirmation, we thought that you want to put the html to the configuration table, thanks for clarification now, you use object definition in your module, so it's necessary to use correc definition for the field exactly as you show us above thanks im going to mark this topic as solved regards Link to comment Share on other sites More sharing options...
federico.domizi3 Posted August 10, 2015 Share Posted August 10, 2015 Can help me? https://www.prestashop.com/forums/topic/461352-saving-text-as-html-and-langtrue-in-configuration-table/ 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