Feature: Scroll to Line number based on Hash IE http://foo.com/p/bar#L10 will scroll to line 10. (#4554)

Includes test coverage
Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
This commit is contained in:
John McLear 2020-12-26 21:05:08 +00:00 committed by GitHub
parent e051f2f2f7
commit 38c9827161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 128 additions and 15 deletions

View file

@ -3,10 +3,10 @@ You can easily embed your etherpad-lite into any webpage by using iframes. You c
Example:
Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the line numbers.
Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the line numbers and will auto-focus on Line 4.
```
<iframe src='http://pad.test.de/p/PAD_NAME?showChat=false&showLineNumbers=false' width=600 height=400></iframe>
<iframe src='http://pad.test.de/p/PAD_NAME#L4?showChat=false&showLineNumbers=false' width=600 height=400></iframe>
```
## showLineNumbers
@ -66,3 +66,10 @@ Example: `lang=ar` (translates the interface into Arabic)
Default: true
Displays pad text from right to left.
## #L
* Int
Default: 0
Focuses pad at specific line number and places caret at beginning of this line
Special note: Is not a URL parameter but instead of a Hash value