discourse/app/assets/javascripts/pretty-text/addon
Martin Brennan 0b8d0a14d7
DEV: Add markdown_additional_options to Site (#15738)
Sometimes plugins need to have additional data or options available
when rendering custom markdown features/rules that are not available
on the default opts.discourse object. These additional options should
be namespaced to the plugin adding them.

```
Site.markdown_additional_options["chat"] = { limited_pretty_text_markdown_rules: [] }
```

These are passed down to markdown rules on opts.discourse.additionalOptions.

The main motivation for adding this is the chat plugin, which currently stores
chat_pretty_text_features and chat_pretty_text_markdown_rules on
the Site object via additions to the serializer, and the Site object is
not accessible to import via markdown rules (either through
Site.current() or through container.lookup). So, to have this working
for both front + backend code, we need to attach these additional options
from the Site object onto the markdown options object.
2022-01-28 13:02:02 +10:00
..
emoji FEATURE: Add missing emojis (#15582) 2022-01-14 17:51:13 -03:00
engines FEATURE: Customizable rules and plugins for PrettyText.markdown. 2022-01-11 10:39:40 +08:00
allow-lister.js FIX: Do not perform link lookup for replaced links (#14742) 2021-10-28 13:27:31 +03:00
censored-words.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
emoji.js FIX: Don't display duplicated emoji in picker 2022-01-11 10:37:02 +08:00
guid.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
inline-oneboxer.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer-cache.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer.js DEV: Allow utility class domFromString to take in strings with multiple top level elements (#15548) 2022-01-12 19:49:24 +08:00
pretty-text.js DEV: Add markdown_additional_options to Site (#15738) 2022-01-28 13:02:02 +10:00
sanitizer.js SECURITY: Sanitize d-popover attributes (#13958) 2021-08-05 16:39:17 +03:00
upload-short-url.js FEATURE: Use diffhtml to update composer preview (#11237) 2021-02-18 16:07:26 +02:00
white-lister.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00