Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@silexlabs/silex-cms

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@silexlabs/silex-cms - npm Package Compare versions

Comparing version 0.0.81 to 0.0.82

2

package.json
{
"name": "@silexlabs/silex-cms",
"version": "0.0.81",
"version": "0.0.82",
"description": "Silex plugin",

@@ -5,0 +5,0 @@ "main": "dist/server.js",

@@ -27,2 +27,6 @@ import { ClientConfig } from '@silexlabs/silex/src/ts/client/config'

placeholder: 'param1, "example param 2"',
}, {
type: 'checkbox',
label: 'Is paired',
name: 'shortcode_is_paired',
}],

@@ -33,4 +37,18 @@ },

function updateShortcode(component) {
const { shortcode_attributes, shortcode_name } = component.get('attributes')
component.components(`{% ${shortcode_name} ${shortcode_attributes ?? ''} %}`)
const { shortcode_attributes, shortcode_name, shortcode_is_paired } = component.get('attributes')
const componentsToKeep = component.components()
.filter(c => c.view?.el?.nodeType === 1)
component.components(shortcode_is_paired ? `
{% ${shortcode_name} ${shortcode_attributes ?? ''} %}
<div class="replace_content"></div>
{% end${shortcode_name} %}
` : `
{% ${shortcode_name} ${shortcode_attributes ?? ''} %}
`)
const replaceContentDiv = component.components().find(c => c.getClasses().includes('replace_content'))
if (!replaceContentDiv) {
console.error('No replace_content found', { component, componentsToKeep })
return
}
replaceContentDiv.replaceWith(componentsToKeep)
}

@@ -60,8 +78,8 @@ editor.TraitManager.addType('shortcode-name', {

droppable: true,
// Prevent the drop down from opening on click
script: function() {
this.addEventListener('mousedown', event => {
event.preventDefault()
})
},
// // Prevent the drop down from opening on click
// script: function() {
// this.addEventListener('mousedown', event => {
// event.preventDefault()
// })
// },
},

@@ -68,0 +86,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc