David Taylor 569b566d38
FIX: Multiple placeholders in a single post (#40)
The changes in 948634fe310ed8c7fbdc21811ef201f4b5c4f306 meant that only the most-recently-changed placeholder is actually applied.

This commit refactors things so that we store all placeholder values in JS, and then apply them all in a single pass over the DOM. As well as fixing the bug, this should be a significant perf improvement for posts with lots of placeholders

Also introduces some simple system specs.
---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-08-29 12:37:21 +01:00
2023-12-05 23:15:32 +01:00
2024-08-20 17:54:48 +02:00
2024-03-27 18:55:28 +01:00
2024-03-27 18:55:28 +01:00
2024-03-27 18:55:28 +01:00
2024-03-27 18:55:28 +01:00
2024-06-09 10:09:13 +01:00
2019-05-14 11:18:12 +02:00
2024-03-27 18:55:28 +01:00
2023-02-04 15:57:50 +01:00
2024-06-11 13:37:43 +02:00

discourse-placeholder-theme-component

https://meta.discourse.org/t/discourse-placeholder-theme-component/113533

Usage

[wrap=placeholder key=NAME][/wrap]
[wrap=placeholder key=COUNTRY default=FR][/wrap]
[wrap=placeholder key=SECRET description="Used to open the bank"][/wrap]

I'm =NAME=, I come from =COUNTRY= let me tell you my secret: =SECRET==

Feedback

If you have issues or suggestions for the theme component, please bring them up on Discourse Meta.

Description
No description provided
Readme MIT 887 KiB
Languages
JavaScript 66.9%
Ruby 12.7%
Handlebars 10.3%
SCSS 10.1%