javascript

Make a Wix Show-More with HTML content

Wix has a Show More tutorial, but it only allows you to replace the text of content, and does not allow you to use HTML in your Show More expanded or collapsed content.

There would be a million ways to solve this, but Wix likes to lock you down in their scripts and prevent you from modifying the DOM.

For a developer used to being able to accomplish whatever is needed, this is frustrating.

Here's the solution I came up with for a friend:

Here's the code. Read the instructions in the comments.

Add Multi-Element Wrapper Class With CKEditor in Drupal 8

The task at hand here is to allow the client to create a classed wrapper around multiple elements using CKEditor in Drupal 8.

The fundamental problem here is the CKEditor's built in "Styles" dropdown classes each <p> individually, while we need a class wrapping them.

You could probably make or install your own CKEditor plugin, but that's not what I did.

I did this with Javascript.

Subscribe to javascript