Commit Graph

19 Commits

Author SHA1 Message Date
381f6e64e8 FIX: click handler position on rich editor details node (#32268)
`pos` is the exact position of the click in the entire document

`nodePos` is the position of the clicked node itself

The idea is that we want the click to be the first position **within the
node**.

The previous code was checking for the first 2 positions of the entire
document.

I'd love to add a test for this, but it's very tricky.
2025-04-14 14:06:54 -03:00
fdb805d131 UX: only toggle rich editor details on caret click (#32267) 2025-04-12 09:01:20 -03:00
623f02aff6 FEATURE: add details (plugin) rich editor extension (#31718)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds `details` and `summary` nodes, parsers, and serializers, and a
click handler to toggle the `open` attribute.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-03-11 20:15:32 -03:00
fd15562939 FIX: allows to use open attribute with details (#29116)
Supporting `open` allows to show a `details` block open by default.

Usage:

```
[details open]
my visible content
[/details]
```
2024-10-08 11:13:44 +09:00
f414d5eace DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
4ad77f3382 DEV: Remove .es6 extensions from core (#14912)
Still supported in plugins though.
2021-11-13 12:51:53 +01:00
dbec3792b7 FIX: pretty text allow list (#10977)
Reword whitelist to allowlist in pretty-text.
This library is used by plugins so we need deprecation notice.
2020-10-28 13:22:06 +11:00
bf88410126 DEV: apply coding standards to plugins (#10594) 2020-09-04 13:51:53 +02:00
60ff0e9b8c missing prettified files 2018-06-15 18:42:20 +02:00
Sam
bb1ac09ad7 amend to match latest api changes 2017-07-21 16:16:07 -04:00
Sam
8921058c67 FIX: medium URL with @ incorrectly handled as mention
Also:

- remove unused code
- rename bbcode_ruler to bbcode.ruler
- add md.core.textPostProcess.ruler to apply at end of chain (excluding links)
2017-07-17 17:44:48 -04:00
d0c5205a52 Feature: Change markdown engine to markdown it
This commit removes the old evilstreak markdownjs engine.

- Adds specs to WhiteLister and changes it to stop using globals
    (Fixes large memory leak)
- Fixes edge cases around bbcode handling
- Removes mdtest which is no longer valid (to be replaced with
    CommonMark)
- Updates MiniRacer to correct minor unmanaged memory leak
- Fixes plugin specs
2017-07-17 11:41:34 -04:00
Sam
d609f8a53c Revert "correct more specs"
This reverts commit 40bcc6bbdc99a33e65af29b7fd789354c84f6fd4.
2017-07-12 18:10:05 -04:00
Sam
40bcc6bbdc correct more specs 2017-07-12 17:44:40 -04:00
Sam
234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00
16383a1749 FIX: Also support just open 2016-07-20 13:30:36 -04:00
e341596536 FIX: Suppory open details elements 2016-07-20 13:26:23 -04:00
a2b9b01d0f FIX: details plugin wasn't working properly 2016-07-11 12:57:05 -04:00
a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00