Hide cw pictures behind a summary/details #483

Злито
Plume_migration_agent злито 6 комітів з cw до master 5 роки тому
trinity-1686a прокоментував(ла) 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 роки тому (Перенесено з 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)
trinity-1686a прокоментував(ла) 5 роки тому
Автор
Власник

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 роки тому (Перенесено з 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 ```
trinity-1686a прокоментував(ла) 5 роки тому
Автор
Власник

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 роки тому (Перенесено з 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.
trinity-1686a прокоментував(ла) 5 роки тому
Автор
Власник

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
trinity-1686a прокоментував(ла) 5 роки тому
Автор
Власник

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).
trinity-1686a прокоментував(ла) 5 роки тому
Автор
Власник

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 (Перенесено з github.com) зміни затверджено 5 роки тому
elegaanz (Перенесено з github.com) додав коментар

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!
trinity-1686a прокоментував(ла) 5 роки тому
Автор
Власник

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`

Рецензенти

Запит на злиття був влитиий як 12c2078c89.
Також можна переглянути інструкції для командного рядка.

Крок 1:

У репозиторії вашого проєкту перевірте нову гілку і протестуйте зміни.
git checkout -b cw master
git pull origin cw

Крок 2:

Об'єднати зміни і оновити на Forgejo.
git checkout master
git merge --no-ff cw
git push origin master
Підпишіться щоб приєднатися до обговорення.
Немає рецензентів
Етап відсутній
Немає виконавця
2 учасників
Сповіщення
Дата завершення
Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: Plume/Plume#483
Завантаження…
Тут ще немає жодного змісту.