tiptap-ruby 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/tip_tap/document.rb +6 -0
- data/lib/tip_tap/nodes/table.rb +18 -0
- data/lib/tip_tap/nodes/table_cell.rb +18 -0
- data/lib/tip_tap/nodes/table_header.rb +18 -0
- data/lib/tip_tap/nodes/table_row.rb +24 -0
- data/lib/tip_tap/version.rb +1 -1
- data/lib/tip_tap.rb +4 -0
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee6a6b20a8496bb8fe99b58d394b71f35a539e35a798ffbfba3c83febc30884b
|
4
|
+
data.tar.gz: 4d30fb76f8dfa76478816db99efc6d058c0a4ecedca5a23d180ccb01989d392a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6ad08309ba3ebf0c7260c5fed3a687aa20cab20bd2e4d11e74966936992f8dce70e4f6a82ec58d88ab8968a7b9774014e43f8ad8918c91e9973cb13114101d2
|
7
|
+
data.tar.gz: 3e87106f44a98e03cc4a58db85e62fb1b1be9a99293fadc8bd617a9593f3e47e6f96404164bd98aa28b8787791e91d728e203d0b17703a9dc65450cd02f1dd1e
|
data/CHANGELOG.md
CHANGED
data/lib/tip_tap/document.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tip_tap/node"
|
4
|
+
|
5
|
+
module TipTap
|
6
|
+
module Nodes
|
7
|
+
class Table < Node
|
8
|
+
self.type_name = "table"
|
9
|
+
self.html_tag = :table
|
10
|
+
|
11
|
+
def table_row(&block)
|
12
|
+
raise ArgumentError, "Block required" if block.nil?
|
13
|
+
|
14
|
+
add_content(TableRow.new(&block))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tip_tap/node"
|
4
|
+
|
5
|
+
module TipTap
|
6
|
+
module Nodes
|
7
|
+
class TableCell < Node
|
8
|
+
self.type_name = "tableCell"
|
9
|
+
self.html_tag = :td
|
10
|
+
|
11
|
+
def paragraph(&block)
|
12
|
+
raise ArgumentError, "Block required" if block.nil?
|
13
|
+
|
14
|
+
add_content(Paragraph.new(&block))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tip_tap/node"
|
4
|
+
|
5
|
+
module TipTap
|
6
|
+
module Nodes
|
7
|
+
class TableHeader < Node
|
8
|
+
self.type_name = "tableHeader"
|
9
|
+
self.html_tag = :th
|
10
|
+
|
11
|
+
def paragraph(&block)
|
12
|
+
raise ArgumentError, "Block required" if block.nil?
|
13
|
+
|
14
|
+
add_content(Paragraph.new(&block))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tip_tap/node"
|
4
|
+
|
5
|
+
module TipTap
|
6
|
+
module Nodes
|
7
|
+
class TableRow < Node
|
8
|
+
self.type_name = "tableRow"
|
9
|
+
self.html_tag = :tr
|
10
|
+
|
11
|
+
def table_cell(&block)
|
12
|
+
raise ArgumentError, "Block required" if block.nil?
|
13
|
+
|
14
|
+
add_content(TableCell.new(&block))
|
15
|
+
end
|
16
|
+
|
17
|
+
def table_header(&block)
|
18
|
+
raise ArgumentError, "Block required" if block.nil?
|
19
|
+
|
20
|
+
add_content(TableHeader.new(&block))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/tip_tap/version.rb
CHANGED
data/lib/tip_tap.rb
CHANGED
@@ -16,6 +16,10 @@ require "tip_tap/nodes/text"
|
|
16
16
|
require "tip_tap/nodes/image"
|
17
17
|
require "tip_tap/nodes/blockquote"
|
18
18
|
require "tip_tap/nodes/codeblock"
|
19
|
+
require "tip_tap/nodes/table"
|
20
|
+
require "tip_tap/nodes/table_row"
|
21
|
+
require "tip_tap/nodes/table_cell"
|
22
|
+
require "tip_tap/nodes/table_header"
|
19
23
|
|
20
24
|
module TipTap
|
21
25
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiptap-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Wilken
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -65,6 +65,10 @@ files:
|
|
65
65
|
- lib/tip_tap/nodes/list_item.rb
|
66
66
|
- lib/tip_tap/nodes/ordered_list.rb
|
67
67
|
- lib/tip_tap/nodes/paragraph.rb
|
68
|
+
- lib/tip_tap/nodes/table.rb
|
69
|
+
- lib/tip_tap/nodes/table_cell.rb
|
70
|
+
- lib/tip_tap/nodes/table_header.rb
|
71
|
+
- lib/tip_tap/nodes/table_row.rb
|
68
72
|
- lib/tip_tap/nodes/task_item.rb
|
69
73
|
- lib/tip_tap/nodes/task_list.rb
|
70
74
|
- lib/tip_tap/nodes/text.rb
|
@@ -80,7 +84,7 @@ metadata:
|
|
80
84
|
homepage_uri: https://github.com/CompanyCam/tiptap-ruby
|
81
85
|
source_code_uri: https://github.com/CompanyCam/tiptap-ruby
|
82
86
|
changelog_uri: https://github.com/CompanyCam/tiptap-ruby/blob/master/CHANGELOG.md
|
83
|
-
post_install_message:
|
87
|
+
post_install_message:
|
84
88
|
rdoc_options: []
|
85
89
|
require_paths:
|
86
90
|
- lib
|
@@ -96,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
100
|
version: '0'
|
97
101
|
requirements: []
|
98
102
|
rubygems_version: 3.4.6
|
99
|
-
signing_key:
|
103
|
+
signing_key:
|
100
104
|
specification_version: 4
|
101
105
|
summary: Parse, generate and render TipTap documents in Ruby.
|
102
106
|
test_files: []
|