lexxy 0.9.0.beta → 0.9.1.beta
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/app/assets/javascript/lexxy.js +34 -29
- data/app/assets/javascript/lexxy.js.br +0 -0
- data/app/assets/javascript/lexxy.js.gz +0 -0
- data/app/assets/javascript/lexxy.js.map +1 -1
- data/app/assets/javascript/lexxy.min.js +1 -1
- data/app/assets/javascript/lexxy.min.js.br +0 -0
- data/app/assets/javascript/lexxy.min.js.gz +0 -0
- data/app/assets/stylesheets/lexxy-editor.css +23 -11
- data/lib/lexxy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 857d629c986ab28555fc79821525be30888fdfa3083b900dfbc8a1b74f42b1db
|
|
4
|
+
data.tar.gz: 34c6e06b8a36438eaed68aaf9421a6388b85d1004bf1a8682e3d83bf0d29ed55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c1ef0dfa8299890c9d165b9e76a254f465f107404fb2c281ad1f830d5f2c9f97641eae0070d88bf24a201f5358448793d00d2cea3f2131edd08bdc56358339f
|
|
7
|
+
data.tar.gz: c06d85591d104ca856ddcea2cfa5fe00d678eab8eed4455b88bfef8338535bd1d1de4299debb0c873d4790104433ad06f9be18ad964df365817fde8e7d1c6b3d
|
|
@@ -5266,13 +5266,13 @@ class LexicalToolbarElement extends HTMLElement {
|
|
|
5266
5266
|
|
|
5267
5267
|
static get defaultTemplate() {
|
|
5268
5268
|
return `
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5269
|
+
<button class="lexxy-editor__toolbar-button" type="button" name="image" data-command="uploadImage" data-prevent-overflow="true" title="Add images and video">
|
|
5270
|
+
${ToolbarIcons.image}
|
|
5271
|
+
</button>
|
|
5272
5272
|
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5273
|
+
<button class="lexxy-editor__toolbar-button lexxy-editor__toolbar-group-end" type="button" name="file" data-command="uploadFile" title="Upload files">
|
|
5274
|
+
${ToolbarIcons.attachment}
|
|
5275
|
+
</button>
|
|
5276
5276
|
|
|
5277
5277
|
<button class="lexxy-editor__toolbar-button" type="button" name="bold" data-command="bold" title="Bold">
|
|
5278
5278
|
${ToolbarIcons.bold}
|
|
@@ -5296,10 +5296,10 @@ class LexicalToolbarElement extends HTMLElement {
|
|
|
5296
5296
|
<button type="button" name="heading-medium" data-command="setFormatHeadingMedium" title="Medium heading">
|
|
5297
5297
|
${ToolbarIcons.h3} <span>Medium Heading</span>
|
|
5298
5298
|
</button>
|
|
5299
|
-
<button type="button" name="heading-small" data-command="setFormatHeadingSmall" title="Small heading">
|
|
5299
|
+
<button class="lexxy-editor__toolbar-group-end" type="button" name="heading-small" data-command="setFormatHeadingSmall" title="Small heading">
|
|
5300
5300
|
${ToolbarIcons.h4} <span>Small Heading</span>
|
|
5301
5301
|
</button>
|
|
5302
|
-
<div class="separator" role="separator"></div>
|
|
5302
|
+
<div class="lexxy-editor__toolbar-separator" role="separator"></div>
|
|
5303
5303
|
<button type="button" name="strikethrough" data-command="strikethrough" title="Strikethrough">
|
|
5304
5304
|
${ToolbarIcons.strikethrough} <span>Strikethrough</span>
|
|
5305
5305
|
</button>
|
|
@@ -5309,21 +5309,6 @@ class LexicalToolbarElement extends HTMLElement {
|
|
|
5309
5309
|
</div>
|
|
5310
5310
|
</details>
|
|
5311
5311
|
|
|
5312
|
-
|
|
5313
|
-
<details class="lexxy-editor__toolbar-dropdown lexxy-editor__toolbar-dropdown--chevron" name="lexxy-dropdown">
|
|
5314
|
-
<summary class="lexxy-editor__toolbar-button" name="lists" title="Lists">
|
|
5315
|
-
${ToolbarIcons.ul}
|
|
5316
|
-
</summary>
|
|
5317
|
-
<div class="lexxy-editor__toolbar-dropdown-list">
|
|
5318
|
-
<button type="button" name="unordered-list" data-command="insertUnorderedList" title="Bullet list">
|
|
5319
|
-
${ToolbarIcons.ul} <span>Bullets</span>
|
|
5320
|
-
</button>
|
|
5321
|
-
<button type="button" name="ordered-list" data-command="insertOrderedList" title="Numbered list">
|
|
5322
|
-
${ToolbarIcons.ol} <span>Numbers</span>
|
|
5323
|
-
</button>
|
|
5324
|
-
</div>
|
|
5325
|
-
</details>
|
|
5326
|
-
|
|
5327
5312
|
<details class="lexxy-editor__toolbar-dropdown lexxy-editor__toolbar-dropdown--chevron" name="lexxy-dropdown">
|
|
5328
5313
|
<summary class="lexxy-editor__toolbar-button" name="highlight" title="Color highlight">
|
|
5329
5314
|
${ToolbarIcons.highlight}
|
|
@@ -5335,7 +5320,7 @@ class LexicalToolbarElement extends HTMLElement {
|
|
|
5335
5320
|
</details>
|
|
5336
5321
|
|
|
5337
5322
|
<details class="lexxy-editor__toolbar-dropdown" name="lexxy-dropdown">
|
|
5338
|
-
<summary class="lexxy-editor__toolbar-button" name="link" title="Link" data-hotkey="cmd+k ctrl+k">
|
|
5323
|
+
<summary class="lexxy-editor__toolbar-button lexxy-editor__toolbar-group-end" name="link" title="Link" data-hotkey="cmd+k ctrl+k">
|
|
5339
5324
|
${ToolbarIcons.link}
|
|
5340
5325
|
</summary>
|
|
5341
5326
|
<lexxy-link-dropdown class="lexxy-editor__toolbar-dropdown-content">
|
|
@@ -5353,10 +5338,17 @@ class LexicalToolbarElement extends HTMLElement {
|
|
|
5353
5338
|
${ToolbarIcons.quote}
|
|
5354
5339
|
</button>
|
|
5355
5340
|
|
|
5356
|
-
<button class="lexxy-editor__toolbar-button
|
|
5341
|
+
<button class="lexxy-editor__toolbar-button" type="button" name="code" data-command="insertCodeBlock" title="Code">
|
|
5357
5342
|
${ToolbarIcons.code}
|
|
5358
5343
|
</button>
|
|
5359
5344
|
|
|
5345
|
+
<button class="lexxy-editor__toolbar-button" type="button" name="unordered-list" data-command="insertUnorderedList" title="Bullet list">
|
|
5346
|
+
${ToolbarIcons.ul}
|
|
5347
|
+
</button>
|
|
5348
|
+
<button class="lexxy-editor__toolbar-button lexxy-editor__toolbar-group-end" type="button" name="ordered-list" data-command="insertOrderedList" title="Numbered list">
|
|
5349
|
+
${ToolbarIcons.ol}
|
|
5350
|
+
</button>
|
|
5351
|
+
|
|
5360
5352
|
<button class="lexxy-editor__toolbar-button" type="button" name="table" data-command="insertTable" title="Insert a table">
|
|
5361
5353
|
${ToolbarIcons.table}
|
|
5362
5354
|
</button>
|
|
@@ -8240,7 +8232,8 @@ const COMMANDS = [
|
|
|
8240
8232
|
"insertQuoteBlock",
|
|
8241
8233
|
"insertCodeBlock",
|
|
8242
8234
|
"insertHorizontalDivider",
|
|
8243
|
-
"
|
|
8235
|
+
"uploadImage",
|
|
8236
|
+
"uploadFile",
|
|
8244
8237
|
|
|
8245
8238
|
"insertTable",
|
|
8246
8239
|
|
|
@@ -8424,15 +8417,27 @@ class CommandDispatcher {
|
|
|
8424
8417
|
this.contents.applyParagraphFormat();
|
|
8425
8418
|
}
|
|
8426
8419
|
|
|
8427
|
-
|
|
8428
|
-
|
|
8420
|
+
dispatchUploadImage() {
|
|
8421
|
+
this.#dispatchUploadAttachment("image/*,video/*");
|
|
8422
|
+
}
|
|
8423
|
+
|
|
8424
|
+
dispatchUploadFile() {
|
|
8425
|
+
this.#dispatchUploadAttachment();
|
|
8426
|
+
}
|
|
8427
|
+
|
|
8428
|
+
#dispatchUploadAttachment(accept = null) {
|
|
8429
|
+
const attributes = {
|
|
8429
8430
|
type: "file",
|
|
8430
8431
|
multiple: true,
|
|
8431
8432
|
style: "display: none;",
|
|
8432
8433
|
onchange: ({ target: { files } }) => {
|
|
8433
8434
|
this.contents.uploadFiles(files, { selectLast: true });
|
|
8434
8435
|
}
|
|
8435
|
-
}
|
|
8436
|
+
};
|
|
8437
|
+
|
|
8438
|
+
if (accept) attributes.accept = accept;
|
|
8439
|
+
|
|
8440
|
+
const input = createElement("input", attributes);
|
|
8436
8441
|
|
|
8437
8442
|
// Append and remove to make testable
|
|
8438
8443
|
this.editorElement.appendChild(input);
|
|
Binary file
|
|
Binary file
|