*

Post Free Online

  • ***
  • 80 posts
  • Welcome to Post Free Online classified web site
Prevent Users from Typing URLs, Remove Existing Links from Content. To customize TinyMCE so users can’t add hyperlinks or URLs at all, we need to remove both the UI elements and the underlying behavior. Can you please help me where we can do the amendment and customise it? I want to keep the Editor Mode tinymce as it is more clean interface.  So help me to customise it from the core or where .js of tinymce

*

slaven

  • ***
  • 99 posts
Hello! TinyMCE for users is configured in the file oc-includes/osclass/functions.php
Save the original file "functions.php" just in case.

Everything you do on your Osclass is your own doing.

Osclass

*

Post Free Online

  • ***
  • 80 posts
  • Welcome to Post Free Online classified web site
Hi,


Thank you for providing path of functions.php    finally, I made the updation and customise it with the below code.


setup: function(editor) {
    editor.on('init', function() {
        removeLinks();
    });

    editor.on('change keyup paste', function() {
        removeLinks();
    });

    function removeLinks() {
        var content = editor.getContent();
        content = content.replace(/<a[^>]*>(.*?)<\/a>/gi, "$1");
        editor.setContent(content);
    }
}








Also   "advlist autolink lists link image charmap preview anchor",    Code should be replace with  this  code:     "advlist lists image charmap preview",     


Its work well and remove all the existing links also   it resolve the copy paste link strategy too which user can bypass.