1 |
efrain |
1 |
Description of the import of libraries associated with the Atto editor.
|
|
|
2 |
|
|
|
3 |
* Download the latest stable release from https://github.com/timdown/rangy/releases ("rangy-X.Z.Y"
|
|
|
4 |
rather than the "Source code" version)
|
|
|
5 |
* Delete all files in yui/src/rangy/js
|
|
|
6 |
* Copy the content of the 'currentrelease/uncompressed' folder into yui/src/rangy/js
|
|
|
7 |
* Patch out the AMD / module support from rangy (because we are loading it with YUI)
|
|
|
8 |
To do this - change the code start of each js file except rangy-core.js to look like (just delete the other lines):
|
|
|
9 |
|
|
|
10 |
(function(factory, root) {
|
|
|
11 |
// No AMD or CommonJS support so we use the rangy property of root (probably the global variable)
|
|
|
12 |
factory(root.rangy);
|
|
|
13 |
})(function(rangy) {
|
|
|
14 |
|
|
|
15 |
* rangy-core.js should look like this:
|
|
|
16 |
|
|
|
17 |
(function(factory, root) {
|
|
|
18 |
// No AMD or CommonJS support so we place Rangy in (probably) the global variable
|
|
|
19 |
root.rangy = factory();
|
|
|
20 |
})(function() {
|
|
|
21 |
|
|
|
22 |
* Run shifter against yui/src/rangy
|