René H4 Posted September 7, 2019 Share Posted September 7, 2019 Will TinyMCE work on Phoenix? https://apps.oscommerce.com/Fc1HV&advanced-tinymce It looks like an easy change, I would want it in the catagories.php only to make better/nicer looking product descriptions. @burt? Since the admin is not going to change on a short term, I'm looking for a solition like this. Link to comment Share on other sites More sharing options...
Heatherbell Posted September 7, 2019 Share Posted September 7, 2019 Yes, we have it installed - het's goed zo Link to comment Share on other sites More sharing options...
René H4 Posted September 7, 2019 Author Share Posted September 7, 2019 3 minutes ago, Heatherbell said: Yes, we have it installed - het's goed zo 😂😂 Thanks! I thought so, because the admin is not yet bootstrapped..... Link to comment Share on other sites More sharing options...
Heatherbell Posted September 7, 2019 Share Posted September 7, 2019 Sorry for my bad Nederlands Link to comment Share on other sites More sharing options...
René H4 Posted September 7, 2019 Author Share Posted September 7, 2019 11 minutes ago, Heatherbell said: Sorry for my bad Nederlands Probably translating "It's OK" to Dutch "Het's goed zo" is not bad. I understand. "Het's goed zo" is usually interpreted like "It's OK" or "I'm OK with it" in a means of "I no longer wish to discuss..." 🙂 Just installed it, and it gives a much better response that my currenr bootsrapped Frozen admin (no offence to anyone). Link to comment Share on other sites More sharing options...
René H4 Posted September 7, 2019 Author Share Posted September 7, 2019 16 minutes ago, Heatherbell said: Sorry for my bad Nederlands Your Dutch is probably mch better than my Cornwallish.......... Hahahaha Link to comment Share on other sites More sharing options...
Heatherbell Posted September 7, 2019 Share Posted September 7, 2019 Dank je wel! Veel geluk. It's a long time since I lived in Drenthe. Link to comment Share on other sites More sharing options...
burt Posted September 7, 2019 Share Posted September 7, 2019 I wonder if it could be done with zero core code changes... Possible ? Link to comment Share on other sites More sharing options...
Heatherbell Posted September 7, 2019 Share Posted September 7, 2019 @burt The king of rhetorical questions! It's definitely a good idea that I expect would be welcome by many - it's one of the first things we load up. Link to comment Share on other sites More sharing options...
burt Posted September 7, 2019 Share Posted September 7, 2019 What is it actually used for (in real life)? product description maybe category description? anything else ? Link to comment Share on other sites More sharing options...
René H4 Posted September 7, 2019 Author Share Posted September 7, 2019 I sometimes use it for order updates, bolt figures for important thingy's, like tracking codes. Link to comment Share on other sites More sharing options...
burt Posted September 7, 2019 Share Posted September 7, 2019 I'm pretty sure it's possible with no core changes, in Phoenix. I think older versions of CE (and certainly all flavours of 2.3.4.1 and older) would need core code changes. Who's going to have a go at a no core code change TinyMCE implementation ? Link to comment Share on other sites More sharing options...
puddlec Posted September 7, 2019 Share Posted September 7, 2019 Done a little bit of it. Getting the code added to the admin. Using the admin hook. Just can't work out how to target specific textareas.(could only see name, no I'd or class) Or would it be better to just include it in all textareas? Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
burt Posted September 7, 2019 Share Posted September 7, 2019 Try; textarea[name^="products_description"] it may work, I dont know. I use something similar in a different admin thing I built. Link to comment Share on other sites More sharing options...
fridgebox Posted September 7, 2019 Share Posted September 7, 2019 2 hours ago, burt said: I'm pretty sure it's possible with no core changes, in Phoenix. it is possible with all as long it contain an identifier like a class or ID, or as in your example the name element. The problem with the name element is that you must list them all, so the editor fires. a wysiwyg is most used: - products descriptions. - categories descriptions. - manufacturers descriptions. Addons what let you edit: - privacy.php. - shipping.php. - conditions.php. - * other information pages. Link to comment Share on other sites More sharing options...
fridgebox Posted September 7, 2019 Share Posted September 7, 2019 1 hour ago, puddlec said: Or would it be better to just include it in all textareas? No, that will ruin your SEO text fields. Link to comment Share on other sites More sharing options...
puddlec Posted September 7, 2019 Share Posted September 7, 2019 just managed it. it only loads on the selected textareas e.g. product description and category description. if using multiple languages, you would need to make a small edit to the file to use tinymce with those languages. due to how the name of each field works ( it includes a number) Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
burt Posted September 7, 2019 Share Posted September 7, 2019 The code I posted should target all "product_description", regardless of the number in square brackets... Link to comment Share on other sites More sharing options...
puddlec Posted September 7, 2019 Share Posted September 7, 2019 6 minutes ago, burt said: The code I posted should target all "product_description", regardless of the number in square brackets... got it working, for some reason all the other config i used ' and on that line i used " Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
puddlec Posted September 7, 2019 Share Posted September 7, 2019 this is what i managed to achieve. With my first attempt at using the hook system i'll possibly tidy it up a bit on Sunday. and upload it as an addon basically it just works just like the hooks on the shop side. works on all category description, and product descriptions textareas, regardless of how many languages you use. in regards to the themes / plugins / toolbar you can just add / remove them as you see fit (the settings you see in the file are the ones i use myself) it does with work the tinymce CDN (if you got an API KEY), loading locally, or via another CDN (using an CDNJS just to show it works), you can use whatever source you want. the same basic idea can also be used for ck editor, or any other javascript library you think you may need within the admin. tinymce hook.zip Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
kgtee Posted September 7, 2019 Share Posted September 7, 2019 Ckeditor should be a better choice as it supports bootstrap tabs editing. Link to comment Share on other sites More sharing options...
puddlec Posted September 8, 2019 Share Posted September 8, 2019 9 hours ago, kgtee said: Ckeditor should be a better choice as it supports bootstrap tabs editing. Ckeditor (or any other scripts) can be added into the admin using the same method that I used. Not sure how ckeditor manages it but you can add in any external stylesheet into tinymce. Like I did with the bootstrap css Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
burt Posted September 8, 2019 Share Posted September 8, 2019 Excellent work @puddlec - loads of people will be very happy with this! There is one small change I'd potentially make; add in an array of good pages such like; var $good_pages = ['categories.php', 'manufacturers.php']; and then in the function, global $PHP_SELF and check it against the good_pages; if (in_array(basename($PHP_SELF, $this->good_pages)) { ... } This will then load the scripts only on the pages that need them rather than on all pages. And add textarea[name^="manufacturers_description"] to the selector (for manufacturer descriptions). Note: untested! Link to comment Share on other sites More sharing options...
puddlec Posted September 8, 2019 Share Posted September 8, 2019 1 hour ago, burt said: Excellent work @puddlec - loads of people will be very happy with this! There is one small change I'd potentially make; add in an array of good pages such like; var $good_pages = ['categories.php', 'manufacturers.php']; and then in the function, global $PHP_SELF and check it against the good_pages; if (in_array(basename($PHP_SELF, $this->good_pages)) { ... } This will then load the scripts only on the pages that need them rather than on all pages. And add textarea[name^="manufacturers_description"] to the selector (for manufacturer descriptions). Note: untested! Thanks for that, I'll add it in. Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
puddlec Posted September 8, 2019 Share Posted September 8, 2019 Update So I now got it to load on the manufacturer description. And it will only load on the pages where it is needed. Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.