XAM-Consulting/TEditor

Custom Icon/Action

Opened this issue · 1 comments

Hello,
Very nice editor implementation for sure.

Sorry for my noob question. I'm trying to create a custom icon/toolbaritem. What I cant figure out is how to override the custclick. I want to use the editor to allow other formatting thats not covered in the standard one.

            var toolbar = new ToolbarBuilder().AddAll();
            var myCustomItem = new TEditorToolbarItem { Label = "blank", ImagePath = "blank.png"};
            toolbar.Add(myCustomItem);

and how to get it to execute any custom javascript inside the original zss editor.

                ClickFunc = (input) =>
                {
                    input.Paragraph();  //Run my custom java thing here
                    return string.Empty;
                }

and

        public void Paragraph()  //or my custom function/and java here.
        {
            string trigger = @"zss_editor.setParagraph();";
            _javaScriptEvaluatFunc.Invoke(trigger);
        }

Any direction or help is appreciated.
Thanks.
Brent

Well I didn't design this feature in PCL, maybe you need to change the source code.