mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
contentcollector: remove weird stuff LibreOffice adds to DOM before importing
This commit is contained in:
parent
a371deb9d1
commit
f6907c5fad
1 changed files with 10 additions and 0 deletions
|
@ -526,6 +526,16 @@ function makeContentCollector(collectStyles, abrowser, apool, domInterface, clas
|
||||||
if (isPre) cc.incrementFlag(state, 'preMode');
|
if (isPre) cc.incrementFlag(state, 'preMode');
|
||||||
var oldListTypeOrNull = null;
|
var oldListTypeOrNull = null;
|
||||||
var oldAuthorOrNull = null;
|
var oldAuthorOrNull = null;
|
||||||
|
|
||||||
|
// LibreOffice Writer puts in weird items during import or copy/paste, we should drop them.
|
||||||
|
if (cls === "Numbering_20_Symbols" || cls === "Bullet_20_Symbols") {
|
||||||
|
styl = null;
|
||||||
|
cls = null;
|
||||||
|
|
||||||
|
// We have to return here but this could break things in the future, for now it shows how to fix the problem
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (collectStyles)
|
if (collectStyles)
|
||||||
{
|
{
|
||||||
hooks.callAll('collectContentPre', {
|
hooks.callAll('collectContentPre', {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue