Skip to content

Commit ee5db1a

Browse files
feat: Add table support for TipTap editor (#42)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 5281364 commit ee5db1a

File tree

39 files changed

+1823
-668
lines changed

39 files changed

+1823
-668
lines changed

djangocms_text/editors.py

+24
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@ def default(self, obj):
209209
"title": _("Table"),
210210
"icon": '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-table" viewBox="0 0 16 16"><path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm15 2h-4v3h4zm0 4h-4v3h4zm0 4h-4v3h3a1 1 0 0 0 1-1zm-5 3v-3H6v3zm-5 0v-3H1v2a1 1 0 0 0 1 1zm-4-4h4V8H1zm0-4h4V4H1zm5-3v3h4V4zm4 4H6v3h4z"/></svg>',
211211
},
212+
"addRowBefore": {
213+
"title": _("Add row before"),
214+
},
215+
"addRowAfter": {
216+
"title": _("Add row after"),
217+
},
218+
"addColumnBefore": {
219+
"title": _("Add column before"),
220+
},
221+
"addColumnAfter": {
222+
"title": _("Add column after"),
223+
},
224+
"deleteRow": {
225+
"title": _("Delete row"),
226+
},
227+
"deleteColumn": {
228+
"title": _("Delete column"),
229+
},
230+
"deleteTable": {
231+
"title": _("Delete table"),
232+
},
233+
"mergeOrSplit": {
234+
"title": _("Merge or split cells"),
235+
},
212236
"Code": {
213237
"title": _("Code"),
214238
"icon": '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-code" viewBox="0 0 16 16">\n'

djangocms_text/locale/ar/LC_MESSAGES/django.po

+51-19
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: PACKAGE VERSION\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-12-22 01:08+0100\n"
14+
"POT-Creation-Date: 2024-12-22 23:13+0100\n"
1515
"PO-Revision-Date: 2019-01-23 16:28+0000\n"
1616
"Last-Translator: Angelo Dini <angelo.dini@divio.ch>, 2019\n"
1717
"Language-Team: Arabic (https://www.transifex.com/divio/teams/58664/ar/)\n"
@@ -151,78 +151,110 @@ msgid "Table"
151151
msgstr ""
152152

153153
#: editors.py:213
154-
msgid "Code"
154+
msgid "Add row before"
155+
msgstr ""
156+
157+
#: editors.py:216
158+
msgid "Add row after"
155159
msgstr ""
156160

157161
#: editors.py:219
158-
msgid "Small"
162+
msgid "Add column before"
159163
msgstr ""
160164

161165
#: editors.py:222
162-
msgid "Keyboard input"
166+
msgid "Add column after"
167+
msgstr ""
168+
169+
#: editors.py:225
170+
msgid "Delete row"
163171
msgstr ""
164172

165173
#: editors.py:228
174+
msgid "Delete column"
175+
msgstr ""
176+
177+
#: editors.py:231
178+
msgid "Delete table"
179+
msgstr ""
180+
181+
#: editors.py:234
182+
msgid "Merge or split cells"
183+
msgstr ""
184+
185+
#: editors.py:237
186+
msgid "Code"
187+
msgstr ""
188+
189+
#: editors.py:243
190+
msgid "Small"
191+
msgstr ""
192+
193+
#: editors.py:246
194+
msgid "Keyboard input"
195+
msgstr ""
196+
197+
#: editors.py:252
166198
msgid "Code block"
167199
msgstr ""
168200

169-
#: editors.py:235
201+
#: editors.py:259
170202
msgid "Heading 1"
171203
msgstr ""
172204

173-
#: editors.py:241
205+
#: editors.py:265
174206
msgid "Heading 2"
175207
msgstr ""
176208

177-
#: editors.py:247
209+
#: editors.py:271
178210
msgid "Heading 3"
179211
msgstr ""
180212

181-
#: editors.py:253
213+
#: editors.py:277
182214
msgid "Heading 4"
183215
msgstr ""
184216

185-
#: editors.py:259
217+
#: editors.py:283
186218
msgid "Heading 5"
187219
msgstr ""
188220

189-
#: editors.py:265
221+
#: editors.py:289
190222
msgid "Heading 6"
191223
msgstr ""
192224

193-
#: editors.py:271
225+
#: editors.py:295
194226
msgid "Paragraph"
195227
msgstr ""
196228

197-
#: editors.py:277
229+
#: editors.py:301
198230
msgid "Anchor"
199231
msgstr ""
200232

201-
#: editors.py:280
233+
#: editors.py:304
202234
msgid "Block format"
203235
msgstr ""
204236

205-
#: editors.py:284
237+
#: editors.py:308
206238
msgid "Styles"
207239
msgstr ""
208240

209-
#: editors.py:288
241+
#: editors.py:312
210242
msgid "Font"
211243
msgstr ""
212244

213-
#: editors.py:291
245+
#: editors.py:315
214246
msgid "Font size"
215247
msgstr ""
216248

217-
#: editors.py:294 editors.py:295 widgets.py:240 widgets.py:243
249+
#: editors.py:318 editors.py:319 widgets.py:240 widgets.py:243
218250
msgid "CMS Plugins"
219251
msgstr ""
220252

221-
#: editors.py:296 widgets.py:242
253+
#: editors.py:320 widgets.py:242
222254
msgid "Edit CMS Plugin"
223255
msgstr ""
224256

225-
#: editors.py:297 widgets.py:241
257+
#: editors.py:321 widgets.py:241
226258
msgid "Add CMS Plugin"
227259
msgstr ""
228260

djangocms_text/locale/bn/LC_MESSAGES/django.po

+51-19
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: PACKAGE VERSION\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-12-22 01:08+0100\n"
14+
"POT-Creation-Date: 2024-12-22 23:13+0100\n"
1515
"PO-Revision-Date: 2019-01-23 16:28+0000\n"
1616
"Last-Translator: Angelo Dini <angelo.dini@divio.ch>, 2019\n"
1717
"Language-Team: Bengali (https://www.transifex.com/divio/teams/58664/bn/)\n"
@@ -150,78 +150,110 @@ msgid "Table"
150150
msgstr ""
151151

152152
#: editors.py:213
153-
msgid "Code"
153+
msgid "Add row before"
154+
msgstr ""
155+
156+
#: editors.py:216
157+
msgid "Add row after"
154158
msgstr ""
155159

156160
#: editors.py:219
157-
msgid "Small"
161+
msgid "Add column before"
158162
msgstr ""
159163

160164
#: editors.py:222
161-
msgid "Keyboard input"
165+
msgid "Add column after"
166+
msgstr ""
167+
168+
#: editors.py:225
169+
msgid "Delete row"
162170
msgstr ""
163171

164172
#: editors.py:228
173+
msgid "Delete column"
174+
msgstr ""
175+
176+
#: editors.py:231
177+
msgid "Delete table"
178+
msgstr ""
179+
180+
#: editors.py:234
181+
msgid "Merge or split cells"
182+
msgstr ""
183+
184+
#: editors.py:237
185+
msgid "Code"
186+
msgstr ""
187+
188+
#: editors.py:243
189+
msgid "Small"
190+
msgstr ""
191+
192+
#: editors.py:246
193+
msgid "Keyboard input"
194+
msgstr ""
195+
196+
#: editors.py:252
165197
msgid "Code block"
166198
msgstr ""
167199

168-
#: editors.py:235
200+
#: editors.py:259
169201
msgid "Heading 1"
170202
msgstr ""
171203

172-
#: editors.py:241
204+
#: editors.py:265
173205
msgid "Heading 2"
174206
msgstr ""
175207

176-
#: editors.py:247
208+
#: editors.py:271
177209
msgid "Heading 3"
178210
msgstr ""
179211

180-
#: editors.py:253
212+
#: editors.py:277
181213
msgid "Heading 4"
182214
msgstr ""
183215

184-
#: editors.py:259
216+
#: editors.py:283
185217
msgid "Heading 5"
186218
msgstr ""
187219

188-
#: editors.py:265
220+
#: editors.py:289
189221
msgid "Heading 6"
190222
msgstr ""
191223

192-
#: editors.py:271
224+
#: editors.py:295
193225
msgid "Paragraph"
194226
msgstr ""
195227

196-
#: editors.py:277
228+
#: editors.py:301
197229
msgid "Anchor"
198230
msgstr ""
199231

200-
#: editors.py:280
232+
#: editors.py:304
201233
msgid "Block format"
202234
msgstr ""
203235

204-
#: editors.py:284
236+
#: editors.py:308
205237
msgid "Styles"
206238
msgstr ""
207239

208-
#: editors.py:288
240+
#: editors.py:312
209241
msgid "Font"
210242
msgstr ""
211243

212-
#: editors.py:291
244+
#: editors.py:315
213245
msgid "Font size"
214246
msgstr ""
215247

216-
#: editors.py:294 editors.py:295 widgets.py:240 widgets.py:243
248+
#: editors.py:318 editors.py:319 widgets.py:240 widgets.py:243
217249
msgid "CMS Plugins"
218250
msgstr ""
219251

220-
#: editors.py:296 widgets.py:242
252+
#: editors.py:320 widgets.py:242
221253
msgid "Edit CMS Plugin"
222254
msgstr ""
223255

224-
#: editors.py:297 widgets.py:241
256+
#: editors.py:321 widgets.py:241
225257
msgid "Add CMS Plugin"
226258
msgstr ""
227259

0 commit comments

Comments
 (0)