Making readonly TinyMCE fields

The problem I'm running into is that setting one TinyMCE field to ReadOnly seems to set them all. Consider the following DCT:

[HTML]




<script language="Javascript">
function dctInit() {
IWDatacapture.getItem('/a/a1').setReadOnly(true);
}
IWEventRegistry.addFormHandler('onFormInit', dctInit);
</script>



<br />


<br />



[/HTML]

As is, both fields a1 and a2 become readonly. Comment out the setReadOnly line and both become editable. Any thoughts?

Comments

  • Have you tried doing it on some other event rather than on init. If its always readonly then try making that in datacapture.cfg it self rather than FormAPI.
  • Thanks for the suggestion. I gave it a shot but it happens not only onFormInit and setting readonly in the datacap is inadequate because it doesn't render the html..
  • Thanks for the suggestion. I gave it a shot but it happens not only onFormInit and setting readonly in the datacap is inadequate because it doesn't render the html..
    There is supposed to be a newer version of TinyMCE coming with 6.7.2 - I suggest you open a case with Support so that they can (a) try to reproduce the problem with the current version and (b) verify [or get Engineering involved] that the problem doesn't exist in 6.7.2...
  • Yeah, I've opened a support case. They're still investigating.
  • The problem I'm running into is that setting one TinyMCE field to ReadOnly seems to set them all. Consider the following DCT:

    [HTML]




    <script language="Javascript">
    function dctInit() {
    IWDatacapture.getItem('/a/a1').setReadOnly(true);
    }
    IWEventRegistry.addFormHandler('onFormInit', dctInit);
    </script>



    <br />


    <br />



    [/HTML]

    As is, both fields a1 and a2 become readonly. Comment out the setReadOnly line and both become editable. Any thoughts?
    sounds like a bug.
  • The problem I'm running into is that setting one TinyMCE field to ReadOnly seems to set them all. Consider the following DCT:

    [HTML]




    <script language="Javascript">
    function dctInit() {
    IWDatacapture.getItem('/a/a1').setReadOnly(true);
    }
    IWEventRegistry.addFormHandler('onFormInit', dctInit);
    </script>



    <br />


    <br />



    [/HTML]

    As is, both fields a1 and a2 become readonly. Comment out the setReadOnly line and both become editable. Any thoughts?
    looks like a bug in FormAPI. Did you try setting the readonly element in your DCT instead?
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs