0.0.5 • Published 9 years ago

scribe-plugin-link-tooltip v0.0.5

Weekly downloads
26
License
-
Repository
-
Last release
9 years ago

scribe-plugin-link-tooltip

A Scribe plugin for doing a Medium/Google Docs style tooltip UI instead of a prompt for inserting links.

Example

var scribe = new Scribe(scribeElement);
scribe.use(scribePluginLinkTooltip());

Positioning

The tooltip will append itself to the body and use position: absolute, top, and left to position it close to the text you're highlighting. You can use CSS and target .scribe-plugin-link-tooltip to adjust styling of the tooltip.

e.g.

<body>
  <div id='scribe'>
    <div content-editable='true' >
    </div>
  </div>
  <form class="scribe-plugin-link-tooltip">
    <input placeholder="Paste or type a link">
    <button type="submit">Apply</button>
  </form>
</body>
.scribe-plugin-link-tooltip {
  padding: 10px;
  background: #eee;
  z-index: 2;
  /*
    Adds the following styles via JS
    position: absolute;
    top: xx;
    left: xx;
  */
}

TODO

  • Remove jQuery dependency
  • Tests

License

MIT

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

10 years ago

0.0.1

10 years ago