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

add ability of paste from word table or html table #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kooky126
Copy link

@kooky126 kooky126 commented Nov 2, 2021

can paste from word table or html table


colspan cell will holder by "<"
rowspan cell will holder by "^"

editor.js cut all table node data in paste(such as tr td )

so need modify

editor.js\src\components\modules\paste.ts need add a line in 555

555 content.innerHTML = clean(content.innerHTML, customConfig);
to
555 if(!(//i.test(content.innerHTML)))
556 content.innerHTML = clean(content.innerHTML, customConfig);

add ability of paste from word table or html table
colspan cell will holder by "<"
rowspancell will holder by "^" 

editor.js cut all table node data in paste(such as tr td )

editor.js\src\components\modules\paste.ts need add a line in 555

555 content.innerHTML = clean(content.innerHTML, customConfig);
   to
555  if(!(/<tbody>/i.test(content.innerHTML)))
556         content.innerHTML = clean(content.innerHTML, customConfig);
del console.log
add ability of paste from word or html table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant