@pie-lib/editable-html 7.17.4-next.293 → 7.17.4-next.324
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/lib/editor.js +114 -98
- package/lib/editor.js.map +1 -1
- package/lib/plugins/characters/custom-popover.js +73 -0
- package/lib/plugins/characters/custom-popover.js.map +1 -0
- package/lib/plugins/characters/index.js +271 -0
- package/lib/plugins/characters/index.js.map +1 -0
- package/lib/plugins/characters/utils.js +362 -0
- package/lib/plugins/characters/utils.js.map +1 -0
- package/lib/plugins/index.js +19 -4
- package/lib/plugins/index.js.map +1 -1
- package/package.json +5 -5
- package/src/editor.jsx +31 -12
- package/src/plugins/characters/custom-popover.js +45 -0
- package/src/plugins/characters/index.jsx +237 -0
- package/src/plugins/characters/utils.js +444 -0
- package/src/plugins/index.jsx +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":["spanishConfig","characters","autoClose","specialConfig","hasPreview","unicode","description","write","label","String","fromCodePoint","characterIcons","spanish","special"],"sources":["../../../src/plugins/characters/utils.js"],"sourcesContent":["export const spanishConfig = {\n characters: [\n ['á', 'é', 'í', 'ó', 'ú'],\n ['Á', 'É', 'Í', 'Ó', 'Ú'],\n ['—', '«', '»', 'ñ', 'ü'],\n ['-', '¿', '¡', 'Ñ', 'Ü']\n ],\n autoClose: true\n};\n\nexport const specialConfig = {\n hasPreview: true,\n characters: [\n [\n {\n unicode: 'U+00A2',\n description: 'CENT SIGN',\n write: '¢',\n label: '¢'\n },\n {\n unicode: 'U+00BF',\n description: 'INVERTED QUESTION MARK',\n write: '¿',\n label: '¿'\n },\n {\n unicode: 'U+00B4',\n description: 'ACUTE ACCENT',\n write: '´',\n label: '´'\n },\n {\n unicode: 'U+00E1',\n description: 'LATIN SMALL LETTER A WITH ACUTE',\n write: 'á',\n label: 'á'\n },\n {\n unicode: 'U+00E9',\n description: 'LATIN SMALL LETTER E WITH ACUTE',\n write: 'é',\n label: 'é'\n },\n {\n unicode: 'U+00ED',\n description: 'LATIN SMALL LETTER I WITH ACUTE',\n write: 'í',\n label: 'í'\n },\n {\n unicode: 'U+00F3',\n description: 'LATIN SMALL LETTER O WITH ACUTE',\n write: 'ó',\n label: 'ó'\n },\n {\n unicode: 'U+00FA',\n description: 'LATIN SMALL LETTER U WITH ACUTE',\n write: 'ú',\n label: 'ú'\n },\n {\n unicode: 'U+00F1',\n description: 'LATIN SMALL LETTER N WITH TILDE',\n write: 'ñ',\n label: 'ñ'\n }\n ],\n [\n {\n unicode: 'U+20AC',\n description: 'EURO SIGN',\n write: '€',\n label: '€'\n },\n {\n unicode: 'U+00A1',\n description: 'INVERTED EXCLAMATION MARK',\n write: '¡',\n label: '¡'\n },\n {\n unicode: 'U+00C1',\n description: 'LATIN CAPITAL LETTER A WITH ACUTE',\n write: 'Á',\n label: 'Á'\n },\n {\n unicode: 'U+00C9',\n description: 'LATIN CAPITAL LETTER E WITH ACUTE',\n write: 'É',\n label: 'É'\n },\n {\n unicode: 'U+00CD',\n description: 'LATIN CAPITAL LETTER I WITH ACUTE',\n write: 'Í',\n label: 'Í'\n },\n {\n unicode: 'U+00D3',\n description: 'LATIN CAPITAL LETTER O WITH ACUTE',\n write: 'Ó',\n label: 'Ó'\n },\n {\n unicode: 'U+00DA',\n description: 'LATIN CAPITAL LETTER U WITH ACUTE',\n write: 'Ú',\n label: 'Ú'\n },\n {\n unicode: 'U+00D1',\n description: 'LATIN CAPITAL LETTER N WITH TILDE',\n write: 'Ñ',\n label: 'Ñ'\n }\n ],\n [\n {\n unicode: 'U+00A3',\n description: 'POUND SIGN',\n write: '£',\n label: '£'\n },\n {\n unicode: 'U+00AB',\n description: 'LEFT-POINTING DOUBLE ANGLE QUOTATION MARK',\n write: '«',\n label: '«'\n },\n {\n unicode: 'U+005E',\n description: 'CIRCUMFLEX ACCENT',\n write: '^',\n label: '^'\n },\n {\n unicode: 'U+00E2',\n description: 'LATIN SMALL LETTER A WITH CIRCUMFLEX',\n write: 'â',\n label: 'â'\n },\n {\n unicode: 'U+00EA',\n description: 'LATIN SMALL LETTER E WITH CIRCUMFLEX',\n write: 'ê',\n label: 'ê'\n },\n {\n unicode: 'U+00EE',\n description: 'LATIN SMALL LETTER I WITH CIRCUMFLEX',\n write: 'î',\n label: 'î'\n },\n {\n unicode: 'U+00F4',\n description: 'LATIN SMALL LETTER O WITH CIRCUMFLEX',\n write: 'ô',\n label: 'ô'\n },\n {\n unicode: 'U+00FB',\n description: 'LATIN SMALL LETTER U WITH CIRCUMFLEX',\n write: 'û',\n label: 'û'\n },\n {\n unicode: 'U+00E7',\n description: 'LATIN SMALL LETTER C WITH CEDILLA',\n write: 'ç',\n label: 'ç'\n }\n ],\n [\n {\n unicode: 'U+00A5',\n description: 'YEN SIGN',\n write: '¥',\n label: '¥'\n },\n {\n unicode: 'U+00BB',\n description: 'RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK',\n write: '»',\n label: '»'\n },\n {\n unicode: 'U+00C2',\n description: 'LATIN CAPITAL LETTER A WITH CIRCUMFLEX',\n write: 'Â',\n label: 'Â'\n },\n {\n unicode: 'U+00CA',\n description: 'LATIN CAPITAL LETTER E WITH CIRCUMFLEX',\n write: 'Ê',\n label: 'Ê'\n },\n {\n unicode: 'U+00CE',\n description: 'LATIN CAPITAL LETTER I WITH CIRCUMFLEX',\n write: 'Î',\n label: 'Î'\n },\n {\n unicode: 'U+00D4',\n description: 'LATIN CAPITAL LETTER O WITH CIRCUMFLEX',\n write: 'Ô',\n label: 'Ô'\n },\n {\n unicode: 'U+00DB',\n description: 'LATIN CAPITAL LETTER U WITH CIRCUMFLEX',\n write: 'Û',\n label: 'Û'\n },\n {\n unicode: 'U+00C7',\n description: 'LATIN CAPITAL LETTER C WITH CEDILLA',\n write: 'Ç',\n label: 'Ç'\n }\n ],\n [\n {\n unicode: 'U+00A0',\n description: 'NO-BREAK SPACE',\n write: String.fromCodePoint('0x00A0'),\n label: ' '\n },\n {\n unicode: 'U+00A7',\n description: 'SECTION SIGN',\n write: '§',\n label: '§'\n },\n {\n unicode: 'U+00A8',\n description: 'DIAERESIS',\n write: '¨',\n label: '¨'\n },\n {\n unicode: 'U+00E4',\n description: 'LATIN SMALL LETTER A WITH DIAERESIS',\n write: 'ä',\n label: 'ä'\n },\n {\n unicode: 'U+00EB',\n description: 'LATIN SMALL LETTER E WITH DIAERESIS',\n write: 'ë',\n label: 'ë'\n },\n {\n unicode: 'U+00EF',\n description: 'LATIN SMALL LETTER I WITH DIAERESIS',\n write: 'ï',\n label: 'ï'\n },\n {\n unicode: 'U+00F6',\n description: 'LATIN SMALL LETTER O WITH DIAERESIS',\n write: 'ö',\n label: 'ö'\n },\n {\n unicode: 'U+00FC',\n description: 'LATIN SMALL LETTER U WITH DIAERESIS',\n write: 'ü',\n label: 'ü'\n },\n {\n unicode: 'U+00DF',\n description: 'LATIN SMALL LETTER SHARP S',\n write: 'ß',\n label: 'ß'\n }\n ],\n [\n {\n unicode: 'U+2009',\n description: 'THIN SPACE',\n write: String.fromCodePoint('0x2009'),\n label: ' '\n },\n {\n unicode: 'U+2026',\n description: 'HORIZONTAL ELLIPSIS',\n write: '…',\n label: '…'\n },\n {\n unicode: 'U+00C4',\n description: 'LATIN CAPITAL LETTER A WITH DIAERESIS',\n write: 'Ä',\n label: 'Ä'\n },\n {\n unicode: 'U+00CB',\n description: 'LATIN CAPITAL LETTER E WITH DIAERESIS',\n write: 'Ë',\n label: 'Ë'\n },\n {\n unicode: 'U+00CF',\n description: 'LATIN CAPITAL LETTER I WITH DIAERESIS',\n write: 'Ï',\n label: 'Ï'\n },\n {\n unicode: 'U+00D6',\n description: 'LATIN CAPITAL LETTER O WITH DIAERESIS',\n write: 'Ö',\n label: 'Ö'\n },\n {\n unicode: 'U+00DC',\n description: 'LATIN CAPITAL LETTER U WITH DIAERESIS',\n write: 'Ü',\n label: 'Ü'\n },\n {\n unicode: 'U+2212',\n description: 'MINUS SIGN',\n write: '−',\n label: '−'\n }\n ],\n [\n {\n unicode: 'U+200A',\n description: 'HAIR SPACE',\n write: String.fromCodePoint('0x200A'),\n label: ' '\n },\n {\n unicode: 'U+2022',\n description: 'BULLET',\n write: '•',\n label: '•'\n },\n {\n unicode: 'U+0060',\n description: 'GRAVE ACCENT',\n write: '`',\n label: '`'\n },\n {\n unicode: 'U+00E0',\n description: 'LATIN SMALL LETTER A WITH GRAVE',\n write: 'à',\n label: 'à'\n },\n {\n unicode: 'U+00E8',\n description: 'LATIN SMALL LETTER E WITH GRAVE',\n write: 'è',\n label: 'è'\n },\n {\n unicode: 'U+00EC',\n description: 'LATIN SMALL LETTER I WITH GRAVE',\n write: 'ì',\n label: 'ì'\n },\n {\n unicode: 'U+00F2',\n description: 'LATIN SMALL LETTER O WITH GRAVE',\n write: 'ò',\n label: 'ò'\n },\n {\n unicode: 'U+00F9',\n description: 'LATIN SMALL LETTER U WITH GRAVE',\n write: 'ù',\n label: 'ù'\n },\n {\n unicode: 'U+2013',\n description: 'EN DASH',\n write: '–',\n label: '–'\n }\n ],\n [\n {\n unicode: 'U+0009',\n description: 'TAB',\n write: String.fromCodePoint('0x0009'),\n label: 'TAB'\n },\n {\n unicode: 'U+25E6',\n description: 'WHITE BULLET',\n write: '◦',\n label: '◦'\n },\n {\n unicode: 'U+00C0',\n description: 'LATIN CAPITAL LETTER A WITH GRAVE',\n write: 'À',\n label: 'À'\n },\n {\n unicode: 'U+00C8',\n description: 'LATIN CAPITAL LETTER E WITH GRAVE',\n write: 'È',\n label: 'È'\n },\n {\n unicode: 'U+00CC',\n description: 'LATIN CAPITAL LETTER I WITH GRAVE',\n write: 'Ì',\n label: 'Ì'\n },\n {\n unicode: 'U+00D2',\n description: 'LATIN CAPITAL LETTER O WITH GRAVE',\n write: 'Ò',\n label: 'Ò'\n },\n {\n unicode: 'U+00D9',\n description: 'LATIN CAPITAL LETTER U WITH GRAVE',\n write: 'Ù',\n label: 'Ù'\n },\n {\n unicode: 'U+2014',\n description: 'EM DASH',\n write: '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./image"));
|
|
|
15
15
|
|
|
16
16
|
var _media = _interopRequireDefault(require("./media"));
|
|
17
17
|
|
|
18
|
+
var _characters = _interopRequireDefault(require("./characters"));
|
|
19
|
+
|
|
18
20
|
var _FormatItalic = _interopRequireDefault(require("@material-ui/icons/FormatItalic"));
|
|
19
21
|
|
|
20
22
|
var _math = _interopRequireDefault(require("./math"));
|
|
@@ -41,7 +43,18 @@ var _respArea = _interopRequireDefault(require("./respArea"));
|
|
|
41
43
|
|
|
42
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
47
|
+
|
|
48
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
49
|
+
|
|
50
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
51
|
+
|
|
52
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
53
|
+
|
|
54
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
55
|
+
|
|
56
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
57
|
+
|
|
45
58
|
var log = (0, _debug["default"])('@pie-lib:editable-html:plugins');
|
|
46
59
|
|
|
47
60
|
function MarkHotkey(options) {
|
|
@@ -79,7 +92,7 @@ function MarkHotkey(options) {
|
|
|
79
92
|
}
|
|
80
93
|
|
|
81
94
|
var ALL_PLUGINS = ['bold', // 'code',
|
|
82
|
-
'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'table', 'video', 'audio', 'responseArea'];
|
|
95
|
+
'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'table', 'video', 'audio', 'responseArea'];
|
|
83
96
|
exports.ALL_PLUGINS = ALL_PLUGINS;
|
|
84
97
|
var DEFAULT_PLUGINS = ALL_PLUGINS.filter(function (plug) {
|
|
85
98
|
return plug !== 'responseArea';
|
|
@@ -118,7 +131,9 @@ var buildPlugins = function buildPlugins(activePlugins, opts) {
|
|
|
118
131
|
type: 'underline',
|
|
119
132
|
icon: /*#__PURE__*/_react["default"].createElement(_FormatUnderlined["default"], null),
|
|
120
133
|
tag: 'u'
|
|
121
|
-
})), addIf('image', imagePlugin), addIf('video', (0, _media["default"])('video', opts.media)), addIf('audio', (0, _media["default"])('audio', opts.media)), addIf('math', mathPlugin)
|
|
134
|
+
})), addIf('image', imagePlugin), addIf('video', (0, _media["default"])('video', opts.media)), addIf('audio', (0, _media["default"])('audio', opts.media)), addIf('math', mathPlugin)].concat(_toConsumableArray(opts.languageCharacters.map(function (config) {
|
|
135
|
+
return addIf('languageCharacters', (0, _characters["default"])(config));
|
|
136
|
+
})), [addIf('bulleted-list', (0, _list["default"])({
|
|
122
137
|
key: 'l',
|
|
123
138
|
type: 'ul_list',
|
|
124
139
|
icon: /*#__PURE__*/_react["default"].createElement(_FormatListBulleted["default"], null)
|
|
@@ -128,7 +143,7 @@ var buildPlugins = function buildPlugins(activePlugins, opts) {
|
|
|
128
143
|
icon: /*#__PURE__*/_react["default"].createElement(_FormatListNumbered["default"], null)
|
|
129
144
|
})), (0, _toolbar["default"])(opts.toolbar), (0, _slateSoftBreak["default"])({
|
|
130
145
|
shift: true
|
|
131
|
-
}), addIf('responseArea', respAreaPlugin)]);
|
|
146
|
+
}), addIf('responseArea', respAreaPlugin)]));
|
|
132
147
|
};
|
|
133
148
|
|
|
134
149
|
exports.buildPlugins = buildPlugins;
|
package/lib/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["log","debug","MarkHotkey","options","type","key","icon","tag","toolbar","isMark","onToggle","change","toggleMark","renderMark","props","mark","K","children","onKeyDown","event","metaKey","preventDefault","ALL_PLUGINS","DEFAULT_PLUGINS","filter","plug","buildPlugins","activePlugins","opts","addIf","p","includes","imagePlugin","image","onDelete","ImagePlugin","mathPlugin","MathPlugin","math","respAreaPlugin","responseArea","RespAreaPlugin","compact","TablePlugin","table","MediaPlugin","media","List","ToolbarPlugin","SoftBreakPlugin","shift"],"sources":["../../src/plugins/index.jsx"],"sourcesContent":["import Bold from '@material-ui/icons/FormatBold';\n// import Code from '@material-ui/icons/Code';\nimport BulletedListIcon from '@material-ui/icons/FormatListBulleted';\nimport NumberedListIcon from '@material-ui/icons/FormatListNumbered';\nimport ImagePlugin from './image';\nimport MediaPlugin from './media';\nimport Italic from '@material-ui/icons/FormatItalic';\nimport MathPlugin from './math';\nimport React from 'react';\nimport Strikethrough from '@material-ui/icons/FormatStrikethrough';\nimport ToolbarPlugin from './toolbar';\nimport Underline from '@material-ui/icons/FormatUnderlined';\nimport compact from 'lodash/compact';\nimport SoftBreakPlugin from 'slate-soft-break';\nimport debug from 'debug';\nimport List from './list';\nimport TablePlugin from './table';\nimport RespAreaPlugin from './respArea';\n\nconst log = debug('@pie-lib:editable-html:plugins');\n\nfunction MarkHotkey(options) {\n const { type, key, icon, tag } = options;\n\n // Return our \"plugin\" object, containing the `onKeyDown` handler.\n return {\n toolbar: {\n isMark: true,\n type,\n icon,\n onToggle: change => {\n log('[onToggleMark] type: ', type);\n return change.toggleMark(type);\n }\n },\n renderMark(props) {\n if (props.mark.type === type) {\n const K = tag || type;\n return <K>{props.children}</K>;\n }\n },\n onKeyDown(event, change) {\n // Check that the key pressed matches our `key` option.\n if (!event.metaKey || event.key != key) return;\n\n // Prevent the default characters from being inserted.\n event.preventDefault();\n\n // Toggle the mark `type`.\n change.toggleMark(type);\n return true;\n }\n };\n}\n\nexport const ALL_PLUGINS = [\n 'bold',\n // 'code',\n 'italic',\n 'underline',\n 'strikethrough',\n 'bulleted-list',\n 'numbered-list',\n 'image',\n 'math',\n 'table',\n 'video',\n 'audio',\n 'responseArea'\n];\n\nexport const DEFAULT_PLUGINS = ALL_PLUGINS.filter(plug => plug !== 'responseArea');\n\nexport const buildPlugins = (activePlugins, opts) => {\n log('[buildPlugins] opts: ', opts);\n\n activePlugins = activePlugins || DEFAULT_PLUGINS;\n\n const addIf = (key, p) => activePlugins.includes(key) && p;\n const imagePlugin = opts.image && opts.image.onDelete && ImagePlugin(opts.image);\n const mathPlugin = MathPlugin(opts.math);\n const respAreaPlugin =\n opts.responseArea &&\n opts.responseArea.type &&\n RespAreaPlugin(opts.responseArea, compact([mathPlugin]));\n\n return compact([\n addIf('table', TablePlugin(opts.table, compact([imagePlugin, mathPlugin, respAreaPlugin]))),\n addIf('bold', MarkHotkey({ key: 'b', type: 'bold', icon: <Bold />, tag: 'strong' })),\n // addIf('code', MarkHotkey({ key: '`', type: 'code', icon: <Code /> })),\n addIf('italic', MarkHotkey({ key: 'i', type: 'italic', icon: <Italic />, tag: 'em' })),\n addIf(\n 'strikethrough',\n MarkHotkey({\n key: '~',\n type: 'strikethrough',\n icon: <Strikethrough />,\n tag: 'del'\n })\n ),\n addIf('underline', MarkHotkey({ key: 'u', type: 'underline', icon: <Underline />, tag: 'u' })),\n addIf('image', imagePlugin),\n addIf('video', MediaPlugin('video', opts.media)),\n addIf('audio', MediaPlugin('audio', opts.media)),\n addIf('math', mathPlugin),\n addIf('bulleted-list', List({ key: 'l', type: 'ul_list', icon: <BulletedListIcon /> })),\n addIf('numbered-list', List({ key: 'n', type: 'ol_list', icon: <NumberedListIcon /> })),\n ToolbarPlugin(opts.toolbar),\n SoftBreakPlugin({ shift: true }),\n addIf('responseArea', respAreaPlugin)\n ]);\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA
|
|
1
|
+
{"version":3,"file":"index.js","names":["log","debug","MarkHotkey","options","type","key","icon","tag","toolbar","isMark","onToggle","change","toggleMark","renderMark","props","mark","K","children","onKeyDown","event","metaKey","preventDefault","ALL_PLUGINS","DEFAULT_PLUGINS","filter","plug","buildPlugins","activePlugins","opts","addIf","p","includes","imagePlugin","image","onDelete","ImagePlugin","mathPlugin","MathPlugin","math","respAreaPlugin","responseArea","RespAreaPlugin","compact","TablePlugin","table","MediaPlugin","media","languageCharacters","map","config","CharactersPlugin","List","ToolbarPlugin","SoftBreakPlugin","shift"],"sources":["../../src/plugins/index.jsx"],"sourcesContent":["import Bold from '@material-ui/icons/FormatBold';\n// import Code from '@material-ui/icons/Code';\nimport BulletedListIcon from '@material-ui/icons/FormatListBulleted';\nimport NumberedListIcon from '@material-ui/icons/FormatListNumbered';\nimport ImagePlugin from './image';\nimport MediaPlugin from './media';\nimport CharactersPlugin from './characters';\nimport Italic from '@material-ui/icons/FormatItalic';\nimport MathPlugin from './math';\nimport React from 'react';\nimport Strikethrough from '@material-ui/icons/FormatStrikethrough';\nimport ToolbarPlugin from './toolbar';\nimport Underline from '@material-ui/icons/FormatUnderlined';\nimport compact from 'lodash/compact';\nimport SoftBreakPlugin from 'slate-soft-break';\nimport debug from 'debug';\nimport List from './list';\nimport TablePlugin from './table';\nimport RespAreaPlugin from './respArea';\n\nconst log = debug('@pie-lib:editable-html:plugins');\n\nfunction MarkHotkey(options) {\n const { type, key, icon, tag } = options;\n\n // Return our \"plugin\" object, containing the `onKeyDown` handler.\n return {\n toolbar: {\n isMark: true,\n type,\n icon,\n onToggle: change => {\n log('[onToggleMark] type: ', type);\n return change.toggleMark(type);\n }\n },\n renderMark(props) {\n if (props.mark.type === type) {\n const K = tag || type;\n return <K>{props.children}</K>;\n }\n },\n onKeyDown(event, change) {\n // Check that the key pressed matches our `key` option.\n if (!event.metaKey || event.key != key) return;\n\n // Prevent the default characters from being inserted.\n event.preventDefault();\n\n // Toggle the mark `type`.\n change.toggleMark(type);\n return true;\n }\n };\n}\n\nexport const ALL_PLUGINS = [\n 'bold',\n // 'code',\n 'italic',\n 'underline',\n 'strikethrough',\n 'bulleted-list',\n 'numbered-list',\n 'image',\n 'math',\n 'languageCharacters',\n 'table',\n 'video',\n 'audio',\n 'responseArea'\n];\n\nexport const DEFAULT_PLUGINS = ALL_PLUGINS.filter(plug => plug !== 'responseArea');\n\nexport const buildPlugins = (activePlugins, opts) => {\n log('[buildPlugins] opts: ', opts);\n\n activePlugins = activePlugins || DEFAULT_PLUGINS;\n\n const addIf = (key, p) => activePlugins.includes(key) && p;\n const imagePlugin = opts.image && opts.image.onDelete && ImagePlugin(opts.image);\n const mathPlugin = MathPlugin(opts.math);\n const respAreaPlugin =\n opts.responseArea &&\n opts.responseArea.type &&\n RespAreaPlugin(opts.responseArea, compact([mathPlugin]));\n\n return compact([\n addIf('table', TablePlugin(opts.table, compact([imagePlugin, mathPlugin, respAreaPlugin]))),\n addIf('bold', MarkHotkey({ key: 'b', type: 'bold', icon: <Bold />, tag: 'strong' })),\n // addIf('code', MarkHotkey({ key: '`', type: 'code', icon: <Code /> })),\n addIf('italic', MarkHotkey({ key: 'i', type: 'italic', icon: <Italic />, tag: 'em' })),\n addIf(\n 'strikethrough',\n MarkHotkey({\n key: '~',\n type: 'strikethrough',\n icon: <Strikethrough />,\n tag: 'del'\n })\n ),\n addIf('underline', MarkHotkey({ key: 'u', type: 'underline', icon: <Underline />, tag: 'u' })),\n addIf('image', imagePlugin),\n addIf('video', MediaPlugin('video', opts.media)),\n addIf('audio', MediaPlugin('audio', opts.media)),\n addIf('math', mathPlugin),\n ...opts.languageCharacters.map(config => addIf('languageCharacters', CharactersPlugin(config))),\n addIf('bulleted-list', List({ key: 'l', type: 'ul_list', icon: <BulletedListIcon /> })),\n addIf('numbered-list', List({ key: 'n', type: 'ol_list', icon: <NumberedListIcon /> })),\n ToolbarPlugin(opts.toolbar),\n SoftBreakPlugin({ shift: true }),\n addIf('responseArea', respAreaPlugin)\n ]);\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,IAAAC,iBAAA,EAAM,gCAAN,CAAZ;;AAEA,SAASC,UAAT,CAAoBC,OAApB,EAA6B;EAC3B,IAAQC,IAAR,GAAiCD,OAAjC,CAAQC,IAAR;EAAA,IAAcC,GAAd,GAAiCF,OAAjC,CAAcE,GAAd;EAAA,IAAmBC,IAAnB,GAAiCH,OAAjC,CAAmBG,IAAnB;EAAA,IAAyBC,GAAzB,GAAiCJ,OAAjC,CAAyBI,GAAzB,CAD2B,CAG3B;;EACA,OAAO;IACLC,OAAO,EAAE;MACPC,MAAM,EAAE,IADD;MAEPL,IAAI,EAAJA,IAFO;MAGPE,IAAI,EAAJA,IAHO;MAIPI,QAAQ,EAAE,kBAAAC,MAAM,EAAI;QAClBX,GAAG,CAAC,uBAAD,EAA0BI,IAA1B,CAAH;QACA,OAAOO,MAAM,CAACC,UAAP,CAAkBR,IAAlB,CAAP;MACD;IAPM,CADJ;IAULS,UAVK,sBAUMC,KAVN,EAUa;MAChB,IAAIA,KAAK,CAACC,IAAN,CAAWX,IAAX,KAAoBA,IAAxB,EAA8B;QAC5B,IAAMY,CAAC,GAAGT,GAAG,IAAIH,IAAjB;QACA,oBAAO,gCAAC,CAAD,QAAIU,KAAK,CAACG,QAAV,CAAP;MACD;IACF,CAfI;IAgBLC,SAhBK,qB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BjB,IAAI,CAACkB,KAA1B,CAAV,CAjBA,EAkBLjB,KAAK,CAAC,MAAD,EAASO,UAAT,CAlBA,4BAmBFR,IAAI,CAACmB,kBAAL,CAAwBC,GAAxB,CAA4B,UAAAC,MAAM;IAAA,OAAIpB,KAAK,CAAC,oBAAD,EAAuB,IAAAqB,sBAAA,EAAiBD,MAAjB,CAAvB,CAAT;EAAA,CAAlC,CAnBE,IAoBLpB,KAAK,CAAC,eAAD,EAAkB,IAAAsB,gBAAA,EAAK;IAAE9C,GAAG,EAAE,GAAP;IAAYD,IAAI,EAAE,SAAlB;IAA6BE,IAAI,eAAE,gCAAC,8BAAD;EAAnC,CAAL,CAAlB,CApBA,EAqBLuB,KAAK,CAAC,eAAD,EAAkB,IAAAsB,gBAAA,EAAK;IAAE9C,GAAG,EAAE,GAAP;IAAYD,IAAI,EAAE,SAAlB;IAA6BE,IAAI,eAAE,gCAAC,8BAAD;EAAnC,CAAL,CAAlB,CArBA,EAsBL,IAAA8C,mBAAA,EAAcxB,IAAI,CAACpB,OAAnB,CAtBK,EAuBL,IAAA6C,0BAAA,EAAgB;IAAEC,KAAK,EAAE;EAAT,CAAhB,CAvBK,EAwBLzB,KAAK,CAAC,cAAD,EAAiBU,cAAjB,CAxBA,GAAP;AA0BD,CAvCM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/editable-html",
|
|
3
|
-
"version": "7.17.4-next.
|
|
3
|
+
"version": "7.17.4-next.324+5a1d569b",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"@material-ui/icons": "^3.0.2",
|
|
12
12
|
"@material-ui/styles": "^3.0.0-alpha.10",
|
|
13
13
|
"@pie-lib/drag": "^1.1.52",
|
|
14
|
-
"@pie-lib/math-rendering": "^2.
|
|
15
|
-
"@pie-lib/math-toolbar": "^1.8.
|
|
16
|
-
"@pie-lib/render-ui": "^4.12.
|
|
14
|
+
"@pie-lib/math-rendering": "^2.4.0",
|
|
15
|
+
"@pie-lib/math-toolbar": "^1.8.1-next.324+5a1d569b",
|
|
16
|
+
"@pie-lib/render-ui": "^4.12.0",
|
|
17
17
|
"change-case": "^3.0.2",
|
|
18
18
|
"classnames": "^2.2.6",
|
|
19
19
|
"debug": "^4.1.1",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "5a1d569b144ca3eec387306bf5ff046aa13ab485",
|
|
50
50
|
"scripts": {}
|
|
51
51
|
}
|
package/src/editor.jsx
CHANGED
|
@@ -30,6 +30,8 @@ const defaultResponseAreaProps = {
|
|
|
30
30
|
onHandleAreaChange: () => {}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
const defaultLanguageCharactersProps = [];
|
|
34
|
+
|
|
33
35
|
const createToolbarOpts = toolbarOpts => {
|
|
34
36
|
return {
|
|
35
37
|
...defaultToolbarOpts,
|
|
@@ -72,6 +74,13 @@ export class Editor extends React.Component {
|
|
|
72
74
|
respAreaToolbar: PropTypes.func,
|
|
73
75
|
onHandleAreaChange: PropTypes.func
|
|
74
76
|
}),
|
|
77
|
+
languageCharactersProps: PropTypes.arrayOf(
|
|
78
|
+
PropTypes.shape({
|
|
79
|
+
language: PropTypes.string,
|
|
80
|
+
characterIcon: PropTypes.string,
|
|
81
|
+
characters: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string))
|
|
82
|
+
})
|
|
83
|
+
),
|
|
75
84
|
toolbarOpts: PropTypes.shape({
|
|
76
85
|
position: PropTypes.oneOf(['bottom', 'top']),
|
|
77
86
|
alignment: PropTypes.oneOf(['left', 'right']),
|
|
@@ -96,7 +105,8 @@ export class Editor extends React.Component {
|
|
|
96
105
|
onBlur: () => {},
|
|
97
106
|
onKeyDown: () => {},
|
|
98
107
|
toolbarOpts: defaultToolbarOpts,
|
|
99
|
-
responseAreaProps: defaultResponseAreaProps
|
|
108
|
+
responseAreaProps: defaultResponseAreaProps,
|
|
109
|
+
languageCharactersProps: defaultLanguageCharactersProps
|
|
100
110
|
};
|
|
101
111
|
|
|
102
112
|
constructor(props) {
|
|
@@ -106,15 +116,19 @@ export class Editor extends React.Component {
|
|
|
106
116
|
toolbarOpts: createToolbarOpts(props.toolbarOpts)
|
|
107
117
|
};
|
|
108
118
|
|
|
119
|
+
this.onResize = () => {
|
|
120
|
+
props.onChange(this.state.value, true);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
this.handlePlugins(this.props);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
handlePlugins = props => {
|
|
109
127
|
const normalizedResponseAreaProps = {
|
|
110
128
|
...defaultResponseAreaProps,
|
|
111
129
|
...props.responseAreaProps
|
|
112
130
|
};
|
|
113
131
|
|
|
114
|
-
this.onResize = () => {
|
|
115
|
-
props.onChange(this.state.value, true);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
132
|
this.plugins = buildPlugins(props.activePlugins, {
|
|
119
133
|
math: {
|
|
120
134
|
onClick: this.onMathClick,
|
|
@@ -123,22 +137,22 @@ export class Editor extends React.Component {
|
|
|
123
137
|
},
|
|
124
138
|
image: {
|
|
125
139
|
onDelete:
|
|
126
|
-
|
|
127
|
-
|
|
140
|
+
props.imageSupport &&
|
|
141
|
+
props.imageSupport.delete &&
|
|
128
142
|
((src, done) => {
|
|
129
|
-
|
|
143
|
+
props.imageSupport.delete(src, e => {
|
|
130
144
|
done(e, this.state.value);
|
|
131
145
|
});
|
|
132
146
|
}),
|
|
133
147
|
insertImageRequested:
|
|
134
|
-
|
|
148
|
+
props.imageSupport &&
|
|
135
149
|
(getHandler => {
|
|
136
150
|
/**
|
|
137
151
|
* The handler is the object through which the outer context
|
|
138
152
|
* communicates file upload events like: fileChosen, cancel, progress
|
|
139
153
|
*/
|
|
140
154
|
const handler = getHandler(() => this.state.value);
|
|
141
|
-
|
|
155
|
+
props.imageSupport.add(handler);
|
|
142
156
|
}),
|
|
143
157
|
onFocus: this.onPluginFocus,
|
|
144
158
|
onBlur: this.onPluginBlur
|
|
@@ -151,7 +165,7 @@ export class Editor extends React.Component {
|
|
|
151
165
|
disableUnderline: props.disableUnderline,
|
|
152
166
|
autoWidth: props.autoWidthToolbar,
|
|
153
167
|
onDone: () => {
|
|
154
|
-
const { nonEmpty } =
|
|
168
|
+
const { nonEmpty } = props;
|
|
155
169
|
|
|
156
170
|
log('[onDone]');
|
|
157
171
|
this.setState({ toolbarInFocus: false, focusedNode: null });
|
|
@@ -192,13 +206,14 @@ export class Editor extends React.Component {
|
|
|
192
206
|
this.onPluginBlur();
|
|
193
207
|
}
|
|
194
208
|
},
|
|
209
|
+
languageCharacters: props.languageCharactersProps,
|
|
195
210
|
media: {
|
|
196
211
|
focus: this.focus,
|
|
197
212
|
createChange: () => this.state.value.change(),
|
|
198
213
|
onChange: this.onChange
|
|
199
214
|
}
|
|
200
215
|
});
|
|
201
|
-
}
|
|
216
|
+
};
|
|
202
217
|
|
|
203
218
|
componentDidMount() {
|
|
204
219
|
// onRef is needed to get the ref of the component because we export it using withStyles
|
|
@@ -232,6 +247,10 @@ export class Editor extends React.Component {
|
|
|
232
247
|
toolbarOpts: newToolbarOpts
|
|
233
248
|
});
|
|
234
249
|
}
|
|
250
|
+
|
|
251
|
+
if (!isEqual(nextProps.languageCharactersProps, this.props.languageCharactersProps)) {
|
|
252
|
+
this.handlePlugins(nextProps);
|
|
253
|
+
}
|
|
235
254
|
}
|
|
236
255
|
|
|
237
256
|
componentDidUpdate() {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
3
|
+
import Popover from '@material-ui/core/Popover';
|
|
4
|
+
import Typography from '@material-ui/core/Typography';
|
|
5
|
+
|
|
6
|
+
const styles = () => ({
|
|
7
|
+
popover: {
|
|
8
|
+
pointerEvents: 'none',
|
|
9
|
+
zIndex: 99999
|
|
10
|
+
},
|
|
11
|
+
paper: {
|
|
12
|
+
padding: 20,
|
|
13
|
+
height: 'auto',
|
|
14
|
+
width: 'auto'
|
|
15
|
+
},
|
|
16
|
+
typography: {
|
|
17
|
+
fontSize: 50,
|
|
18
|
+
textAlign: 'center'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const CustomPopOver = withStyles(styles)(({ classes, children, ...props }) => (
|
|
23
|
+
<Popover
|
|
24
|
+
id="mouse-over-popover"
|
|
25
|
+
open
|
|
26
|
+
className={classes.popover}
|
|
27
|
+
classes={{
|
|
28
|
+
paper: classes.paper
|
|
29
|
+
}}
|
|
30
|
+
anchorOrigin={{
|
|
31
|
+
vertical: 'bottom',
|
|
32
|
+
horizontal: 'left'
|
|
33
|
+
}}
|
|
34
|
+
transformOrigin={{
|
|
35
|
+
vertical: 'top',
|
|
36
|
+
horizontal: 'left'
|
|
37
|
+
}}
|
|
38
|
+
disableRestoreFocus
|
|
39
|
+
{...props}
|
|
40
|
+
>
|
|
41
|
+
<Typography classes={{ root: classes.typography }}>{children}</Typography>
|
|
42
|
+
</Popover>
|
|
43
|
+
));
|
|
44
|
+
|
|
45
|
+
export default CustomPopOver;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import debug from 'debug';
|
|
4
|
+
import get from 'lodash/get';
|
|
5
|
+
|
|
6
|
+
import { PureToolbar } from '@pie-lib/math-toolbar';
|
|
7
|
+
|
|
8
|
+
import CustomPopOver from './custom-popover';
|
|
9
|
+
import { insertSnackBar } from '../respArea/utils';
|
|
10
|
+
import { characterIcons, spanishConfig, specialConfig } from './utils';
|
|
11
|
+
const log = debug('@pie-lib:editable-html:plugins:characters');
|
|
12
|
+
|
|
13
|
+
const removeDialogs = () => {
|
|
14
|
+
const prevDialogs = document.querySelectorAll('.insert-character-dialog');
|
|
15
|
+
|
|
16
|
+
log('[characters:removeDialogs]');
|
|
17
|
+
prevDialogs.forEach(s => s.remove());
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const removePopOvers = () => {
|
|
21
|
+
const prevPopOvers = document.querySelectorAll('#mouse-over-popover');
|
|
22
|
+
|
|
23
|
+
log('[characters:removePopOvers]');
|
|
24
|
+
prevPopOvers.forEach(s => s.remove());
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const insertDialog = ({ value, callback, opts }) => {
|
|
28
|
+
const newEl = document.createElement('div');
|
|
29
|
+
const initialBodyOverflow = document.body.style.overflow;
|
|
30
|
+
|
|
31
|
+
log('[characters:insertDialog]');
|
|
32
|
+
|
|
33
|
+
removeDialogs();
|
|
34
|
+
|
|
35
|
+
newEl.className = 'insert-character-dialog';
|
|
36
|
+
document.body.style.overflow = 'hidden';
|
|
37
|
+
|
|
38
|
+
let configToUse;
|
|
39
|
+
|
|
40
|
+
switch (true) {
|
|
41
|
+
case opts.language === 'spanish':
|
|
42
|
+
configToUse = spanishConfig;
|
|
43
|
+
break;
|
|
44
|
+
case opts.language === 'special':
|
|
45
|
+
configToUse = specialConfig;
|
|
46
|
+
break;
|
|
47
|
+
default:
|
|
48
|
+
configToUse = opts;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!configToUse.characters) {
|
|
52
|
+
insertSnackBar('No characters provided or language not recognized');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const layoutForCharacters = configToUse.characters.reduce(
|
|
57
|
+
(obj, arr) => {
|
|
58
|
+
if (arr.length >= obj.columns) {
|
|
59
|
+
obj.columns = arr.length;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return obj;
|
|
63
|
+
},
|
|
64
|
+
{ rows: configToUse.characters.length, columns: 0 }
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
let popoverEl;
|
|
68
|
+
|
|
69
|
+
const closePopOver = () => {
|
|
70
|
+
if (popoverEl) {
|
|
71
|
+
popoverEl.remove();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
removePopOvers();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const renderPopOver = (event, el) => {
|
|
78
|
+
if (!event) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const infoStyle = { fontSize: '20px', lineHeight: '20px' };
|
|
83
|
+
|
|
84
|
+
closePopOver();
|
|
85
|
+
|
|
86
|
+
popoverEl = document.createElement('div');
|
|
87
|
+
ReactDOM.render(
|
|
88
|
+
<CustomPopOver onClose={closePopOver} anchorEl={event.currentTarget}>
|
|
89
|
+
<div>{el.label}</div>
|
|
90
|
+
|
|
91
|
+
<div style={infoStyle}>{el.description}</div>
|
|
92
|
+
|
|
93
|
+
<div style={infoStyle}>{el.unicode}</div>
|
|
94
|
+
</CustomPopOver>,
|
|
95
|
+
popoverEl
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
document.body.appendChild(newEl);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const handleClose = () => {
|
|
102
|
+
newEl.remove();
|
|
103
|
+
closePopOver();
|
|
104
|
+
document.body.style.overflow = initialBodyOverflow;
|
|
105
|
+
callback(undefined, true);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const handleChange = val => {
|
|
109
|
+
if (typeof val === 'string') {
|
|
110
|
+
callback(val);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (configToUse.autoClose) {
|
|
114
|
+
handleClose();
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const el = (
|
|
119
|
+
<PureToolbar
|
|
120
|
+
autoFocus
|
|
121
|
+
noDecimal
|
|
122
|
+
hideInput
|
|
123
|
+
noLatexHandling
|
|
124
|
+
layoutForKeyPad={layoutForCharacters}
|
|
125
|
+
additionalKeys={configToUse.characters.reduce((arr, n) => {
|
|
126
|
+
arr = [
|
|
127
|
+
...arr,
|
|
128
|
+
...n.map(k => ({
|
|
129
|
+
name: get(k, 'name') || k,
|
|
130
|
+
write: get(k, 'write') || k,
|
|
131
|
+
label: get(k, 'label') || k,
|
|
132
|
+
category: 'character',
|
|
133
|
+
extraClass: 'character',
|
|
134
|
+
...(configToUse.hasPreview
|
|
135
|
+
? {
|
|
136
|
+
actions: { onMouseEnter: ev => renderPopOver(ev, k), onMouseLeave: closePopOver }
|
|
137
|
+
}
|
|
138
|
+
: {})
|
|
139
|
+
}))
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
return arr;
|
|
143
|
+
}, [])}
|
|
144
|
+
keypadMode="language"
|
|
145
|
+
onChange={handleChange}
|
|
146
|
+
onDone={handleClose}
|
|
147
|
+
/>
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
ReactDOM.render(el, newEl, () => {
|
|
151
|
+
const cursorItem = document.querySelector(`[data-key="${value.anchorKey}"]`);
|
|
152
|
+
|
|
153
|
+
if (cursorItem) {
|
|
154
|
+
const boundRect = cursorItem.getBoundingClientRect();
|
|
155
|
+
|
|
156
|
+
document.body.appendChild(newEl);
|
|
157
|
+
newEl.style.position = 'fixed';
|
|
158
|
+
newEl.style.top = `${boundRect.top - newEl.offsetHeight - 10}px`;
|
|
159
|
+
newEl.style.left = `${boundRect.left + cursorItem.offsetWidth + 10}px`;
|
|
160
|
+
newEl.style.zIndex = 99999;
|
|
161
|
+
|
|
162
|
+
let firstCallMade = false;
|
|
163
|
+
|
|
164
|
+
const listener = () => {
|
|
165
|
+
// this will be triggered right after setting it because
|
|
166
|
+
// this toolbar is added on the mousedown event
|
|
167
|
+
// so right after mouseup, the click will be triggered
|
|
168
|
+
if (firstCallMade) {
|
|
169
|
+
document.body.removeEventListener('click', listener);
|
|
170
|
+
handleClose();
|
|
171
|
+
} else {
|
|
172
|
+
firstCallMade = true;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
if (configToUse.autoClose) {
|
|
177
|
+
document.body.addEventListener('click', listener);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const CharacterIcon = ({ letter }) => (
|
|
184
|
+
<div
|
|
185
|
+
style={{
|
|
186
|
+
fontSize: '25px',
|
|
187
|
+
lineHeight: '15px'
|
|
188
|
+
}}
|
|
189
|
+
>
|
|
190
|
+
{letter}
|
|
191
|
+
</div>
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
export default function CharactersPlugin(opts) {
|
|
195
|
+
removeDialogs();
|
|
196
|
+
return {
|
|
197
|
+
name: 'math',
|
|
198
|
+
toolbar: {
|
|
199
|
+
icon: <CharacterIcon letter={opts.characterIcon || characterIcons[opts.language] || 'ñ'} />,
|
|
200
|
+
onClick: (value, onChange) => {
|
|
201
|
+
let valueToUse = value;
|
|
202
|
+
const callback = (char, focus) => {
|
|
203
|
+
if (char) {
|
|
204
|
+
const change = valueToUse
|
|
205
|
+
.change()
|
|
206
|
+
.insertTextByKey(valueToUse.anchorKey, valueToUse.anchorOffset, char);
|
|
207
|
+
|
|
208
|
+
valueToUse = change.value;
|
|
209
|
+
log('[characters:insert]: ', value);
|
|
210
|
+
onChange(change);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
log('[characters:click]');
|
|
214
|
+
|
|
215
|
+
if (focus) {
|
|
216
|
+
const editorDOM = document.querySelector(`[data-key="${valueToUse.document.key}"]`);
|
|
217
|
+
|
|
218
|
+
if (editorDOM) {
|
|
219
|
+
editorDOM.focus();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
insertDialog({ value: valueToUse, callback, opts });
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
pluginStyles: (node, parentNode, p) => {
|
|
229
|
+
if (p) {
|
|
230
|
+
return {
|
|
231
|
+
position: 'absolute',
|
|
232
|
+
top: 'initial'
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
}
|