wulfric Posted February 28, 2017 Share Posted February 28, 2017 Please advise. I wish to disable rich text editor by default for announcements (and everywhere else too). This guys has the right idea! Also, I found this post, but when I added and uploaded the tweak to my .htaccess file, no results could be found. http://exarv.nl/2013/02/disable-richtext-editor-in-whmcs-2/ <html><body> <!--StartFragment--># Always disable richtext editor<br> RewriteCond %{REQUEST_URI} ^/admin/configemailtemplates.php$<br> RewriteCond %{QUERY_STRING} ^action=edit&id=([0-9]+)$<br> RewriteRule .* ./admin/configemailtemplates.php?action=edit&id=%1&noeditor=1 [L]<!--EndFragment--> </body> </html> - - - Updated - - - I have found my answer here: https://forum.whmcs.com/showthread.php?75375-WYSIWYG-editor-turns-unicode-text-to-HTML-entities&p=324587#post324587 -- Now that I think about it, doing the job right would mean just replacing this piece of **** with the markdown editor used across the site, like in the support tickets, admin support ticket replies, etc.. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2017 Share Posted February 28, 2017 bear in mind with John's answer from 2013, that if you delete/rename the files now, the Automatic Updater (if you use it) will likely reinstall these files during an update. 0 Quote Link to comment Share on other sites More sharing options...
wulfric Posted March 6, 2017 Author Share Posted March 6, 2017 I'm most eager to hear if you have a better more permanent solution. Does one exist? Thanks for the reminder. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 6, 2017 Share Posted March 6, 2017 my first suggestion would be to contact the author of the above article and see if he's still using .htaccess for this. alternatively, you can paste the code below into the admin/templates/blend/header.tpl template and it should automatically redirect to the noeditor version... {if $filename eq "configemailtemplates" and ($smarty.get.id and $smarty.get.noeditor neq "1")} <script>window.location = "http://www.mydomain.com{$smarty.server.PHP_SELF}?action=edit&id={$smarty.get.id}&noeditor=1";</script> {/if} obviously, you could convert this into a hook and tidy up the URL references, but this should work (don't forget to change the domain!)... in the above code, it checks for configemailtemplates, but you could easily expand it to announcements etc. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.