htmltoword 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/htmltoword/version.rb +1 -1
- data/xslt/html_to_wordml.xslt +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb48da4647fc58292a4ce99ab8a6f32b46e0abb3
|
4
|
+
data.tar.gz: be340aa1bfc1c92b35ee18e5fcd81c14f53d2ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 567a923c0ed855e3096de5220b369b5a71189b8542a183b57ef32b74f2297b1e49bffd2c58721cb28ea7e434ae7a6abb70c727724b1390637e880595629b2a01
|
7
|
+
data.tar.gz: 9747046352c1858bd604076395a7fd2b02ae80d59a886c0244c62155e1c072454e06d81da04477bf5002d5c9ff32b9379618cd64ef7b11ed789ecb159a34a2b7
|
data/README.md
CHANGED
@@ -21,7 +21,8 @@ Or install it yourself as:
|
|
21
21
|
```ruby
|
22
22
|
require 'htmltoword'
|
23
23
|
|
24
|
-
|
24
|
+
my_html = '<html><head></head><body><p>Hello</p></body></html>'
|
25
|
+
file = Htmltoword::Document.create my_html, file_name
|
25
26
|
```
|
26
27
|
|
27
28
|
### With Rails
|
@@ -41,6 +42,15 @@ def show
|
|
41
42
|
end
|
42
43
|
```
|
43
44
|
|
45
|
+
```javascript
|
46
|
+
// OPTIONAL: Use a jquery click handler to store the markup in a hidden form field before the form is submitted.
|
47
|
+
// Using this strategy makes it easy to allow users to dynamically edit the document that will be turned
|
48
|
+
// into a docx file, for example by toggling sections of a document.
|
49
|
+
$('#download-as-docx').on('click', function () {
|
50
|
+
$('input[name="docx_html_source"]').val('<!DOCTYPE html>\n' + $('.delivery').html());
|
51
|
+
});
|
52
|
+
```
|
53
|
+
|
44
54
|
## Features
|
45
55
|
|
46
56
|
All standard html elements are supported and will create the closest equivalent in wordml. For example spans will create inline elements and divs will create block like elements.
|
data/lib/htmltoword/version.rb
CHANGED
data/xslt/html_to_wordml.xslt
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmltoword
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Frandsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.0.
|
133
|
+
rubygems_version: 2.0.6
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: This simple gem allows you to create MS Word docx documents from simple html
|