Jump to content

remember choice, disable rich text editor


wulfric

Recommended Posts

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..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated