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

WYSIWYG has 2 levels of bold: one introduced by Flamingo's heading and the standard one (<strong>)

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Reported by Eduard Moraru:

      There's a problem in wysiwyg caused by flamingo's default font-weight of 500 (instead of 400) that practically sets headings to bold by default.
      http://ci.xwiki.org/job/xwiki-enterprise-test-wysiwyg/lastBuild/org.xwiki.enterprise$xwiki-enterprise-test-wysiwyg/testReport/org.xwiki.test.wysiwyg/StandardFeaturesTest/testBold/
      this test does the following:

              typeText("x");
              applyStyleTitle5();
              selectAllContent();
              clickBoldButton();
              assertContent("<h5><strong>x</strong></h5>");
      

      so bold is set by default now when applyStyleTitle5(); is done
      when clicking bold again, wysiwyg tries to reset flamingo's default bold, so the content ends up being wrapped in

      <span style="font-weight: normal;">x</span>

      and the bold button is now unset
      if bold is pressed yet again, rendering (this time) wraps the content ( x ) in a strong element (as expected), but inside that span, ending up with:

      "<h5><span style="font-weight: normal;"><strong>dsadsadsa</strong></span></h5>"
      

      default font-weight is 400, bootstrap/flamingo uses 500 for headings and WYSIWYG's inserted <strong> is 700.

      should we override bootstrap into using font-weight 400 for headings, like colibri was doing? Any other suggestions?

      Attachments

        1. weight_500.png
          weight_500.png
          97 kB
        2. weight_400.png
          weight_400.png
          97 kB
        3. bug_with_linux.png
          bug_with_linux.png
          9 kB

        Issue Links

          Activity

            People

              gdelhumeau Guillaume Delhumeau
              enygma Eduard Moraru
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: