Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some invisible keys still shown up on the docx output #12

Open
fathoni opened this issue Mar 17, 2023 · 0 comments
Open

Some invisible keys still shown up on the docx output #12

fathoni opened this issue Mar 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@fathoni
Copy link
Collaborator

fathoni commented Mar 17, 2023

Consider the following screenshot of a KVMU pair:

grafik

In which the first line is represented by the following snippet:

<p>
  <span style="color: #000000; font-size: 10pt;">
    Sample 1 { HA-3_pBAD-F+50-alt 
    <span style="color: #e03e2d;">
      <span style="color: #000000;">|</span>
    </span>
    <span style="color: #e03e2d;">1130 bases</span>
    &nbsp;|
    <span style="color: #e03e2d;">OK </span>|
  </span>
  <span style="color: #000000; font-size: 10pt;">
    <span style="color: #e03e2d;">
      <span style="color: #000000;">&nbsp;Sequencing 1},
      </span>
    </span>
  </span>
</p>

and the second line is represented by the following HTML snippet:

<p>
  <span style="color: #000000; font-size: 10pt;">
    Sample 2 { HA-3_
    <span style="color: #e03e2d;">EGFP-For-alt </span>
    <span style="color: #e03e2d;">
      <span style="color: #000000;">| </span>
    </span>
    <span style="color: #e03e2d;">1156 bases</span>
    |
    <span style="color: #e03e2d;">OK </span>|
    <span style="color: #e03e2d;">
      <span style="color: #000000;">Sequencing 2},
      </span>
    </span>
  </span>
</p>

The docx output will result the following screenshot:

grafik

Which should not be the case. The "Sequencing 1" should have been removed in the output, yet it still appears. This is possibly caused by overcomplicated span tags (but also need to find out why the second line works okay even with such complicated nested tags).

For the initial workaround, the users are not encouraged to have individual text formatting (e.g., multiple different formatting with different text colors/font sizes) within a line/paragraph.

UPDATE: The workaround is to make the whole paragraph/line/block have a similar span root. This can be done in the TinyMCE editor by selecting the text block that is supposed to have a similar span root and setting the font size to be similar. More tests needed.

@fathoni fathoni added the bug Something isn't working label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant