Thread:Extension talk:WYSIWYG/Create Category Button?/reply (8)

I created another more advanced dialog where you will get list of existing categories on selection list, it is based on dialogs/link.js. However there are few open issues: ...or is it allowed to modify wfSajaxSearchCategoryCKeditor or should function be overruled somehow? Following sample is based on "wfSajaxSearchArticleCKeditor". New modified "wfSajaxSearchCategoryCKeditor" should support both full list of categories and also query based on value of input parameter f.ex like this:
 * 1) I do not understand all the old code of "onShow" trigger :) so I am not sure if something must be still commented out or restored back into use. There are also some other places in code which I am not 100% how code should be modified. I tried to remove all replace functions of characters anyway.
 * 2) List of categories was originally always empty when dialog was opened and only after user typed something into 'categoryValue', list of categories was updated. => Updating list of categories immediatedly when dialog is entered is accomplished by adding trigger "onChange: OnCategoryChange" into "id: 'categoryValue'". Disadvantage of solution is that it will cause category list to be updated every time something is typed in box "id: 'categoryValue'" ... this is annoying and may be problem if category list is long. I am sure there must be a better solution for this, I just could not find it. Any ideas?
 * 3) Dialog does not yet support searching of categories. I am not php nor mysql expert so I would like to get help of modifying syntax of funtion wfSajaxSearchCategoryCKeditor in file CKeditorSajax.body.php to support input parameter.

WYSIWYG/plugin.js

Code of dialogs/category.js with list of existing categories (it works but has open issues listed abowe):