Jump to content

Should Textformatter modules be init'd before render?


Jorge Robles
 Share

Recommended Posts

Hi all:

I've been trying to do a Textformatter based on Wordpress like Shortcodes module, but this textformatter should add a description of what shortcodes are enabled, to every field that has itself attached, in admin area.

Documentation on Textformatter class tells that init() is fired  when PW is ready, but seems TextFormatters are only init'd upon content rendering (i.e. frontend) instead.

What's the way to go?

Thanks in advance!

Link to comment
Share on other sites

Texformatter modules aren't autoload they only get called when needed. You'd have to make it autoload to use the init in the backend, but then it's not when it's called but when autoloaded in the admin. Then you could use init to add a hook InputfieldText::render there for fields that use that this textformatter.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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