Giter VIP home page Giter VIP logo

ckeditor-plugin-autoid-headings's People

Contributors

caffodian avatar deti avatar sbaughman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ckeditor-plugin-autoid-headings's Issues

Replace blur handlers

Just replaced blur handlers with a click handler that hides all popovers that you're not currently triggering.

Because of the weird scrolling behaviour when you click, IE11 can sometimes do strange things. need to look into the originating bug further

IE11 failure detection

After copying, in the success callback, check the content actually matches. Because IE11 is a troll and says its always successful. If not, fire the failure callback manually

Handle copy-paste cases

Ideally the attribute just gets copied properly most of the time. Things to look into, along with my initial gut feeling on what they should do:

  • what should happen if someone ends up creating a duplicate heading?
    I think it should just create a new idea
  • what if someone cuts and pastes a heading?
    I think it should keep the id
  • what if someone cuts or copies part of a heading?
    I think the new one should generate a new id.

Handle downgrade/upgrade from p tags

Use setCustomData to preserve a heading id when converting to a non-heading element, and restore that to the actual id if that element is ever changed back.

Viewing: anchor-creating JavaScript

Now that we have the ids inserted into the document, we should provide a helper JavaScript that can be added to viewing pages, to allow headings to be easily linked to.

This should expose a function that takes in a selector.

Under this selector, it should:

  • find all the headings
  • look for ids
  • Add the structure <a class="headerlink" href="#theidgoeshere" title="Permalink to this headline">ΒΆ</a> to the end of the heading, before the closing heading tag.

Clicking this link should then set the address bar correctly, in order to provide a working link to the document section.

Copy more formats

Not sure if this would be possible without an upstream request, but if we consider allowing copying of other content types, we can also copy a pre-formatted friendly looking anchor link rather than just the raw html.

<h1 id="foo">Lessons about foo</h1> < copier here > 

=>

<a href="blahblahblah#foo">Lessons about foo</a>

Update the "Link Copied" text

A customer was confused because they didn't realize the link was to the specific section, so they didn't understand the purpose of the links inserted into the document.

Better internal document linking

Within a document, make the link dialog to link to other ids better. It should provide a snippet of what the heading actually is, rather than just the id.

more details to follow as I think this through..

Look into Sauce for CI for IE

some issues:

  • changing the tests to run with karma/travis makes them not actually work with IE
  • can't run locally since dev machine doesn't have IE (a VM does)
  • what about the clipboard prompt?

UX polish

The icons don't appear to match what is defined in the master requirements. They're too big, don't have padding, and are the wrong color.
The "Link Copied!" success state doesn't match the design
I'd like to see how this looks with a long heading that wraps across two lines

Anchor click jump

we still have the default anchor behaviour in place, which causes click jumping on some browsers. See how annoying this actually is in real docs first. It might take some messing around in order to be able to actually return false on the click handler and still do all the other nice things, like setting the location hash. (since it's set up by clipboardjs, using their own event helper lib)

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.