Giter Site home page Giter Site logo

ep_table_of_contents's Introduction

Publish Status Backend Tests Status

Builds a table of contents into the Etherpad interface

Enable under settings. Create headings, watch the TOC populate in real time.

Configuration

If you want to have the TOC shown by default, add following snippet to your settings.json:

"ep_toc": {
  "disable_by_default": false
},

You can also set this on a per-pad basis by setting the URL parameter toc to true or false.

If you want to have a button in the toolbar to toggle the TOC, add following snippet to your settings.json:

"ep_toc": {
  "show_button": true
},

License

Copyright 2014, John McLear

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ep_table_of_contents's People

Contributors

agerodol avatar benoitlathiere avatar clkao avatar dependabot[bot] avatar dtygel avatar f0i avatar fkohrt avatar fwolfst avatar github-actions[bot] avatar gregcurrie avatar gulaschskanone avatar hmarzban avatar jdittrich avatar johnmclear avatar ldidry avatar lgtm-migrator avatar ovari avatar rhansen avatar samtv12345 avatar seballot avatar translatewiki avatar woeterman94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ep_table_of_contents's Issues

Problem : Titles are truncated in the TOC

I just installed this great plugin that you developed (ep_table_of_content v 0.2.3) and that allows to have a table of contents within a PAD.

I have a little problem concerning the display (Firefox v 81.02 - the same pb with Chromium) in the sense that the titles (in the TOC) are truncated as you can see in the screenshot below or directly on the PAD by clicking here. Is there a particular setting to make? If yes, where?

Thank you very much for your help.

Friendly and freely,

Fabrice (Normandy, France)

Capture du 2020-10-18 10-33-11

My configuration :

Server

UbuntuServer 18.04 LTS

Etherpad version

Version number: 1.8.6

Latest available version: 1.8.6

Git sha: 3886e95

Installed plugins

ep_delete_after_delay
ep_align
ep_author_hover
ep_adminpads2
ep_embedded_hyperlinks2
ep_font_color
ep_etherpad-lite
ep_font_size
ep_spellcheck
ep_pads_stats
ep_headings
ep_table_of_contents

Installed parts

ep_table_of_contents/ep_table_of_contents
ep_headings/main
ep_pads_stats/ep_pads_stats
ep_spellcheck/ep_spellcheck
ep_font_size/main
ep_etherpad-lite/openapi
ep_etherpad-lite/adminsettings
ep_etherpad-lite/adminplugins
ep_etherpad-lite/admin
ep_etherpad-lite/tests
ep_etherpad-lite/socketio
ep_etherpad-lite/errorhandling
ep_etherpad-lite/importexport
ep_etherpad-lite/apicalls
ep_etherpad-lite/webaccess
ep_etherpad-lite/padreadonly
ep_etherpad-lite/padurlsanitize
ep_etherpad-lite/specialpages
ep_etherpad-lite/i18n
ep_etherpad-lite/static
ep_etherpad-lite/express
ep_font_color/main
ep_embedded_hyperlinks2/main
ep_adminpads2/ep_adminpads2
ep_author_hover/ep_author_hover
ep_align/main
ep_delete_after_delay/ep_delete_after_delay

TOC overlaps chat

Hi John and other friends,

We usually use the pad with the "chat always visible" option. It creates the chat on the right. When you activate the TOC in this case, it doesn't appear to the final user, since it's behind the chat.

I've done a change in the CSSs of the plugin to make the TOC appear on the left. Would you be interested in committing this change? I'm asking before a pull request since it's a quite big change. You can see the TOC on the right in this pad:
http://pad.eita.org.br/p/teste

Thank you,

daniel

Config option disable_by_default not working

Hey!
First of all, thanks a lot for your plugin :)

I may have an issue with the settings. I put

    "ep_toc": {
        "disable_by_default": true
    },

to the settings but it seems not working.

image

Did I forget something?


Etherpad version: 1.8.16
Running in a docker instance

Toggle the numbers, add TOC button to Headerbar

While the Plugin works fine most of the time, it would be great to have a means to disable showing the numbers, and just have the titles in the TOC. Can you point me please where in the code I could achieve that?

It would also be great to have the TOC toggable via Headerbar, I guess I could write a Plugin just for that, maybe you could also point me to the right direction.

Thanks for all your Work!

The plugin does not work with docker

I build docker image with multiple plugins, basing on etherpad dockerfile:
https://github.com/ether/etherpad-lite/blob/develop/Dockerfile
, but this one does not work for docker.
There are no errors on building - looks like module is installed, same as all others, but after starting docker instance it does not load, neither exist in node_modules
If i enter running docker etherpad instance as root and run command npm i ep_table_of_contents it will be installed and if i commit the image on docker level (after installation) and restart to commited container, module is loaded and works. It looks like it needs to be installed on running instance.
As there are no errors while building from Dockerfile, i dont know why it can not install that way.

ReferenceError: Can't find variable: exports

After updating to 0.1.14 I am receiving the following error whenever I enter a pad (though it's still loading)

An error occurred while loading the pad
ReferenceError: Can't find variable: exports in
https://pad.url.net/static/plugins/ep_table_of_contents/static/js/toc.js (line 162)

table of content on by default

Sorry if this isn't an issue. Is is possible to force all pads to open with the table of content active? (fantastic plugin)

I should at least read some code before I ask silly questions.

Answer.

"ep_toc": {
"disable_by_default": false,
},

Performance drop when >100 titles

For a radio show I host with others we use an etherpad with about 150kB of text and around 150 titles, because we keep possible subject, musics and other proposals around.

Having the TOC on makes it unbearably slow to type in the pad, almost like 1 character/s. Hiding the TOC makes it work again. And of course because the TOC is really useful it's on by default…

cf. https://framagit.org/framasoft/framapad/-/issues/42

Proposal to support small screen devices.

One thing I thought was if you click on a heading it pops up the TOC container (same as webrtc) at the bottom and closes the TOC container when a user clicks on an item to visit or shortly after?? Also if a user starts editing a heading it should immediately close the TOC container.

How to enable the toc permanently

Hello,
is there a setting to enable the toc permanently (so you don't have to choose this in the settings first)?

Thanks for your help!

Changes only seen on refresh

Installed version 0.1.6 from plugin manager (etherpad-lite-win-1.5.7-83597562c1) and it does not pick up changes as expected.

Specifically: after I apply or delete a heading style, the change is not reflected in the TOC until the page is refreshed. I do observe the existing TOC entries swapping bold<->unbold as I scroll up/down, but new entries are not added, nor are extant entries removed.

[Typo fixed]

Allow URL param to override disable_by_default

For instances where disable_by_default is set to false, it still would be nice if the URL param toc=false would take precedence. From my tests, this is not the case right now, so it is not possible to selectively disable the TOC while having it enabled by default in the settings.json.

Add a License

If contributions and/or forks are appreciated, it would be nice to have a formal license like MIT or GPL attached to the repo.

Prevents colibris full-width-editor variant

When i'm installing ep_table_of_contents for etherpad 1.8.17 the skin variant full-width-editor does not work, we still get the narrow view. This does not happen on 1.8.14.

Error with etherpad 1.8.7 "Bug in Hook Function"

Using Etherpad 1.8.7, I get this error in firefox console:
UNSETTLED FUNCTION BUG IN HOOK FUNCTION (plugin: ep_table_of_contents, function name: ep_table_of_contents/static/js/aceEditEvent:aceEditEvent, hook: aceEditEvent): The hook function neither called the callback nor returned a non-undefined value. This is prohibited because it will result in freezes when a future version of Etherpad updates the hook to support asynchronous behavior pointing to this file ace2_common line 65.
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.