Skip to content

Instantly share code, notes, and snippets.

Avatar

BEE-Plugin

View GitHub Profile
@BEE-Plugin
BEE-Plugin / en-US.json
Last active October 27, 2019 19:35
BEE Plugin v3 sample language file
View en-US.json
{
"bee-common-top-bar": {
"actions": "Actions",
"help": "Help",
"hide-structure": "Hide structure",
"preview": "Preview",
"save": "SAVE",
"save-as-template": "Save as template",
"send-test": "Send test",
"settings": "Settings",
@BEE-Plugin
BEE-Plugin / onComment
Created October 23, 2020 03:38
BEE Plugin: How to send email from mentions in a comment
View onComment
// Sample onComment callback for bee config
onComment: function (response) {
// Extract the comments from the response
var comments = Object.values(response.comments);
// Gets all words that start with '@', until a space
var handleRegex = /@[^\s]+/g
// Use reducer to extract the @ mentions from the content
function mentionsReducer(acc, comment) {
@BEE-Plugin
BEE-Plugin / getDataURI.js
Created March 28, 2022 23:25
JavaScript method to convert an image to data URI
View getDataURI.js
const getDataUri = (img) => {
let dataUri = ''
try {
dataUri = new Buffer(img, 'binary').toString('base64')
dataUri = `data:image/png;base64,${dataUri}`
} catch {
dataUri = '' // Or, replace '' with default placholder image.
}
return dataUri
}
@BEE-Plugin
BEE-Plugin / bee-compare-roles.csv
Created June 7, 2022 00:41
Advanced permissions comparative code snippets
View bee-compare-roles.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Designer Advanced Permissions,Marketer/Copywriter Advanced Permissions
"{
""uid"": ""test_uid"",
""container"": ""bee-plugin-container"",
""language"": ""en-US"",
""sidebarPosition"": ""left"",
""advancedPermissions"": [
{
""rows"": {
""behaviors"": {
@BEE-Plugin
BEE-Plugin / Designer-Advanced-Permissions.json
Created June 7, 2022 00:53
Advanced permissions comparative code snippets
View Designer-Advanced-Permissions.json
{
"uid": "test_uid",
"container": "bee-plugin-container",
"language": "en-US",
"sidebarPosition": "left",
"advancedPermissions": [
{
"rows": {
"behaviors": {
"canSelect": true
@BEE-Plugin
BEE-Plugin / custom.css
Created October 27, 2019 18:50
BEE Plugin v3 sample custom CSS theme
View custom.css
/*
"--cs" for custom css override classes
--- Generals ---
- Custom font url | https://fast.fonts.net/cssapi/12006fbc-93aa-46b4-b1a2-436f9d660c2c.css
- Custom font family (with font stack - i.e. 'Source Sans Pro', sans-serif) | "Frutiger Next W01",Helvetica,Arial,sans-serif
- Custom font size | 12px
- Widget bar border color | #c7c7c7
- Widget bar & active tab background color | #F9F9F9
- Show tab icons [BOOLEAN] - if (true) "inline-block" else "none" | True