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

Image alt and height parameters are lost on save

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 18.0.1
    • Blocknote
    • None
    • Unknown

    Description

      Follow these steps to reproduce

      • create a page with this content:
        [[Carol>>image:Path.To.Carol@avatar.png||alt="Carol's avatar" data-xwiki-image-style-alignment="center" width="150" height="100"]]
        
      • edit the page with BlockNote
      • the input UniAst syntax is:
        {
          "blocks" : [ {
            "type" : "image",
            "styles" : {
              "alignment" : "center"
            },
            "target" : {
              "type" : "internal",
              "rawReference" : "Path.To.Carol@avatar.png"
            },
            "alt" : "Carol's avatar",
            "widthPx" : 150,
            "heightPx" : 100,
            "caption" : "Carol"
          } ]
        }
        
      • save
      • the output UniAst syntax is:
        {
          "blocks" : [ {
            "type" : "image",
            "target" : {
              "type" : "external",
              "url" : "Path.To.Carol@avatar.png"
            },
            "caption" : "Carol",
            "widthPx" : 150,
            "styles" : {
              "alignment" : "center"
            }
          } ]
        }
        

      As you can see the alt and height parameters are lost.

      Attachments

        Activity

          People

            ClementEraud Clément Eraud
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: