@micromag/ckeditor 0.3.508 → 0.3.509
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.
- package/dist/build.js +1 -1
- package/dist/build.js.LICENSE.txt +3 -1
- package/dist/build.js.map +1 -1
- package/dist/translations/en.js +1 -1
- package/es/index.js +85 -37
- package/lib/index.js +87 -38
- package/package.json +18 -18
package/dist/translations/en.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Accept",Aquamarine:"Aquamarine",Black:"Black","Block quote":"Block quote",Blue:"Blue","Blue marker":"Blue marker",Bold:"Bold","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Code:"Code",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Dim grey":"Dim grey",Disc:"Disc",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Full size image":"Full size image",Green:"Green","Green marker":"Green marker","Green pen":"Green pen",Grey:"Grey",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",HEX:"HEX",Highlight:"Highlight","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line",Insert:"Insert","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block",Italic:"Italic","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Media toolbar":"Media toolbar","Media URL":"Media URL","media widget":"media widget",Next:"Next","No results found":"No results found","No searchable items":"No searchable items","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab",Orange:"Orange",Original:"Original",Paragraph:"Paragraph","Paste the media URL in the input.":"Paste the media URL in the input.","Pink marker":"Pink marker","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red","Red pen":"Red pen",Redo:"Redo","Remove highlight":"Remove highlight","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0","Right aligned image":"Right aligned image",Save:"Save","Select all":"Select all","Show more items":"Show more items","Side image":"Side image",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Subscript:"Subscript",Superscript:"Superscript","Text alternative":"Text alternative","Text highlight toolbar":"Text highlight toolbar","The URL must not be empty.":"The URL must not be empty.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman",White:"White","Widget toolbar":"Widget toolbar","Wrap text":"Wrap text",Yellow:"Yellow","Yellow marker":"Yellow marker"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"(may require <kbd>Fn</kbd>)":"(may require <kbd>Fn</kbd>)","%0 of %1":"%0 of %1",Accept:"Accept",Accessibility:"Accessibility","Accessibility help":"Accessibility help",Aquamarine:"Aquamarine","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Below, you can find a list of keyboard shortcuts that can be used in the editor.",Black:"Black","Block quote":"Block quote",Blue:"Blue","Blue marker":"Blue marker",Bold:"Bold","Bold text":"Bold text","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close","Close contextual balloons, dropdowns, and dialogs":"Close contextual balloons, dropdowns, and dialogs",Code:"Code","Content editing keystrokes":"Content editing keystrokes","Copy selected content":"Copy selected content","Create link":"Create link",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease list item indent":"Decrease list item indent","Dim grey":"Dim grey",Disc:"Disc",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor menu bar":"Editor menu bar","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.","Full size image":"Full size image",Green:"Green","Green marker":"Green marker","Green pen":"Green pen",Grey:"Grey",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6","Help Contents. To close this dialog press ESC.":"Help Contents. To close this dialog press ESC.",HEX:"HEX",Highlight:"Highlight","Image from computer":"Image from computer","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase list item indent":"Increase list item indent",Insert:"Insert","Insert a hard break (a new paragraph)":"Insert a hard break (a new paragraph)","Insert a new paragraph directly after a widget":"Insert a new paragraph directly after a widget","Insert a new paragraph directly before a widget":"Insert a new paragraph directly before a widget","Insert a soft break (a <code><br></code> element)":"Insert a soft break (a <code><br></code> element)","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Invalid start index value.":"Invalid start index value.",Italic:"Italic","Italic text":"Italic text","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Media toolbar":"Media toolbar","Media URL":"Media URL","media widget":"media widget",MENU_BAR_MENU_EDIT:"Edit",MENU_BAR_MENU_FILE:"File",MENU_BAR_MENU_FONT:"Font",MENU_BAR_MENU_FORMAT:"Format",MENU_BAR_MENU_HELP:"Help",MENU_BAR_MENU_INSERT:"Insert",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_TOOLS:"Tools",MENU_BAR_MENU_VIEW:"View","Move focus between form fields (inputs, buttons, etc.)":"Move focus between form fields (inputs, buttons, etc.)","Move focus in and out of an active dialog window":"Move focus in and out of an active dialog window","Move focus to the menu bar, navigate between menu bars":"Move focus to the menu bar, navigate between menu bars","Move focus to the toolbar, navigate between toolbars":"Move focus to the toolbar, navigate between toolbars","Move out of a link":"Move out of a link","Move out of an inline code style":"Move out of an inline code style","Move the caret to allow typing directly after a widget":"Move the caret to allow typing directly after a widget","Move the caret to allow typing directly before a widget":"Move the caret to allow typing directly before a widget","Navigate through the toolbar or menu bar":"Navigate through the toolbar or menu bar",Next:"Next","No results found":"No results found","No searchable items":"No searchable items","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab","Open the accessibility help dialog":"Open the accessibility help dialog",Orange:"Orange",Original:"Original",Paragraph:"Paragraph","Paste content":"Paste content","Paste content as plain text":"Paste content as plain text","Paste the media URL in the input.":"Paste the media URL in the input.","Pink marker":"Pink marker","Press %0 for help.":"Press %0 for help.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red","Red pen":"Red pen",Redo:"Redo","Remove highlight":"Remove highlight","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0","Right aligned image":"Right aligned image",Save:"Save","Select all":"Select all","Show more items":"Show more items","Side image":"Side image",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Subscript:"Subscript",Superscript:"Superscript","Text alternative":"Text alternative","Text highlight toolbar":"Text highlight toolbar","The URL must not be empty.":"The URL must not be empty.","These keyboard shortcuts allow for quick access to content editing features.":"These keyboard shortcuts allow for quick access to content editing features.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline","Underline text":"Underline text",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.","User interface and content navigation keystrokes":"User interface and content navigation keystrokes",White:"White","Widget toolbar":"Widget toolbar","Wrap text":"Wrap text",Yellow:"Yellow","Yellow marker":"Yellow marker"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/es/index.js
CHANGED
|
@@ -1,43 +1,91 @@
|
|
|
1
|
+
import { BlockQuote } from '@ckeditor/ckeditor5-block-quote';
|
|
2
|
+
import { Heading, HeadingButtonsUI } from '@ckeditor/ckeditor5-heading';
|
|
3
|
+
import { ImageInline, ImageToolbar, ImageUpload } from '@ckeditor/ckeditor5-image';
|
|
4
|
+
import { List } from '@ckeditor/ckeditor5-list';
|
|
5
|
+
import { MediaEmbed } from '@ckeditor/ckeditor5-media-embed';
|
|
6
|
+
import { ParagraphButtonUI } from '@ckeditor/ckeditor5-paragraph';
|
|
7
|
+
import { SimpleUploadAdapter } from '@ckeditor/ckeditor5-upload';
|
|
8
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
9
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
10
|
+
import _callSuper from '@babel/runtime/helpers/callSuper';
|
|
11
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
12
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
1
13
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
14
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
15
|
|
|
4
|
-
var
|
|
5
|
-
editor.conversion.elementToElement({
|
|
6
|
-
model: 'paragraph',
|
|
7
|
-
view: 'span'
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var InlinePlugin$1 = InlinePlugin;
|
|
16
|
+
var fullPlugins = [Heading, ImageInline, ImageToolbar, ImageUpload, SimpleUploadAdapter, MediaEmbed, BlockQuote, HeadingButtonsUI, ParagraphButtonUI, List];
|
|
11
17
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var model = _ref3.model,
|
|
30
|
-
color = _ref3.color;
|
|
31
|
-
return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, model, {
|
|
32
|
-
name: 'mark',
|
|
33
|
-
styles: {
|
|
34
|
-
'background-color': color,
|
|
35
|
-
'box-shadow': "0.05em 0px 0px ".concat(color, ", -0.05em 0px 0px ").concat(color)
|
|
18
|
+
var InlinePlugin = /*#__PURE__*/function (_Plugin) {
|
|
19
|
+
function InlinePlugin() {
|
|
20
|
+
_classCallCheck(this, InlinePlugin);
|
|
21
|
+
return _callSuper(this, InlinePlugin, arguments);
|
|
22
|
+
}
|
|
23
|
+
_inherits(InlinePlugin, _Plugin);
|
|
24
|
+
return _createClass(InlinePlugin, [{
|
|
25
|
+
key: "init",
|
|
26
|
+
value: function init() {
|
|
27
|
+
var _this = this;
|
|
28
|
+
this.editor.editing.view.document.on('enter', function (evt, data) {
|
|
29
|
+
data.preventDefault();
|
|
30
|
+
evt.stop();
|
|
31
|
+
if (data.isSoft) {
|
|
32
|
+
_this.editor.execute('enter');
|
|
33
|
+
_this.editor.editing.view.scrollToTheSelection();
|
|
34
|
+
return;
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
_this.editor.execute('shiftEnter');
|
|
37
|
+
_this.editor.editing.view.scrollToTheSelection();
|
|
38
|
+
}, {
|
|
39
|
+
priority: 'high'
|
|
40
|
+
});
|
|
41
|
+
this.editor.conversion
|
|
42
|
+
// .for('downcast')
|
|
43
|
+
.elementToElement({
|
|
44
|
+
model: 'paragraph',
|
|
45
|
+
view: 'span',
|
|
46
|
+
converterPriority: 'high'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}]);
|
|
50
|
+
}(Plugin);
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
var MarkerPlugin = /*#__PURE__*/function (_Plugin) {
|
|
53
|
+
function MarkerPlugin() {
|
|
54
|
+
_classCallCheck(this, MarkerPlugin);
|
|
55
|
+
return _callSuper(this, MarkerPlugin, arguments);
|
|
56
|
+
}
|
|
57
|
+
_inherits(MarkerPlugin, _Plugin);
|
|
58
|
+
return _createClass(MarkerPlugin, [{
|
|
59
|
+
key: "init",
|
|
60
|
+
value: function init() {
|
|
61
|
+
var options = this.editor.config.get('highlight.options') || [];
|
|
62
|
+
var markers = options.filter(function (_ref) {
|
|
63
|
+
var _ref$color = _ref.color,
|
|
64
|
+
color = _ref$color === void 0 ? null : _ref$color;
|
|
65
|
+
return color !== null;
|
|
66
|
+
});
|
|
67
|
+
this.editor.conversion.attributeToElement({
|
|
68
|
+
model: {
|
|
69
|
+
key: 'highlight',
|
|
70
|
+
values: markers.map(function (_ref2) {
|
|
71
|
+
var model = _ref2.model;
|
|
72
|
+
return model;
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
view: markers.reduce(function (map, _ref3) {
|
|
76
|
+
var model = _ref3.model,
|
|
77
|
+
color = _ref3.color;
|
|
78
|
+
return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, model, {
|
|
79
|
+
name: 'mark',
|
|
80
|
+
styles: {
|
|
81
|
+
'background-color': color,
|
|
82
|
+
'box-shadow': "0.05em 0px 0px ".concat(color, ", -0.05em 0px 0px ").concat(color)
|
|
83
|
+
}
|
|
84
|
+
}));
|
|
85
|
+
}, {})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}]);
|
|
89
|
+
}(Plugin);
|
|
90
|
+
|
|
91
|
+
export { InlinePlugin, MarkerPlugin, fullPlugins };
|
package/lib/index.js
CHANGED
|
@@ -1,46 +1,95 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var ckeditor5BlockQuote = require('@ckeditor/ckeditor5-block-quote');
|
|
4
|
+
var ckeditor5Heading = require('@ckeditor/ckeditor5-heading');
|
|
5
|
+
var ckeditor5Image = require('@ckeditor/ckeditor5-image');
|
|
6
|
+
var ckeditor5List = require('@ckeditor/ckeditor5-list');
|
|
7
|
+
var ckeditor5MediaEmbed = require('@ckeditor/ckeditor5-media-embed');
|
|
8
|
+
var ckeditor5Paragraph = require('@ckeditor/ckeditor5-paragraph');
|
|
9
|
+
var ckeditor5Upload = require('@ckeditor/ckeditor5-upload');
|
|
10
|
+
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
11
|
+
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
12
|
+
var _callSuper = require('@babel/runtime/helpers/callSuper');
|
|
13
|
+
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
14
|
+
var ckeditor5Core = require('@ckeditor/ckeditor5-core');
|
|
3
15
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
16
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
5
17
|
|
|
6
|
-
var
|
|
7
|
-
editor.conversion.elementToElement({
|
|
8
|
-
model: 'paragraph',
|
|
9
|
-
view: 'span'
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
var InlinePlugin$1 = InlinePlugin;
|
|
18
|
+
var fullPlugins = [ckeditor5Heading.Heading, ckeditor5Image.ImageInline, ckeditor5Image.ImageToolbar, ckeditor5Image.ImageUpload, ckeditor5Upload.SimpleUploadAdapter, ckeditor5MediaEmbed.MediaEmbed, ckeditor5BlockQuote.BlockQuote, ckeditor5Heading.HeadingButtonsUI, ckeditor5Paragraph.ParagraphButtonUI, ckeditor5List.List];
|
|
13
19
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var model = _ref3.model,
|
|
32
|
-
color = _ref3.color;
|
|
33
|
-
return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, model, {
|
|
34
|
-
name: 'mark',
|
|
35
|
-
styles: {
|
|
36
|
-
'background-color': color,
|
|
37
|
-
'box-shadow': "0.05em 0px 0px ".concat(color, ", -0.05em 0px 0px ").concat(color)
|
|
20
|
+
var InlinePlugin = /*#__PURE__*/function (_Plugin) {
|
|
21
|
+
function InlinePlugin() {
|
|
22
|
+
_classCallCheck(this, InlinePlugin);
|
|
23
|
+
return _callSuper(this, InlinePlugin, arguments);
|
|
24
|
+
}
|
|
25
|
+
_inherits(InlinePlugin, _Plugin);
|
|
26
|
+
return _createClass(InlinePlugin, [{
|
|
27
|
+
key: "init",
|
|
28
|
+
value: function init() {
|
|
29
|
+
var _this = this;
|
|
30
|
+
this.editor.editing.view.document.on('enter', function (evt, data) {
|
|
31
|
+
data.preventDefault();
|
|
32
|
+
evt.stop();
|
|
33
|
+
if (data.isSoft) {
|
|
34
|
+
_this.editor.execute('enter');
|
|
35
|
+
_this.editor.editing.view.scrollToTheSelection();
|
|
36
|
+
return;
|
|
38
37
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
_this.editor.execute('shiftEnter');
|
|
39
|
+
_this.editor.editing.view.scrollToTheSelection();
|
|
40
|
+
}, {
|
|
41
|
+
priority: 'high'
|
|
42
|
+
});
|
|
43
|
+
this.editor.conversion
|
|
44
|
+
// .for('downcast')
|
|
45
|
+
.elementToElement({
|
|
46
|
+
model: 'paragraph',
|
|
47
|
+
view: 'span',
|
|
48
|
+
converterPriority: 'high'
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}]);
|
|
52
|
+
}(ckeditor5Core.Plugin);
|
|
44
53
|
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
var MarkerPlugin = /*#__PURE__*/function (_Plugin) {
|
|
55
|
+
function MarkerPlugin() {
|
|
56
|
+
_classCallCheck(this, MarkerPlugin);
|
|
57
|
+
return _callSuper(this, MarkerPlugin, arguments);
|
|
58
|
+
}
|
|
59
|
+
_inherits(MarkerPlugin, _Plugin);
|
|
60
|
+
return _createClass(MarkerPlugin, [{
|
|
61
|
+
key: "init",
|
|
62
|
+
value: function init() {
|
|
63
|
+
var options = this.editor.config.get('highlight.options') || [];
|
|
64
|
+
var markers = options.filter(function (_ref) {
|
|
65
|
+
var _ref$color = _ref.color,
|
|
66
|
+
color = _ref$color === void 0 ? null : _ref$color;
|
|
67
|
+
return color !== null;
|
|
68
|
+
});
|
|
69
|
+
this.editor.conversion.attributeToElement({
|
|
70
|
+
model: {
|
|
71
|
+
key: 'highlight',
|
|
72
|
+
values: markers.map(function (_ref2) {
|
|
73
|
+
var model = _ref2.model;
|
|
74
|
+
return model;
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
view: markers.reduce(function (map, _ref3) {
|
|
78
|
+
var model = _ref3.model,
|
|
79
|
+
color = _ref3.color;
|
|
80
|
+
return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, model, {
|
|
81
|
+
name: 'mark',
|
|
82
|
+
styles: {
|
|
83
|
+
'background-color': color,
|
|
84
|
+
'box-shadow': "0.05em 0px 0px ".concat(color, ", -0.05em 0px 0px ").concat(color)
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
}, {})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}]);
|
|
91
|
+
}(ckeditor5Core.Plugin);
|
|
92
|
+
|
|
93
|
+
exports.InlinePlugin = InlinePlugin;
|
|
94
|
+
exports.MarkerPlugin = MarkerPlugin;
|
|
95
|
+
exports.fullPlugins = fullPlugins;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/ckeditor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.509",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -64,28 +64,28 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@babel/runtime": "^7.13.10",
|
|
67
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
|
68
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
69
|
-
"@ckeditor/ckeditor5-
|
|
70
|
-
"@ckeditor/ckeditor5-dev-translations": "39.3
|
|
71
|
-
"@ckeditor/ckeditor5-dev-utils": "39.3
|
|
72
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
73
|
-
"@ckeditor/ckeditor5-editor-inline": "^
|
|
74
|
-
"@ckeditor/ckeditor5-essentials": "^
|
|
75
|
-
"@ckeditor/ckeditor5-heading": "^
|
|
76
|
-
"@ckeditor/ckeditor5-highlight": "^
|
|
77
|
-
"@ckeditor/ckeditor5-image": "^
|
|
78
|
-
"@ckeditor/ckeditor5-link": "^
|
|
79
|
-
"@ckeditor/ckeditor5-list": "^
|
|
80
|
-
"@ckeditor/ckeditor5-media-embed": "^
|
|
81
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
67
|
+
"@ckeditor/ckeditor5-basic-styles": "^41.3.1",
|
|
68
|
+
"@ckeditor/ckeditor5-block-quote": "^41.3.1",
|
|
69
|
+
"@ckeditor/ckeditor5-core": "^41.3.1",
|
|
70
|
+
"@ckeditor/ckeditor5-dev-translations": "39.6.3",
|
|
71
|
+
"@ckeditor/ckeditor5-dev-utils": "39.6.3",
|
|
72
|
+
"@ckeditor/ckeditor5-editor-classic": "^41.3.1",
|
|
73
|
+
"@ckeditor/ckeditor5-editor-inline": "^41.3.1",
|
|
74
|
+
"@ckeditor/ckeditor5-essentials": "^41.3.1",
|
|
75
|
+
"@ckeditor/ckeditor5-heading": "^41.3.1",
|
|
76
|
+
"@ckeditor/ckeditor5-highlight": "^41.3.1",
|
|
77
|
+
"@ckeditor/ckeditor5-image": "^41.3.1",
|
|
78
|
+
"@ckeditor/ckeditor5-link": "^41.3.1",
|
|
79
|
+
"@ckeditor/ckeditor5-list": "^41.3.1",
|
|
80
|
+
"@ckeditor/ckeditor5-media-embed": "^41.3.1",
|
|
81
|
+
"@ckeditor/ckeditor5-paragraph": "^41.3.1",
|
|
82
82
|
"@ckeditor/ckeditor5-react": "^6.2.0",
|
|
83
|
-
"@ckeditor/ckeditor5-upload": "^
|
|
83
|
+
"@ckeditor/ckeditor5-upload": "^41.3.1",
|
|
84
84
|
"@folklore/fetch": "0.1.17"
|
|
85
85
|
},
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public",
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "28ca6abf74ab585d218a4918b415b7d0564e5a09"
|
|
91
91
|
}
|