• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How call XenForo.StatusEditor inside js file

Fuhrmann

Well-known member
#1
How can I call to XenForo.StatusEditor inside my own js file?

I have a function that inserts content into a text area that uses the XenForo.StatusEditor. After I insert the text via jquery, I have to update the char limit of this text area using the XenForo.StatusEditor.

But I just do not know how can I use and call the function update().
 

Fuhrmann

Well-known member
#2
Ok, this works:

Code:
new XenForo.StatusEditor($('#review_text')).update();
But is this the right way? I mean...there is already a instance of XenForo.StatusEditor running since I loaded the page...