Source

importtw2.coreastwcimporttw2.formsastwfimporttw2.jqueryimporttw2.jquery.baseastw2_jq_c_bimporttw2.jqplugins.ui.baseastw2_jq_uiclassTagify(tw2_jq_ui.JQueryUIWidget,twf.TextArea):# declare static resources here# you can remove either or both of these, if not neededresources=[tw2.jquery.jquery_js,tw2_jq_ui.jquery_ui_js,tw2_jq_ui.jquery_ui_css,twc.JSLink(modname=__name__,filename='static/jquery.tagify.js'),twc.CSSLink(modname=__name__,filename='static/tagify.css'),]defprepare(self):super(Tagify,self).prepare()self.add_call(twc.js_function("$('#"+self.selector+"').tagify")(twc.js_symbol(self.options)))# put code here to run just before the widget is displayed