Hide cw pictures behind a summary/details #483

Unito
Plume_migration_agent ha unito 6 commit da cw a master 2019-04-06 17:20:33 +00:00
Proprietario

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 2019-03-16 16:07:02 +00:00 ha commentato (Migrato da 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)
Autore
Proprietario

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] 2019-03-16 16:51:46 +00:00 ha commentato (Migrato da 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 ```
Autore
Proprietario

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 2019-04-05 20:59:05 +00:00 ha commentato (Migrato da 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.
Autore
Proprietario

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
Autore
Proprietario

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).
Autore
Proprietario

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 (Migrato da github.com) hanno approvato queste modifiche 2019-04-06 16:36:35 +00:00
elegaanz (Migrato da github.com) lascia un commento

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!
Autore
Proprietario

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`
Effettua l'accesso per partecipare alla conversazione.
Nessun revisore
Nessuna pietra miliare
Nessun progetto
Nessun assegnatario
2 partecipanti
Notifiche
Scadenza
La scadenza non è valida o fuori intervallo. Si prega di utilizzare il formato "aaaa-mm-dd".

Nessuna scadenza impostata.

Dipendenze

Nessuna dipendenza impostata.

Riferimento: Plume/Plume#483
Descrizione non fornita.