Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19976

Render image width/height to css property instead to tag attribute

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • CKEditor
    • Unknown

    Description

      Currently width and height properties of a style tag don't survive wysiwyg-editing:

      [[image:picture.png||style="width:5cm;border:3pt solid red"]]

      will be rendered to

      style="border:3pt solid red"

      To specify the dimension of an image by style properties has some advantages:

      • The size will be the dimension of the image later output as print or pdf.
      • The size may be specified in font related dimensions (em,ex,ch) allowing use of images like a special character of a font.
      • There are css  units with better readability than pixels.

       

      There are tricky workarounds - surviving wysiwyg editing:

      inline:

      This picture (% style="display:inline-block; width:3cm" %)[[image:picture.jpg||style="border:3pt solid red"]](%%) shows the effect.

       

      not inline:

      (% style="width:5cm" %)[[image:picture.png||style="border:3pt solid red"]]

       

      But changing the methods would be more clearly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            NorSch Norbert Schwarz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: