Sign in

Plugin Development help with ‘addInsertions’ method?

  • This topic has 0 replies, 1 voice, and was last updated 1 month, 2 weeks ago by Avatar photoreed.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #10791
    Avatar photoreed

    Also, in general is there any documentation on plugin development because I can’t seem to find any?

    Looking at some of the example we have `API.addInsertions`, `API.addEvents`, and `API.addModifiers `

    When to use which?

    In the following code we see `addInsertion` with ‘customCommentsCode’ as the first argument, where :

    “`
    <div>
    <pre>this.API.addInsertion(‘customCommentsCode’, this.addPostScripts, 1, this);
    <code></code>`

    some other examples:

    “`</pre>
    <div>
    <pre>this.API.addInsertion(‘publiiHead’, this.addStyles, 1, this);
    this.API.addInsertion(‘publiiFooter’, this.addScripts, 1, this);</pre>
    </div>
    <pre><code></code>`
    the parameters to `addInsertion` are apparently: `place, callback, priority, pluginInstance`
    So above ‘publiiHead’ is a `place`

    I guess one question is what/where are these places? Can we stick any value in there? etc…

    The same goes for `addModifiers`

    `this.API.addModifier(‘postText’, this.addDecodingAttribute, 1, this);`

    In this code how do we know that ‘postText’ is a valid value, is there a list or something somewhere?

    Thank you!

     

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.