Hide cw pictures behind a summary/details #483

Sloučený
Plume_migration_agent sloučil 6 commity z větve cw do větve master před před 5 roky
Vlastník

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 okomentoval před 5 roky (Migrováno z 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)
Autor
Vlastník

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] okomentoval před 5 roky (Migrováno z 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 ```
Autor
Vlastník

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 okomentoval před 5 roky (Migrováno z 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.
Autor
Vlastník

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
Autor
Vlastník

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).
Autor
Vlastník

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 (Migrováno z github.com) schválil tyto změny před 5 roky
elegaanz (Migrováno z github.com) zanechal komentář

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!
Autor
Vlastník

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`

Posuzovatelé

Požadavek na natažení byl sloučen jako 12c2078c89.
Můžete také zobrazit instrukce příkazové řádky.

Krok 1:

Z vašeho repositáře projektu se podívejte na novou větev a vyzkoušejte změny.
git checkout -b cw master
git pull origin cw

Krok 2:

Slučte změny a aktualizujte je na Forgejo.
git checkout master
git merge --no-ff cw
git push origin master
Přihlaste se pro zapojení do konverzace.
Žádní posuzovatelé
Bez milníku
Bez zpracovatelů
2 účastníků
Oznámení
Termín dokončení
Termín dokončení není platný nebo je mimo rozsah. Použijte prosím formát „rrrr-mm-dd“.

Žádný termín dokončení.

Závislosti

Nejsou nastaveny žádné závislosti.

Reference: Plume/Plume#483
Načítá se…
Není zde žádný obsah.