PageSourceSearch

https://tanhit.online/nassets/bc0ec94/plugins/fontcolor.js?v=1765633899

js tanhit.online collected 2026-09-27 14:44:22 UTC 1,353 bytes, 40 lines download raw bytes

1if (!RedactorPlugins) var RedactorPlugins = {};
2
3RedactorPlugins.fontcolor = function()
4{
5    return {
6        init: function() {
7
8            var buttons = {
9                fontcolor: {name: 'fontcolor', icon: 'fa-pencil', property: 'color'},
10                backcolor: {name: 'backcolor', icon: 'fa-paint-brush', property: 'background-color'}
11            };
12
13            var self = this;
14
15            for (var i in buttons) {
16                var button = this.button.addAfter('link', i, this.lang.get(i));
17
18                this.button.setIcon(button, '<i class="fa ' + buttons[i].icon + '"></i></i>');
19
20                this.button.addCallback(button, function (button) {
21                    $(self.button.get(button)).colpick({
22                        submit: 0,
23                        onChange: function(hsb, hex) {
24                            self.fontcolor.set(buttons[button].property, '#' + hex);
25                        }
26                    });
27                });
28            }
29        },
30        set: function(rule, type) {
31            if (rule == 'color') {
32                this.inline.format('span', 'style', rule + ':' + type, 'add');
33            } else if (rule == 'background-color') {
34                this.inline.format('span', 'style', rule + ':' + type, 'add');
35            }
36
37        },
38        remove: function(rule) {}
39    };
40};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.