Hide cw pictures behind a summary/details #483

Обединени
Plume_migration_agent обедини 6 ревизии от cw във master преди 5 години
Притежател

This is an attempt at fixing #254
Sadly it doesn't work with the new editor, as html tags are put in a <code> bloc

This is an attempt at fixing #254 Sadly it doesn't work with the new editor, as html tags are put in a `<code>` bloc
elegaanz коментира преди 5 години (Migrated from github.com)

It makes me notice that one can copy almost any HTML in the editor, which is a bit weird, and full of bug (and maybe of security risks?). I think we should add a listener for onpaste and filter what is pasted (to only allow images or simple text)

It makes me notice that one can copy almost any HTML in the editor, which is a bit weird, and full of bug (and maybe of security risks?). I think we should add a listener for `onpaste` and filter what is pasted (to only allow images or simple text)
Участник
Притежател

from what I see, any html pasted is surrounded with <code>. There are no more risks than with the previous editor. Filtering/modifying what is pasted might be nice in some situations, sometime one just want to put some html elements not supported by plain markdown

from what I see, any html pasted is surrounded with `<code>`. There are no more risks than with the previous editor. Filtering/modifying what is pasted might be nice in some situations, sometime one just want to put some html elements not supported by plain markdown
codecov[bot] коментира преди 5 години (Migrated from github.com)

Codecov Report

Merging #483 into master will increase coverage by 0.22%.
The diff coverage is 57.89%.

@@            Coverage Diff             @@
##           master     #483      +/-   ##
==========================================
+ Coverage   24.64%   24.87%   +0.22%     
==========================================
  Files          65       65              
  Lines        7120     7196      +76     
==========================================
+ Hits         1755     1790      +35     
- Misses       5365     5406      +41
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/483?src=pr&el=h1) Report > Merging [#483](https://codecov.io/gh/Plume-org/Plume/pull/483?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/26fc2cde5da0ea8ac5b3d753d7b603929ca91acc?src=pr&el=desc) will **increase** coverage by `0.22%`. > The diff coverage is `57.89%`. ```diff @@ Coverage Diff @@ ## master #483 +/- ## ========================================== + Coverage 24.64% 24.87% +0.22% ========================================== Files 65 65 Lines 7120 7196 +76 ========================================== + Hits 1755 1790 +35 - Misses 5365 5406 +41 ```
Участник
Притежател

tested with #486, the md tag is not interpreted as it is inside some html. Maybe I should put plain html instead of markdown when using cw

tested with #486, the md tag is not interpreted as it is inside some html. Maybe I should put plain html instead of markdown when using cw
elegaanz коментира преди 5 години (Migrated from github.com)

I think Markdown in HTML never worked. At least it doesn't on GitHub:

**hello** I'm in a `div`

So yes, going with HTML for everything seems to be a better solution. Ideally, we should have some kind of custom Markdown like ![132] where 132 is the idea of a media, and then Plume just replaces it with the full HTML code, but this is probably quite hard to achieve.

I think Markdown in HTML never worked. At least it doesn't on GitHub: <div> **hello** I'm in a `div` </div> So yes, going with HTML for everything seems to be a better solution. Ideally, we should have some kind of custom Markdown like ![132] where 132 is the idea of a media, and then Plume just replaces it with the full HTML code, but this is probably quite hard to achieve.
Участник
Притежател

It might not be that hard actually, we "just" have to match with the Event Start(Image(_, _, _)) and map it to our custom html

It might not be that hard actually, we "just" have to match with the Event `Start(Image(_, _, _))` and map it to our custom html
Участник
Притежател

User should input something like ![some title](123)
If the corresponding picture has a cw, it display this
Screenshot_2019-04-06_16-40-55
And after clicking on it, it shows the picture (this is a toggle, so clicking again hide it back).

User should input something like `![some title](123)` If the corresponding picture has a cw, it display this ![Screenshot_2019-04-06_16-40-55](https://user-images.githubusercontent.com/35889323/55670981-f45d5800-588a-11e9-82f9-d66f151c10c2.png) And after clicking on it, it shows the picture (this is a toggle, so clicking again hide it back).
Участник
Притежател

Hum, there is a small bug if the same picture with cw is present twice, clicking on the second will only activate the first one. I shall probably add some random to the generated id

Hum, there is a small bug if the same picture with cw is present twice, clicking on the second will only activate the first one. I shall probably add some random to the generated id
elegaanz (Migrated from github.com) approved these changes преди 5 години
elegaanz (Migrated from github.com) left a comment

The warning and the image it hides doesn't have exactly the same size on my computer, but I think it is because of experiments I made with the editor.

Works perfectly otherwise. Thank you!

The warning and the image it hides doesn't have exactly the same size on my computer, but I think it is because of experiments I made with the editor. Works perfectly otherwise. Thank you!
Участник
Притежател

it's not from your experiments. It seems to came from the rule adding a 3em margin on main article img

it's not from your experiments. It seems to came from the rule adding a 3em margin on `main article img`

Reviewers

Тази заявка за сливане е била обединена като 12c2078c89.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b cw master
git pull origin cw

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff cw
git push origin master
Впишете се за да се присъедините към разговора.
No reviewers
Няма етап
Няма изпълнители
2 участника
Известия
Due Date
Крайният срок е невалиден или извън обхват. Моля използвайте форматът 'гггг-мм-дд'.

No due date set.

Зависимости

No dependencies set.

Reference: Plume/Plume#483
Зареждане…
Все още няма съдържание.