From 29a29094bd36040178a72022deca0c346c020186 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 16 Mar 2026 12:41:02 -0400 Subject: [PATCH] Configure Lexxy to add extra spacing between block elements Updating Lexxy to v0.8.5 for the insert-markdown event. --- Gemfile | 2 +- Gemfile.lock | 11 +++-------- Gemfile.saas.lock | 11 +++-------- app/javascript/initializers/index.js | 1 + app/javascript/initializers/lexxy_markdown_paste.js | 3 +++ 5 files changed, 11 insertions(+), 17 deletions(-) create mode 100644 app/javascript/initializers/lexxy_markdown_paste.js diff --git a/Gemfile b/Gemfile index da66e1473..597899b7d 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ gem "geared_pagination", "~> 1.2" gem "rqrcode" gem "rouge" gem "jbuilder" -gem "lexxy", bc: "lexxy" +gem "lexxy", "0.8.5.beta" gem "image_processing", "~> 1.14" gem "platform_agent" gem "aws-sdk-s3", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 8db6817dc..ae84f65f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,3 @@ -GIT - remote: https://github.com/basecamp/lexxy - revision: b7f0f1429df5fa425eac043191ae2b65edee7488 - specs: - lexxy (0.7.6.beta) - rails (>= 8.0.2) - GIT remote: https://github.com/basecamp/useragent revision: 433ca320a42db1266c4b89df74d0abdb9a880c5e @@ -261,6 +254,8 @@ GEM logger (~> 1.6) letter_opener (1.10.0) launchy (>= 2.2, < 4) + lexxy (0.8.5.beta) + rails (>= 8.0.2) lint_roller (1.1.0) logger (1.7.0) loofah (2.25.0) @@ -523,7 +518,7 @@ DEPENDENCIES jbuilder kamal letter_opener - lexxy! + lexxy (= 0.8.5.beta) mission_control-jobs mittens mocha diff --git a/Gemfile.saas.lock b/Gemfile.saas.lock index 6f9b0d088..176a5218c 100644 --- a/Gemfile.saas.lock +++ b/Gemfile.saas.lock @@ -21,13 +21,6 @@ GIT rails (>= 7.0) rainbow -GIT - remote: https://github.com/basecamp/lexxy - revision: b7f0f1429df5fa425eac043191ae2b65edee7488 - specs: - lexxy (0.7.6.beta) - rails (>= 8.0.2) - GIT remote: https://github.com/basecamp/queenbee-plugin revision: 14312a940471e20617b38cdec7c092a01567d18b @@ -374,6 +367,8 @@ GEM logger (~> 1.6) letter_opener (1.10.0) launchy (>= 2.2, < 4) + lexxy (0.8.5.beta) + rails (>= 8.0.2) lint_roller (1.1.0) logger (1.7.0) loofah (2.25.0) @@ -729,7 +724,7 @@ DEPENDENCIES jbuilder kamal letter_opener - lexxy! + lexxy (= 0.8.5.beta) mission_control-jobs mittens mocha diff --git a/app/javascript/initializers/index.js b/app/javascript/initializers/index.js index 1d16ef205..d2c20451e 100644 --- a/app/javascript/initializers/index.js +++ b/app/javascript/initializers/index.js @@ -1,3 +1,4 @@ import "initializers/current" import "initializers/bridge/bridge_element" import "initializers/offline" +import "initializers/lexxy_markdown_paste" diff --git a/app/javascript/initializers/lexxy_markdown_paste.js b/app/javascript/initializers/lexxy_markdown_paste.js new file mode 100644 index 000000000..cf7600306 --- /dev/null +++ b/app/javascript/initializers/lexxy_markdown_paste.js @@ -0,0 +1,3 @@ +document.addEventListener("lexxy:insert-markdown", (event) => { + event.detail.addBlockSpacing() +})