yellow-text-rails 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -0
- data/lib/yellow-text-rails.rb +2 -5
- data/lib/yellow-text-rails/version.rb +1 -1
- data/vendor/assets/javascripts/yellow-text.js +14 -12
- metadata +4 -4
data/README.md
CHANGED
@@ -39,6 +39,7 @@ As long as you retain this notice you can do whatever you want with this stuff.
|
|
39
39
|
## Changelog
|
40
40
|
- v0.0.1: Very raw first version of the plugin
|
41
41
|
- v0.0.2: Fixed a typo in the description
|
42
|
+
- v0.0.3 t/m v0.0.5: Updates of the jQuery plugin
|
42
43
|
|
43
44
|
## Contributing
|
44
45
|
|
data/lib/yellow-text-rails.rb
CHANGED
@@ -2,10 +2,7 @@ require "yellow-text-rails/version"
|
|
2
2
|
|
3
3
|
module YellowText
|
4
4
|
module Rails
|
5
|
-
|
6
|
-
|
7
|
-
# this class enables the asset pipeline
|
8
|
-
end
|
9
|
-
end
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
end
|
10
7
|
end
|
11
8
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* This plugin is created to make text editing
|
5
5
|
* more fun and to make it easy for the editor.
|
6
6
|
*
|
7
|
-
* Version: 0.3.
|
7
|
+
* Version: 0.3.2
|
8
8
|
* Author: Stefan Vermaas
|
9
9
|
* URL: www.stefanvermaas.nl
|
10
10
|
*
|
@@ -409,15 +409,17 @@
|
|
409
409
|
|
410
410
|
// Unwrap all br tags and remove the ugly div tags
|
411
411
|
body.find("br").unwrap();
|
412
|
-
|
413
|
-
|
414
|
-
var firstLine = body.contents()[0];
|
412
|
+
|
413
|
+
// Get fancy stuff done with the first line
|
414
|
+
var firstLine = "<p>" + $( body.contents()[0] ).html() + "</p>";
|
415
415
|
|
416
|
-
//
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
416
|
+
// Remove the first line
|
417
|
+
$( body.contents()[0] ).remove();
|
418
|
+
|
419
|
+
// Add the line on the first line
|
420
|
+
body.prepend( firstLine );
|
421
|
+
|
422
|
+
console.log( body.contents()[0] );
|
421
423
|
},
|
422
424
|
|
423
425
|
/**
|
@@ -433,9 +435,9 @@
|
|
433
435
|
putContentBack: function() {
|
434
436
|
// Grap the content of the iframe
|
435
437
|
var postData = $(methods.editor).contents().find("body").html();
|
436
|
-
|
437
|
-
//
|
438
|
-
$( methods.el ).
|
438
|
+
|
439
|
+
// Make sure the textarea is empty
|
440
|
+
$( methods.el ).val( postData );
|
439
441
|
}
|
440
442
|
};
|
441
443
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yellow-text-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stefan Vermaas
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-02-
|
18
|
+
date: 2013-02-09 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description:
|