Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Importing HTML with headings is not properly formatted #38

Open
simong opened this issue Jul 18, 2014 · 2 comments
Open

Importing HTML with headings is not properly formatted #38

simong opened this issue Jul 18, 2014 · 2 comments

Comments

@simong
Copy link
Contributor

simong commented Jul 18, 2014

It seems that importing HTML that includes <h1>, <h2>, .. tags messes up the formatting.

Here's a quick bash script that demonstrates what happens

#!/bin/bash
#
# Save as sethtml.sh and execute by running
# ./sethtml.sh "your api key" "a pad id" "<html><body><div><h1>Heading 1</h1><p>some text</p><h2>Heading 2</h2><p>More text</p></div></body></html>"
#
APIKEY=$1
PADID=$2
HTML=$3

curl -d"apikey=$APIKEY" -d"padID=$PADID" -d"html=$HTML" http://localhost:9001/api/1/setHTML
@simong
Copy link
Contributor Author

simong commented Jul 18, 2014

My example is wrong, if you don't have a succession of tags it's fine.
If you import something like:
<h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3>
you get the messed up formatting.

FWIW: this formatting can be achieved by importing an exported pad

@cetra3
Copy link

cetra3 commented Aug 12, 2014

I've created a pull request that resolves this if anyone is interested

ether/etherpad-lite#2222

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

2 participants