Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Copy pasting the table from another site page is not working properly #227

Open
iFlameing opened this issue Jan 10, 2022 · 12 comments
Open
Assignees

Comments

@iFlameing
Copy link
Contributor

iFlameing commented Jan 10, 2022

I checked the copy-pasting from google docs and it works perfectly fine. But If the user copy-paste the content from the website Page which is implemented may give some unwanted behavior. Here is one I implemented in code sandbox and here you can see that if you copy-paste this table block you will not get the sidebar of table block.

https://codesandbox.io/s/sweet-heisenberg-ord5n?file=/src/App.js

I investigated that there is a difference between how we structure the code of table block and other website pages. Here is the difference
Here is how Another website can implement

 <tr class="">
            <td class="">
              <em>March 2021</em>
              <br />{" "}
            </td>
</tr>

Here is how we implemented the same text

 <tr class="">
               <td class="">
              <p>
                <em>March 2021</em>
                <br />{" "}
              </p>
            </td>
</tr>

In edit mode for the first one, we will not get the <p> tag element. I think that something is related to that.

I found this issue when I am trying to find an issue reported by a user. @tiberiuichim maybe you have some insight into why this occurs.

This is the generated code when the user pasted the table

           <td class="">
              <div class="slate-editor" tabindex="-1">
                <div
                  role="textbox"
                  tabindex="0"
                  spellcheck="false"
                  data-slate-editor="true"
                  data-slate-node="value"
                  contenteditable="true"
                  zindex="-1"
                ></div>
              </div>
            </td>

I don't know why there is no p generated tag. This is the error occurred when the user clicks on the generated table column.

Screenshot 2022-01-10 at 5 40 01 PM

@iFlameing iFlameing changed the title Copy pasting the table from some site page is not working Properly Copy pasting the table from some site page is not working properly Jan 10, 2022
@iFlameing iFlameing changed the title Copy pasting the table from some site page is not working properly Copy pasting the table from another site page is not working properly Jan 10, 2022
@iFlameing
Copy link
Contributor Author

@tiberiuichim Finally found the original table of website. Here is the link. https://www.fz-juelich.de/ibg/ibg-1/EN/Research/SystemicMicrobiology/syncell/syncell_node.html.
Visit this link and try to copy paste the table in volto-slate.

  1. It will able to replicate the table
  2. save it
  3. once again go to edit
  4. try to edit the January to December
  5. You will not able to edit it.

@nileshgulia1
Copy link
Member

@iFlameing I will try to replicate it in couple of days, Right now caught up with something. Is it urgent?

@iFlameing
Copy link
Contributor Author

@nileshgulia1 not so.

@iFlameing
Copy link
Contributor Author

@nileshgulia1 any update?

@iFlameing
Copy link
Contributor Author

@tiberiuichim can you please take a look regarding this issue.

1 similar comment
@iFlameing
Copy link
Contributor Author

@tiberiuichim can you please take a look regarding this issue.

@tiberiuichim tiberiuichim self-assigned this Feb 8, 2022
@tiberiuichim
Copy link
Member

@iFlameing ok, I will

@iFlameing
Copy link
Contributor Author

@tiberiuichim any update

1 similar comment
@iFlameing
Copy link
Contributor Author

@tiberiuichim any update

@tiberiuichim
Copy link
Member

@iFlameing which "additional addon loaders" are loaded? How is volto-slate loaded in your package.json?

@iFlameing
Copy link
Contributor Author

@tiberiuichim this is the configuration

 "volto-slate:minimalDefault,simpleLink,tableButton",

@iFlameing
Copy link
Contributor Author

@tiberiuichim any finding or pr, we really need this now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants