htmltoword 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e5b78934a4543007f4eed7ba97fd3ad9199805b
4
- data.tar.gz: b79c47f992fc8b69d9a3e3b0e0ae10167db2ecfe
3
+ metadata.gz: cb48da4647fc58292a4ce99ab8a6f32b46e0abb3
4
+ data.tar.gz: be340aa1bfc1c92b35ee18e5fcd81c14f53d2ef5
5
5
  SHA512:
6
- metadata.gz: 383ac301e28c77bbdd067f7577da8ab60a24afe8c1561914892d98d8e1681d935725766fbacdd8f484f366f756fbf5f5c7a161d2bb321f9c49b1f6d479ba2093
7
- data.tar.gz: c95fc637997b383891a81e9c4474712547f62284bae28072098e4b4fbd03df23e9dd03d7a4bbb26a53a5f27050139fb03a257e25ed31e210f996608eff80e889
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
- file = Htmltoword::Document.create params[:assembly_content_html], file_name
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.
@@ -1,3 +1,3 @@
1
1
  module Htmltoword
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -174,6 +174,8 @@
174
174
  <xsl:apply-templates />
175
175
  </xsl:template>
176
176
 
177
+ <xsl:template match="details" />
178
+
177
179
  <xsl:template match="table">
178
180
  <w:tbl>
179
181
  <w:tblPr>
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.3
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: 2013-10-08 00:00:00.000000000 Z
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.2
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