editor: Don't restrict plugins from being able to bring in newline content

#2412 broke this, it was discovered in https://github.com/JohnMcLear/ep_copy_paste_images/issues/20.

The limitation means that images can't be pasted within lists which IMHO is fine.  I could refine this down to OL only but I think images within lists would be fine not to include.
This commit is contained in:
John McLear 2020-05-29 16:53:08 +01:00 committed by GitHub
parent c6b5846172
commit 2011c24f57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -665,8 +665,12 @@ function makeContentCollector(collectStyles, abrowser, apool, domInterface, clas
{
if (lines.length() - 1 == startLine)
{
// commented out to solve #2412 - https://github.com/ether/etherpad-lite/issues/2412
// cc.startNewLine(state);
// to solve #2412 - https://github.com/ether/etherpad-lite/issues/2412
// added additional check to resolve https://github.com/JohnMcLear/ep_copy_paste_images/issues/20
// this does mean that images etc can't be pasted on lists but imho that's fine
if(state.lineAttributes && !state.lineAttributes.list){
cc.startNewLine(state);
}
}
else
{