Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Icon/Action #2

Open
tallmanBS opened this issue Mar 28, 2017 · 1 comment
Open

Custom Icon/Action #2

tallmanBS opened this issue Mar 28, 2017 · 1 comment

Comments

@tallmanBS
Copy link

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

@jessejiang0214
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants