Open mateuszzagorski opened 2 years ago
- Target captions with css
I think we can't do this since we can't influence how CSS looks for non-GH writer users (messing with styling outside of editor within GH writer is also no-go).
- Use inline HTML
That would be my go-to option, but is it possible to pass image caption as raw HTML on GitHub? I just checked it with markup generated by our editor.
<figure class="image image-style-side image_resized" style="width:17.33%;">
<img src="https://ckeditor.com/docs/ckeditor5/latest/assets/img/game_boy.jpg">
<figcaption>
The Nintendo "flagship" - handheld Game Boy
</figcaption>
</figure>
This goes below:
And I can see that the figure
and figurecaption
elements got stripped. So I'm not sure if that's possible.
I added a dedicated feature request for image resize #355 - let's keep the discussion separate as implementation is slightly different and both features can be added independently.
It would be nice to allow for using the
image-caption
andimage-resize
with GitHub Writer. Unfortunately, the Github Flavor Markdown syntax does not support caption/resizing image syntax out of the box, so it would require some additional work to convert the output into (for example) the valid html, or explore other possible solutions.Possible solutions for the
image-caption
and/orimage-resize
:Additional notes:
More regarding the Github markdown syntax can be found in the GitHub markdown documentation.
If you'd like to see this improvement implemented, add a :+1: reaction to this post.