Is there ToC setup complete event / callback?

I have some script I need to run after the ToC attribute has completed setup. I’m hoping there is an undocumented event / callback that I can hook into to detect the script’s completion?

Hey @memetican! can you try with this snippet?

<script>
      window.fsAttributes = window.fsAttributes || [];
      window.fsAttributes.push([
        'toc',
        (tableInstances) => {
          console.log('toc Successfully loaded!');
        },
      ]);
    </script>

Thanks Luis! perfect.
Is there a reference somewhere for other API details like this that I haven’t come across yet?

You are welcome! I am afraid we only have detailed documentation for CMS Load and CMS Filter at the moment.

1 Like

As it happens, I am needing exactly the same thing for richtext today, the FS powerful rich text attribute. Would you happen to have that snippet available as well?

Hey @memetican! This should do the trick!

<script>
      window.fsAttributes = window.fsAttributes || [];
      window.fsAttributes.push([
        'richtext',
        (textInstances) => {
          console.log('richtext Successfully loaded!');
        },
      ]);
    </script>
1 Like