Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-7006

RichText transform text to list/table keeps its style AND destroy it during saving

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.5.6, 3.7.4, 3.8, 4.0M5
    • None
    • None
    • None

      With a skin with a special CSS in richtext such as

      .mceeditor p { color: red; } 

      1) Insert this in source and save.

      <p>L’Institut d'éducation est une composante de l'UCP, en lien avec l'Éspé de l'académie de Versailles http://www.espe-versailles.fr/, qui est chargée de la mise en œuvre de formations diplômantes dans les secteurs de l'éducation et de la formation :</p>
      <p>Masters MEEF 1 / Formation des enseignants du 1er dégré<br />Masters MEEF 2 / Formation des enseignants du second degré, pour les lycées technologiques et professionnels<br />Masters MEEF 3 / Formation des Conseillers Principaux d'Éducation<br />Masters MEEF 4 / Pratiques et ingénierie de la formation<br />L'Institut d'éducation participe, en lien avec l'Éspé de l'académie de Versailles, à des missions de formation continue, d'éducation artistique et culturelle et des activités internationales.</p>
      <p>L'Institut d'éducation propose aussi une licence pluri-disciplinaire.</p>
      <p>Il développe une politique de recherche en didactique et éducation, tant sur les apprentissages que sur les acteurs et les institutions.</p>
      <p>Les formations sont dispensées sur 5 sites universitaires : Antony (92), Gennevilliers (92), Cergy (95), Evry (91) et Saint-Germain-en-Laye (78), ainsi que sur un site de formation à distance.</p>

      2) edit the content again and set the cursor in "Masters MEEF 1 / Formation des enseignants du 1er dégré" and transform it to a list

      3) a <span> is created to keep the previsous text style

      Another way to have this kind of bug is to copy/paste a table. span will appears in the cells

          [CMS-7006] RichText transform text to list/table keeps its style AND destroy it during saving

          Newsletter was too much cleaned up in 3.x
          v4 was not affected

          Raphaël Franchet added a comment - Newsletter was too much cleaned up in 3.x v4 was not affected

          What about newsletter ?

          We edit the complete HTML body for newsletter, and span into title tags (h1 and more) are removed.

          Bérénice Maurel added a comment - What about newsletter ? We edit the complete HTML body for newsletter, and span into title tags (h1 and more) are removed.

          I did add a event handler to intercept "GetContent" and to clean the issue.

          So, in the worst case : you may operate some stuff that lead to a graphical issue, but during the save process, it will be clean.
          In a better case (when char counter is on) you will see a graphical issue during a few seconds until the char counter is updated ; the clean process will be called and the graphical issues will disapear.

          Raphaël Franchet added a comment - I did add a event handler to intercept "GetContent" and to clean the issue. So, in the worst case : you may operate some stuff that lead to a graphical issue, but during the save process, it will be clean. In a better case (when char counter is on) you will see a graphical issue during a few seconds until the char counter is updated ; the clean process will be called and the graphical issues will disapear.

          The problem still occurs when deleting

          Frederic Ravetier (Inactive) added a comment - The problem still occurs when deleting

          The bug was handled by adding in 3.8 a method "org.ametys.cms.editor.Editor.cleanUp" that is called when inserting a list and when pasting a content.
          We may encounter this issue in other cases and we will need to apply the same method in thoses cases.

          Raphaël Franchet added a comment - The bug was handled by adding in 3.8 a method "org.ametys.cms.editor.Editor.cleanUp" that is called when inserting a list and when pasting a content. We may encounter this issue in other cases and we will need to apply the same method in thoses cases.

            raphael Raphaël Franchet
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: