Adding Button Definitions syntax?

6 views
Skip to first unread message

PeterB

unread,
Dec 29, 2021, 9:22:21 AM12/29/21
to cleditor
I've added the example successfully to my instance before BTNS{;

                                                             btnsDef: {
                                                                                alert: {
                                                                                    fn: function() {
                                                                                        //alert('some text')
                                                                                        //document.write('hello world')
                                                                                        write('hello world')
                                                                                    },
                                                                                    ico: 'blockquote',
                                                                                }                                                                
                                                                 },
and it works!

I want to do several things;
1) Add a second instance. but this does not work;

                                                             btnsDef: {
                                                                                alert: {
                                                                                    fn: function() {
                                                                                        alert('some text')
                                                                                    },
                                                                                    ico: 'blockquote',
                                                                                },                                                            
                                                                                alert: {
                                                                                    fn: function() {
                                                                                        alert('some more text')
                                                                                    },
                                                                                    ico: 'blockquote',
                                                                                },   
                                                                 },
but the 2nd button does not appear :-(


2) 
I want to change the icon form BLOCKQUOTE. Is there a list of what other icons are available build in? BOLD or COMMENT does not seem to exist for instance


3) Rather than the javascript ALERT, I wanted to insert some predefined text
i.e. "hello world"
but document.write('hello world')
replaces the entire page, versus insert.

Any ideas?

Many thanks
Peter
Reply all
Reply to author
Forward
0 new messages