bbc/scribe-plugin-bidi

Name: scribe-plugin-bidi

Owner: BBC

Description: Add bidirectional markup to https://github.com/guardian/scribe

Created: 2016-09-09 09:20:30.0

Updated: 2016-09-15 08:03:57.0

Pushed: 2016-09-21 15:38:15.0

Homepage:

Size: 170

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

scribe-plugin-bidi

A scribe plugin for adding bidirectional markup. Allows users to tightly wrap opposite-direction phrases to correct the Unicode Bidirectional Algorithm when it goes wrong.

Adds scribe commands ltr-bidi which surround a text selection with <span dir="ltr"></span>.

See also:

Installation
r install scribe-plugin-bidi

scribe-plugin-bidi is an AMD module:

ire(['scribe', 'scribe-plugin-bidi', 'scribe-plugin-bidi-sanitize'], function (Scribe, plugin, sanitize) {
r scribeElement = document.querySelector('.scribe');
r scribe = new Scribe(scribeElement);
ribe.use(plugin());
ribe.use(sanitize());

Running Tests

To setup the environment, scribe-test-harness requires:

  1. Usage of node v0.12.7 (newer versions will fail because execsync was removed from Node)

  2. Adding chromedriver executable to your $PATH.

    wnload chromedriver executable from website
    dir ~/Documents/Executables
     chromedriver ~/Documents/Executables
    =$PATH:~/Documents/Executables
    
  3. Downloading dependencies (including selenium webdriver) via npm run setup

To run the tests:

run test
License

MIT License.
Copyright © 2016 British Broadcasting Corporation


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.