@dotwee/quill 2.0.4
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/LICENSE +31 -0
- package/README.md +3 -0
- package/babel.config.cjs +12 -0
- package/package.json +104 -0
- package/scripts/babel-svg-inline-import.cjs +44 -0
- package/scripts/build +20 -0
- package/src/assets/base.styl +309 -0
- package/src/assets/bubble/toolbar.styl +14 -0
- package/src/assets/bubble/tooltip.styl +49 -0
- package/src/assets/bubble.styl +45 -0
- package/src/assets/core.styl +215 -0
- package/src/assets/favicon.png +0 -0
- package/src/assets/icons/align-center.svg +5 -0
- package/src/assets/icons/align-justify.svg +5 -0
- package/src/assets/icons/align-left.svg +5 -0
- package/src/assets/icons/align-right.svg +5 -0
- package/src/assets/icons/attachment.svg +3 -0
- package/src/assets/icons/audio.svg +5 -0
- package/src/assets/icons/authorship.svg +5 -0
- package/src/assets/icons/background.svg +52 -0
- package/src/assets/icons/blockquote.svg +6 -0
- package/src/assets/icons/bold.svg +4 -0
- package/src/assets/icons/clean.svg +7 -0
- package/src/assets/icons/code.svg +5 -0
- package/src/assets/icons/color.svg +5 -0
- package/src/assets/icons/comment.svg +3 -0
- package/src/assets/icons/direction-ltr.svg +7 -0
- package/src/assets/icons/direction-rtl.svg +7 -0
- package/src/assets/icons/dropdown.svg +4 -0
- package/src/assets/icons/embed.svg +3 -0
- package/src/assets/icons/emoji.svg +6 -0
- package/src/assets/icons/float-center.svg +5 -0
- package/src/assets/icons/float-full.svg +5 -0
- package/src/assets/icons/float-left.svg +7 -0
- package/src/assets/icons/float-right.svg +7 -0
- package/src/assets/icons/font.svg +5 -0
- package/src/assets/icons/formula.svg +5 -0
- package/src/assets/icons/hashtag.svg +6 -0
- package/src/assets/icons/header-2.svg +3 -0
- package/src/assets/icons/header-3.svg +3 -0
- package/src/assets/icons/header-4.svg +3 -0
- package/src/assets/icons/header-5.svg +3 -0
- package/src/assets/icons/header-6.svg +3 -0
- package/src/assets/icons/header.svg +3 -0
- package/src/assets/icons/horizontal-rule.svg +4 -0
- package/src/assets/icons/image.svg +5 -0
- package/src/assets/icons/indent.svg +6 -0
- package/src/assets/icons/italic.svg +5 -0
- package/src/assets/icons/link.svg +5 -0
- package/src/assets/icons/list-bullet.svg +8 -0
- package/src/assets/icons/list-check.svg +8 -0
- package/src/assets/icons/list-ordered.svg +9 -0
- package/src/assets/icons/map.svg +5 -0
- package/src/assets/icons/mention.svg +4 -0
- package/src/assets/icons/more.svg +3 -0
- package/src/assets/icons/outdent.svg +6 -0
- package/src/assets/icons/redo.svg +4 -0
- package/src/assets/icons/size-decrease.svg +5 -0
- package/src/assets/icons/size-increase.svg +6 -0
- package/src/assets/icons/size.svg +6 -0
- package/src/assets/icons/spacing.svg +9 -0
- package/src/assets/icons/speech.svg +6 -0
- package/src/assets/icons/strike.svg +5 -0
- package/src/assets/icons/subscript.svg +4 -0
- package/src/assets/icons/superscript.svg +4 -0
- package/src/assets/icons/table-border-all.svg +5 -0
- package/src/assets/icons/table-border-bottom.svg +28 -0
- package/src/assets/icons/table-border-left.svg +28 -0
- package/src/assets/icons/table-border-none.svg +25 -0
- package/src/assets/icons/table-border-outside.svg +35 -0
- package/src/assets/icons/table-border-right.svg +28 -0
- package/src/assets/icons/table-border-top.svg +28 -0
- package/src/assets/icons/table-delete-cells.svg +13 -0
- package/src/assets/icons/table-delete-columns.svg +8 -0
- package/src/assets/icons/table-delete-rows.svg +9 -0
- package/src/assets/icons/table-insert-cells.svg +13 -0
- package/src/assets/icons/table-insert-columns.svg +8 -0
- package/src/assets/icons/table-insert-rows.svg +9 -0
- package/src/assets/icons/table-merge-cells.svg +4 -0
- package/src/assets/icons/table-unmerge-cells.svg +7 -0
- package/src/assets/icons/table.svg +11 -0
- package/src/assets/icons/underline.svg +4 -0
- package/src/assets/icons/undo.svg +4 -0
- package/src/assets/icons/video.svg +14 -0
- package/src/assets/snow/toolbar.styl +26 -0
- package/src/assets/snow/tooltip.styl +53 -0
- package/src/assets/snow.styl +18 -0
- package/src/types.d.ts +6 -0
- package/webpack.common.cjs +69 -0
- package/webpack.config.cjs +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Copyright (c) 2017-2024, Slab
|
|
2
|
+
Copyright (c) 2014, Jason Chen
|
|
3
|
+
Copyright (c) 2013, salesforce.com
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions
|
|
8
|
+
are met:
|
|
9
|
+
|
|
10
|
+
1. Redistributions of source code must retain the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer.
|
|
12
|
+
|
|
13
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
14
|
+
notice, this list of conditions and the following disclaimer in the
|
|
15
|
+
documentation and/or other materials provided with the distribution.
|
|
16
|
+
|
|
17
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
18
|
+
contributors may be used to endorse or promote products derived from
|
|
19
|
+
this software without specific prior written permission.
|
|
20
|
+
|
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
22
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
23
|
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
24
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
25
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
26
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
27
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
28
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
29
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
package/babel.config.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const pkg = require('./package.json');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
presets: [
|
|
5
|
+
['@babel/preset-env', { modules: false }],
|
|
6
|
+
'@babel/preset-typescript',
|
|
7
|
+
],
|
|
8
|
+
plugins: [
|
|
9
|
+
['transform-define', { QUILL_VERSION: pkg.version }],
|
|
10
|
+
'./scripts/babel-svg-inline-import.cjs',
|
|
11
|
+
],
|
|
12
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dotwee/quill",
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"description": "Your powerful, rich text editor",
|
|
5
|
+
"author": "Lukas Wolfsteiner <lukas@wolfsteiner.media>",
|
|
6
|
+
"homepage": "https://quilljs.com",
|
|
7
|
+
"main": "quill.js",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"eventemitter3": "^5.0.1",
|
|
11
|
+
"lodash-es": "^4.17.21",
|
|
12
|
+
"parchment": "^3.0.0",
|
|
13
|
+
"quill-delta": "^5.1.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@babel/cli": "^7.23.9",
|
|
17
|
+
"@babel/core": "^7.24.0",
|
|
18
|
+
"@babel/preset-env": "^7.24.0",
|
|
19
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
20
|
+
"@playwright/test": "^1.54.1",
|
|
21
|
+
"@types/highlight.js": "^9.12.4",
|
|
22
|
+
"@types/lodash-es": "^4.17.12",
|
|
23
|
+
"@types/node": "^20.10.0",
|
|
24
|
+
"@types/webpack": "^5.28.5",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
26
|
+
"@typescript-eslint/parser": "^7.2.0",
|
|
27
|
+
"@vitest/browser": "^3.2.4",
|
|
28
|
+
"babel-loader": "^9.1.3",
|
|
29
|
+
"babel-plugin-transform-define": "^2.1.4",
|
|
30
|
+
"css-loader": "^6.10.0",
|
|
31
|
+
"eslint": "^8.57.0",
|
|
32
|
+
"eslint-config-prettier": "^9.1.0",
|
|
33
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
34
|
+
"eslint-import-resolver-webpack": "^0.13.8",
|
|
35
|
+
"eslint-plugin-import": "^2.29.1",
|
|
36
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
37
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
38
|
+
"eslint-plugin-require-extensions": "^0.1.3",
|
|
39
|
+
"glob": "10.4.2",
|
|
40
|
+
"highlight.js": "^9.18.1",
|
|
41
|
+
"html-loader": "^4.2.0",
|
|
42
|
+
"html-webpack-plugin": "^5.5.3",
|
|
43
|
+
"jsdom": "^22.1.0",
|
|
44
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
45
|
+
"prettier": "^3.0.3",
|
|
46
|
+
"source-map-loader": "^5.0.0",
|
|
47
|
+
"style-loader": "^3.3.3",
|
|
48
|
+
"stylus": "^0.62.0",
|
|
49
|
+
"stylus-loader": "^7.1.3",
|
|
50
|
+
"svgo": "^3.2.0",
|
|
51
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
52
|
+
"transpile-webpack-plugin": "^1.1.3",
|
|
53
|
+
"ts-loader": "^9.5.1",
|
|
54
|
+
"ts-node": "^10.9.2",
|
|
55
|
+
"typescript": "^5.4.2",
|
|
56
|
+
"vitest": "^3.2.4",
|
|
57
|
+
"webpack": "^5.89.0",
|
|
58
|
+
"webpack-cli": "^5.1.4",
|
|
59
|
+
"webpack-dev-server": "^4.15.1",
|
|
60
|
+
"webpack-merge": "^5.10.0"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"license": "BSD-3-Clause",
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/dotwee/quill.git",
|
|
69
|
+
"directory": "packages/quill"
|
|
70
|
+
},
|
|
71
|
+
"bugs": {
|
|
72
|
+
"url": "https://github.com/dotwee/quill/issues"
|
|
73
|
+
},
|
|
74
|
+
"prettier": {
|
|
75
|
+
"singleQuote": true
|
|
76
|
+
},
|
|
77
|
+
"browserslist": [
|
|
78
|
+
"defaults"
|
|
79
|
+
],
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "./scripts/build production",
|
|
82
|
+
"lint": "run-s lint:*",
|
|
83
|
+
"lint:eslint": "eslint .",
|
|
84
|
+
"lint:tsc": "tsc --noEmit --skipLibCheck",
|
|
85
|
+
"start": "[[ -z \"$npm_package_config_ports_webpack\" ]] && webpack-dev-server || webpack-dev-server --port $npm_package_config_ports_webpack",
|
|
86
|
+
"test": "run-s test:*",
|
|
87
|
+
"test:unit": "vitest --config test/unit/vitest.config.ts",
|
|
88
|
+
"test:fuzz": "vitest --config test/fuzz/vitest.config.ts",
|
|
89
|
+
"test:e2e": "playwright test"
|
|
90
|
+
},
|
|
91
|
+
"keywords": [
|
|
92
|
+
"quill",
|
|
93
|
+
"editor",
|
|
94
|
+
"rich text",
|
|
95
|
+
"wysiwyg",
|
|
96
|
+
"operational transformation",
|
|
97
|
+
"ot",
|
|
98
|
+
"framework"
|
|
99
|
+
],
|
|
100
|
+
"engines": {
|
|
101
|
+
"npm": ">=8.2.3"
|
|
102
|
+
},
|
|
103
|
+
"engineStrict": true
|
|
104
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const { dirname, resolve } = require('path');
|
|
3
|
+
const { optimize } = require('svgo');
|
|
4
|
+
|
|
5
|
+
module.exports = ({ types: t }) => {
|
|
6
|
+
class BabelSVGInlineImport {
|
|
7
|
+
constructor() {
|
|
8
|
+
return {
|
|
9
|
+
visitor: {
|
|
10
|
+
ImportDeclaration: {
|
|
11
|
+
exit(path, state) {
|
|
12
|
+
const givenPath = path.node.source.value;
|
|
13
|
+
if (!givenPath.endsWith('.svg')) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const specifier = path.node.specifiers[0];
|
|
17
|
+
const id = specifier.local.name;
|
|
18
|
+
const reference = state && state.file && state.file.opts.filename;
|
|
19
|
+
const absolutePath = resolve(dirname(reference), givenPath);
|
|
20
|
+
const content = optimize(
|
|
21
|
+
fs.readFileSync(absolutePath).toString(),
|
|
22
|
+
{ plugins: [] },
|
|
23
|
+
).data;
|
|
24
|
+
|
|
25
|
+
const variableValue = t.stringLiteral(content);
|
|
26
|
+
const variable = t.variableDeclarator(
|
|
27
|
+
t.identifier(id),
|
|
28
|
+
variableValue,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
path.replaceWith({
|
|
32
|
+
type: 'VariableDeclaration',
|
|
33
|
+
kind: 'const',
|
|
34
|
+
declarations: [variable],
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return new BabelSVGInlineImport();
|
|
44
|
+
};
|
package/scripts/build
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
DIST=dist
|
|
6
|
+
|
|
7
|
+
TMPDIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
|
|
8
|
+
npx tsc --declaration --emitDeclarationOnly --outDir $TMPDIR
|
|
9
|
+
|
|
10
|
+
rm -rf $DIST
|
|
11
|
+
mkdir $DIST
|
|
12
|
+
mv $TMPDIR/src/* $DIST
|
|
13
|
+
rm -rf $TMPDIR
|
|
14
|
+
npx babel src --out-dir $DIST --copy-files --no-copy-ignored --extensions .ts --source-maps
|
|
15
|
+
npx webpack -- --mode $1
|
|
16
|
+
# https://github.com/webpack-contrib/mini-css-extract-plugin/issues/151
|
|
17
|
+
rm -rf $DIST/dist/*.css.js $DIST/dist/*.css.js.*
|
|
18
|
+
cp package.json $DIST
|
|
19
|
+
cp README.md $DIST
|
|
20
|
+
cp LICENSE $DIST
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
// Styles shared between snow and bubble
|
|
2
|
+
|
|
3
|
+
controlHeight = 24px
|
|
4
|
+
inputPaddingWidth = 5px
|
|
5
|
+
inputPaddingHeight = 3px
|
|
6
|
+
|
|
7
|
+
colorItemMargin = 2px
|
|
8
|
+
colorItemSize = 16px
|
|
9
|
+
colorItemsPerRow = 7
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
.ql-{themeName}.ql-toolbar, .ql-{themeName} .ql-toolbar
|
|
13
|
+
&:after
|
|
14
|
+
clear: both
|
|
15
|
+
content: ''
|
|
16
|
+
display: table
|
|
17
|
+
|
|
18
|
+
button
|
|
19
|
+
background: none
|
|
20
|
+
border: none
|
|
21
|
+
cursor: pointer
|
|
22
|
+
display: inline-block
|
|
23
|
+
float: left
|
|
24
|
+
height: controlHeight
|
|
25
|
+
padding: inputPaddingHeight inputPaddingWidth
|
|
26
|
+
width: controlHeight + (inputPaddingWidth - inputPaddingHeight)*2
|
|
27
|
+
|
|
28
|
+
svg
|
|
29
|
+
float: left
|
|
30
|
+
height: 100%
|
|
31
|
+
|
|
32
|
+
&:active:hover
|
|
33
|
+
outline: none
|
|
34
|
+
|
|
35
|
+
input.ql-image[type=file]
|
|
36
|
+
display: none
|
|
37
|
+
|
|
38
|
+
button:hover, button:focus, button.ql-active,
|
|
39
|
+
.ql-picker-label:hover, .ql-picker-label.ql-active,
|
|
40
|
+
.ql-picker-item:hover, .ql-picker-item.ql-selected
|
|
41
|
+
color: activeColor
|
|
42
|
+
.ql-fill, .ql-stroke.ql-fill
|
|
43
|
+
fill: activeColor
|
|
44
|
+
.ql-stroke, .ql-stroke-miter
|
|
45
|
+
stroke: activeColor
|
|
46
|
+
|
|
47
|
+
// Fix for iOS not losing hover on touch
|
|
48
|
+
@media (pointer: coarse)
|
|
49
|
+
.ql-{themeName}.ql-toolbar, .ql-{themeName} .ql-toolbar
|
|
50
|
+
button:hover:not(.ql-active)
|
|
51
|
+
color: inactiveColor
|
|
52
|
+
.ql-fill, .ql-stroke.ql-fill
|
|
53
|
+
fill: inactiveColor
|
|
54
|
+
.ql-stroke, .ql-stroke-miter
|
|
55
|
+
stroke: inactiveColor
|
|
56
|
+
|
|
57
|
+
.ql-{themeName}
|
|
58
|
+
box-sizing: border-box
|
|
59
|
+
*
|
|
60
|
+
box-sizing: border-box
|
|
61
|
+
|
|
62
|
+
.ql-hidden
|
|
63
|
+
display: none
|
|
64
|
+
.ql-out-bottom, .ql-out-top
|
|
65
|
+
visibility: hidden
|
|
66
|
+
|
|
67
|
+
.ql-tooltip
|
|
68
|
+
position: absolute
|
|
69
|
+
transform: translateY(10px)
|
|
70
|
+
a
|
|
71
|
+
cursor: pointer
|
|
72
|
+
text-decoration: none
|
|
73
|
+
.ql-tooltip.ql-flip
|
|
74
|
+
transform: translateY(-10px)
|
|
75
|
+
|
|
76
|
+
.ql-formats
|
|
77
|
+
&:after
|
|
78
|
+
clear: both
|
|
79
|
+
content: ''
|
|
80
|
+
display: table
|
|
81
|
+
display: inline-block
|
|
82
|
+
vertical-align: middle
|
|
83
|
+
|
|
84
|
+
.ql-stroke
|
|
85
|
+
fill: none
|
|
86
|
+
stroke: inactiveColor
|
|
87
|
+
stroke-linecap: round
|
|
88
|
+
stroke-linejoin: round
|
|
89
|
+
stroke-width: 2
|
|
90
|
+
.ql-stroke-miter
|
|
91
|
+
fill: none
|
|
92
|
+
stroke: inactiveColor
|
|
93
|
+
stroke-miterlimit: 10
|
|
94
|
+
stroke-width: 2
|
|
95
|
+
|
|
96
|
+
.ql-fill, .ql-stroke.ql-fill
|
|
97
|
+
fill: inactiveColor
|
|
98
|
+
|
|
99
|
+
.ql-empty
|
|
100
|
+
fill: none
|
|
101
|
+
.ql-even
|
|
102
|
+
fill-rule: evenodd
|
|
103
|
+
.ql-thin, .ql-stroke.ql-thin
|
|
104
|
+
stroke-width: 1
|
|
105
|
+
.ql-transparent
|
|
106
|
+
opacity: 0.4
|
|
107
|
+
|
|
108
|
+
.ql-direction
|
|
109
|
+
svg:last-child
|
|
110
|
+
display: none
|
|
111
|
+
.ql-direction.ql-active
|
|
112
|
+
svg:last-child
|
|
113
|
+
display: inline
|
|
114
|
+
svg:first-child
|
|
115
|
+
display: none
|
|
116
|
+
|
|
117
|
+
.ql-editor
|
|
118
|
+
h1
|
|
119
|
+
font-size: 2em
|
|
120
|
+
h2
|
|
121
|
+
font-size: 1.5em
|
|
122
|
+
h3
|
|
123
|
+
font-size: 1.17em
|
|
124
|
+
h4
|
|
125
|
+
font-size: 1em
|
|
126
|
+
h5
|
|
127
|
+
font-size: 0.83em
|
|
128
|
+
h6
|
|
129
|
+
font-size: 0.67em
|
|
130
|
+
a
|
|
131
|
+
text-decoration: underline
|
|
132
|
+
blockquote
|
|
133
|
+
border-left: 4px solid #ccc
|
|
134
|
+
margin-bottom: 5px
|
|
135
|
+
margin-top: 5px
|
|
136
|
+
padding-left: 16px
|
|
137
|
+
code, .ql-code-block-container
|
|
138
|
+
background-color: #f0f0f0
|
|
139
|
+
border-radius: 3px
|
|
140
|
+
.ql-code-block-container
|
|
141
|
+
margin-bottom: 5px
|
|
142
|
+
margin-top: 5px
|
|
143
|
+
padding: 5px 10px
|
|
144
|
+
code
|
|
145
|
+
font-size: 85%
|
|
146
|
+
padding: 2px 4px
|
|
147
|
+
.ql-code-block-container
|
|
148
|
+
background-color: #23241f
|
|
149
|
+
color: #f8f8f2
|
|
150
|
+
overflow: visible
|
|
151
|
+
img
|
|
152
|
+
max-width: 100%
|
|
153
|
+
|
|
154
|
+
.ql-picker
|
|
155
|
+
color: inactiveColor
|
|
156
|
+
display: inline-block
|
|
157
|
+
float: left
|
|
158
|
+
font-size: 14px
|
|
159
|
+
font-weight: 500
|
|
160
|
+
height: controlHeight
|
|
161
|
+
position: relative
|
|
162
|
+
vertical-align: middle
|
|
163
|
+
.ql-picker-label
|
|
164
|
+
cursor: pointer
|
|
165
|
+
display: inline-block
|
|
166
|
+
height: 100%
|
|
167
|
+
padding-left: 8px
|
|
168
|
+
padding-right: 2px
|
|
169
|
+
position: relative
|
|
170
|
+
width: 100%
|
|
171
|
+
&::before
|
|
172
|
+
display: inline-block
|
|
173
|
+
line-height: 22px
|
|
174
|
+
.ql-picker-options
|
|
175
|
+
background-color: backgroundColor
|
|
176
|
+
display: none
|
|
177
|
+
min-width: 100%
|
|
178
|
+
padding: 4px 8px
|
|
179
|
+
position: absolute
|
|
180
|
+
white-space: nowrap
|
|
181
|
+
.ql-picker-item
|
|
182
|
+
cursor: pointer
|
|
183
|
+
display: block
|
|
184
|
+
padding-bottom: 5px
|
|
185
|
+
padding-top: 5px
|
|
186
|
+
.ql-picker.ql-expanded
|
|
187
|
+
.ql-picker-label
|
|
188
|
+
color: borderColor
|
|
189
|
+
z-index: 2
|
|
190
|
+
.ql-fill
|
|
191
|
+
fill: borderColor
|
|
192
|
+
.ql-stroke
|
|
193
|
+
stroke: borderColor
|
|
194
|
+
.ql-picker-options
|
|
195
|
+
display: block
|
|
196
|
+
margin-top: -1px
|
|
197
|
+
top: 100%
|
|
198
|
+
z-index: 1
|
|
199
|
+
|
|
200
|
+
.ql-color-picker, .ql-icon-picker
|
|
201
|
+
width: controlHeight + 4
|
|
202
|
+
.ql-picker-label
|
|
203
|
+
padding: 2px 4px
|
|
204
|
+
svg
|
|
205
|
+
right: 4px
|
|
206
|
+
.ql-icon-picker
|
|
207
|
+
.ql-picker-options
|
|
208
|
+
padding: 4px 0px
|
|
209
|
+
.ql-picker-item
|
|
210
|
+
height: controlHeight
|
|
211
|
+
width: controlHeight
|
|
212
|
+
padding: 2px 4px
|
|
213
|
+
.ql-color-picker
|
|
214
|
+
.ql-picker-options
|
|
215
|
+
padding: inputPaddingHeight inputPaddingWidth
|
|
216
|
+
width: (colorItemSize + 2*colorItemMargin) * colorItemsPerRow + 2*inputPaddingWidth + 2 // +2 for the border
|
|
217
|
+
.ql-picker-item
|
|
218
|
+
border: 1px solid transparent
|
|
219
|
+
float: left
|
|
220
|
+
height: colorItemSize
|
|
221
|
+
margin: colorItemMargin
|
|
222
|
+
padding: 0px
|
|
223
|
+
width: colorItemSize
|
|
224
|
+
|
|
225
|
+
.ql-picker:not(.ql-color-picker):not(.ql-icon-picker)
|
|
226
|
+
svg
|
|
227
|
+
position: absolute
|
|
228
|
+
margin-top: -9px
|
|
229
|
+
right: 0
|
|
230
|
+
top: 50%
|
|
231
|
+
width: 18px
|
|
232
|
+
|
|
233
|
+
.ql-picker.ql-header, .ql-picker.ql-font, .ql-picker.ql-size
|
|
234
|
+
.ql-picker-label[data-label]:not([data-label='']),
|
|
235
|
+
.ql-picker-item[data-label]:not([data-label=''])
|
|
236
|
+
&::before
|
|
237
|
+
content: attr(data-label)
|
|
238
|
+
|
|
239
|
+
.ql-picker.ql-header
|
|
240
|
+
width: 98px
|
|
241
|
+
.ql-picker-label::before,
|
|
242
|
+
.ql-picker-item::before
|
|
243
|
+
content: 'Normal'
|
|
244
|
+
for num in (1..6)
|
|
245
|
+
.ql-picker-label[data-value=\"{num}\"]::before,
|
|
246
|
+
.ql-picker-item[data-value=\"{num}\"]::before
|
|
247
|
+
content: 'Heading ' + num
|
|
248
|
+
.ql-picker-item[data-value="1"]::before
|
|
249
|
+
font-size: 2em
|
|
250
|
+
.ql-picker-item[data-value="2"]::before
|
|
251
|
+
font-size: 1.5em
|
|
252
|
+
.ql-picker-item[data-value="3"]::before
|
|
253
|
+
font-size: 1.17em
|
|
254
|
+
.ql-picker-item[data-value="4"]::before
|
|
255
|
+
font-size: 1em
|
|
256
|
+
.ql-picker-item[data-value="5"]::before
|
|
257
|
+
font-size: 0.83em
|
|
258
|
+
.ql-picker-item[data-value="6"]::before
|
|
259
|
+
font-size: 0.67em
|
|
260
|
+
|
|
261
|
+
.ql-picker.ql-font
|
|
262
|
+
width: 108px
|
|
263
|
+
.ql-picker-label::before,
|
|
264
|
+
.ql-picker-item::before
|
|
265
|
+
content: 'Sans Serif'
|
|
266
|
+
.ql-picker-label[data-value=serif]::before,
|
|
267
|
+
.ql-picker-item[data-value=serif]::before
|
|
268
|
+
content: 'Serif'
|
|
269
|
+
.ql-picker-label[data-value=monospace]::before,
|
|
270
|
+
.ql-picker-item[data-value=monospace]::before
|
|
271
|
+
content: 'Monospace'
|
|
272
|
+
.ql-picker-item[data-value=serif]::before
|
|
273
|
+
font-family: Georgia, Times New Roman, serif
|
|
274
|
+
.ql-picker-item[data-value=monospace]::before
|
|
275
|
+
font-family: Monaco, Courier New, monospace
|
|
276
|
+
|
|
277
|
+
.ql-picker.ql-size
|
|
278
|
+
width: 98px
|
|
279
|
+
.ql-picker-label::before,
|
|
280
|
+
.ql-picker-item::before
|
|
281
|
+
content: 'Normal'
|
|
282
|
+
.ql-picker-label[data-value=small]::before,
|
|
283
|
+
.ql-picker-item[data-value=small]::before
|
|
284
|
+
content: 'Small'
|
|
285
|
+
.ql-picker-label[data-value=large]::before,
|
|
286
|
+
.ql-picker-item[data-value=large]::before
|
|
287
|
+
content: 'Large'
|
|
288
|
+
.ql-picker-label[data-value=huge]::before,
|
|
289
|
+
.ql-picker-item[data-value=huge]::before
|
|
290
|
+
content: 'Huge'
|
|
291
|
+
.ql-picker-item[data-value=small]::before
|
|
292
|
+
font-size: 10px
|
|
293
|
+
.ql-picker-item[data-value=large]::before
|
|
294
|
+
font-size: 18px
|
|
295
|
+
.ql-picker-item[data-value=huge]::before
|
|
296
|
+
font-size: 32px
|
|
297
|
+
|
|
298
|
+
.ql-color-picker.ql-background
|
|
299
|
+
.ql-picker-item
|
|
300
|
+
background-color: #fff
|
|
301
|
+
.ql-color-picker.ql-color
|
|
302
|
+
.ql-picker-item
|
|
303
|
+
background-color: #000
|
|
304
|
+
|
|
305
|
+
.ql-code-block-container
|
|
306
|
+
position: relative
|
|
307
|
+
.ql-ui
|
|
308
|
+
right: 5px
|
|
309
|
+
top: 5px
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
arrowWidth = 6px
|
|
2
|
+
|
|
3
|
+
.ql-bubble
|
|
4
|
+
.ql-toolbar
|
|
5
|
+
.ql-formats
|
|
6
|
+
margin: 8px 12px 8px 0px
|
|
7
|
+
.ql-formats:first-child
|
|
8
|
+
margin-left: 12px
|
|
9
|
+
|
|
10
|
+
.ql-color-picker
|
|
11
|
+
svg
|
|
12
|
+
margin: 1px
|
|
13
|
+
.ql-picker-item.ql-selected, .ql-picker-item:hover
|
|
14
|
+
border-color: activeColor
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
arrowWidth = 6px
|
|
2
|
+
|
|
3
|
+
.ql-bubble
|
|
4
|
+
.ql-tooltip
|
|
5
|
+
background-color: backgroundColor
|
|
6
|
+
border-radius: 25px
|
|
7
|
+
color: textColor
|
|
8
|
+
.ql-tooltip-arrow
|
|
9
|
+
border-left: arrowWidth solid transparent
|
|
10
|
+
border-right: arrowWidth solid transparent
|
|
11
|
+
content: " "
|
|
12
|
+
display: block
|
|
13
|
+
left: 50%
|
|
14
|
+
margin-left: -1 * arrowWidth
|
|
15
|
+
position: absolute
|
|
16
|
+
.ql-tooltip:not(.ql-flip) .ql-tooltip-arrow
|
|
17
|
+
border-bottom: arrowWidth solid backgroundColor
|
|
18
|
+
top: -1 * arrowWidth
|
|
19
|
+
.ql-tooltip.ql-flip .ql-tooltip-arrow
|
|
20
|
+
border-top: arrowWidth solid backgroundColor
|
|
21
|
+
bottom: -1 * arrowWidth
|
|
22
|
+
|
|
23
|
+
.ql-tooltip.ql-editing
|
|
24
|
+
.ql-tooltip-editor
|
|
25
|
+
display: block
|
|
26
|
+
.ql-formats
|
|
27
|
+
visibility: hidden
|
|
28
|
+
|
|
29
|
+
.ql-tooltip-editor
|
|
30
|
+
display: none
|
|
31
|
+
input[type=text]
|
|
32
|
+
background: transparent
|
|
33
|
+
border: none
|
|
34
|
+
color: textColor
|
|
35
|
+
font-size: 13px
|
|
36
|
+
height: 100%
|
|
37
|
+
outline: none
|
|
38
|
+
padding: 10px 20px
|
|
39
|
+
position: absolute
|
|
40
|
+
width: 100%
|
|
41
|
+
a
|
|
42
|
+
&:before
|
|
43
|
+
color: inactiveColor
|
|
44
|
+
content: "\00D7"
|
|
45
|
+
font-size: 16px
|
|
46
|
+
font-weight: bold
|
|
47
|
+
top: 10px
|
|
48
|
+
position: absolute
|
|
49
|
+
right: 20px
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
themeName = 'bubble'
|
|
2
|
+
activeColor = #fff
|
|
3
|
+
borderColor = #777
|
|
4
|
+
backgroundColor = #444
|
|
5
|
+
inactiveColor = #ccc
|
|
6
|
+
shadowColor = #ddd
|
|
7
|
+
textColor = #fff
|
|
8
|
+
|
|
9
|
+
@import './core'
|
|
10
|
+
@import './base'
|
|
11
|
+
@import './bubble/*'
|
|
12
|
+
|
|
13
|
+
.ql-container.ql-bubble:not(.ql-disabled)
|
|
14
|
+
a:not(.ql-close)
|
|
15
|
+
position: relative
|
|
16
|
+
white-space: nowrap
|
|
17
|
+
a:not(.ql-close)::before
|
|
18
|
+
background-color: #444
|
|
19
|
+
border-radius: 15px
|
|
20
|
+
top: -5px
|
|
21
|
+
font-size: 12px
|
|
22
|
+
color: #fff
|
|
23
|
+
content: attr(href)
|
|
24
|
+
font-weight: normal
|
|
25
|
+
overflow: hidden
|
|
26
|
+
padding: 5px 15px
|
|
27
|
+
text-decoration: none
|
|
28
|
+
z-index: 1
|
|
29
|
+
a:not(.ql-close)::after
|
|
30
|
+
border-top: 6px solid #444
|
|
31
|
+
border-left: 6px solid transparent
|
|
32
|
+
border-right: 6px solid transparent
|
|
33
|
+
top: 0
|
|
34
|
+
content: " "
|
|
35
|
+
height: 0
|
|
36
|
+
width: 0
|
|
37
|
+
a:not(.ql-close)::before, a:not(.ql-close)::after
|
|
38
|
+
left: 0
|
|
39
|
+
margin-left: 50%
|
|
40
|
+
position: absolute
|
|
41
|
+
transform: translate(-50%, -100%)
|
|
42
|
+
transition: visibility 0s ease 200ms
|
|
43
|
+
visibility: hidden
|
|
44
|
+
a:not(.ql-close):hover::before, a:not(.ql-close):hover::after
|
|
45
|
+
visibility: visible
|