@alpaca-editor/core 1.0.4018 → 1.0.4027
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/components/SimpleLanguageSelector.d.ts +2 -1
- package/dist/components/SimpleLanguageSelector.js +9 -2
- package/dist/components/SimpleLanguageSelector.js.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +3 -1
- package/dist/components/ui/tooltip.js +2 -2
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/config/config.js +4 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/editor/ContentTree.js +1 -1
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ContextMenu.js +26 -0
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/FieldHistory.js +1 -1
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldListField.js +2 -2
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/Terminal.js +3 -1
- package/dist/editor/Terminal.js.map +1 -1
- package/dist/editor/ai/Agents.js +37 -18
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/AiResponseMessage.js +71 -5
- package/dist/editor/ai/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/AiTerminal.d.ts +3 -1
- package/dist/editor/ai/AiTerminal.js +53 -24
- package/dist/editor/ai/AiTerminal.js.map +1 -1
- package/dist/editor/ai/AiToolCall.js +3 -3
- package/dist/editor/ai/AiToolCall.js.map +1 -1
- package/dist/editor/ai/EditorAiTerminal.d.ts +2 -1
- package/dist/editor/ai/EditorAiTerminal.js +2 -2
- package/dist/editor/ai/EditorAiTerminal.js.map +1 -1
- package/dist/editor/client/EditorClient.js +5 -1
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +2 -0
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/operations.d.ts +1 -0
- package/dist/editor/client/operations.js +7 -0
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +1 -1
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +1 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +1 -1
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +16 -17
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +1 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleDropdown.d.ts +18 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js +71 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +359 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.d.ts +16 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js +181 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.d.ts +9 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js +14 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +4 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js +193 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/index.d.ts +6 -5
- package/dist/editor/field-types/richtext/index.js +6 -5
- package/dist/editor/field-types/richtext/index.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +16 -16
- package/dist/editor/field-types/richtext/types.js +84 -84
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +5 -5
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +3 -2
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +14 -4
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +1 -0
- package/dist/editor/services/aiService.js +1 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/page-wizard/PageWizard.d.ts +2 -0
- package/dist/page-wizard/PageWizard.js +6 -13
- package/dist/page-wizard/PageWizard.js.map +1 -1
- package/dist/page-wizard/WizardSteps.js +3 -1
- package/dist/page-wizard/WizardSteps.js.map +1 -1
- package/dist/page-wizard/service.d.ts +1 -0
- package/dist/page-wizard/service.js +7 -0
- package/dist/page-wizard/service.js.map +1 -1
- package/dist/page-wizard/steps/ContentStep.js +210 -33
- package/dist/page-wizard/steps/ContentStep.js.map +1 -1
- package/dist/page-wizard/steps/FindItemsStep.js +11 -3
- package/dist/page-wizard/steps/FindItemsStep.js.map +1 -1
- package/dist/page-wizard/steps/LayoutStep.js +1 -1
- package/dist/page-wizard/steps/LayoutStep.js.map +1 -1
- package/dist/page-wizard/steps/MetaDataStep.js +1 -1
- package/dist/page-wizard/steps/MetaDataStep.js.map +1 -1
- package/dist/page-wizard/steps/SchottSelectImagesStep.d.ts +2 -0
- package/dist/page-wizard/steps/SchottSelectImagesStep.js +55 -0
- package/dist/page-wizard/steps/SchottSelectImagesStep.js.map +1 -0
- package/dist/page-wizard/steps/StructureStep.js +20 -5
- package/dist/page-wizard/steps/StructureStep.js.map +1 -1
- package/dist/page-wizard/steps/TranslateStep.d.ts +2 -0
- package/dist/page-wizard/steps/TranslateStep.js +413 -0
- package/dist/page-wizard/steps/TranslateStep.js.map +1 -0
- package/dist/page-wizard/utils/dataAccessor.d.ts +7 -0
- package/dist/page-wizard/utils/dataAccessor.js +76 -0
- package/dist/page-wizard/utils/dataAccessor.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/NewPage.js +5 -4
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/OpenPage.js +2 -1
- package/dist/splash-screen/OpenPage.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +3 -1
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/styles.css +57 -0
- package/package.json +5 -4
- package/src/components/SimpleLanguageSelector.tsx +11 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/tooltip.tsx +3 -2
- package/src/config/config.tsx +4 -0
- package/src/config/types.ts +6 -0
- package/src/editor/ContentTree.tsx +1 -1
- package/src/editor/ContextMenu.tsx +39 -0
- package/src/editor/FieldHistory.tsx +1 -1
- package/src/editor/FieldListField.tsx +2 -6
- package/src/editor/Terminal.tsx +5 -1
- package/src/editor/ai/Agents.tsx +90 -46
- package/src/editor/ai/AiResponseMessage.tsx +185 -24
- package/src/editor/ai/AiTerminal.tsx +104 -50
- package/src/editor/ai/AiToolCall.tsx +14 -4
- package/src/editor/ai/EditorAiTerminal.tsx +3 -0
- package/src/editor/client/EditorClient.tsx +9 -1
- package/src/editor/client/editContext.ts +2 -0
- package/src/editor/client/operations.ts +9 -0
- package/src/editor/commands/componentCommands.tsx +1 -1
- package/src/editor/field-types/ImageFieldEditor.tsx +1 -0
- package/src/editor/field-types/MultiLineText.tsx +1 -0
- package/src/editor/field-types/PictureFieldEditor.tsx +1 -0
- package/src/editor/field-types/RawEditor.tsx +1 -0
- package/src/editor/field-types/RichTextEditorComponent.tsx +27 -25
- package/src/editor/field-types/SingleLineText.tsx +1 -0
- package/src/editor/field-types/richtext/components/SimpleDropdown.tsx +165 -0
- package/src/editor/field-types/richtext/components/SimpleRichTextEditor.css +261 -0
- package/src/editor/field-types/richtext/components/SimpleRichTextEditor.tsx +505 -0
- package/src/editor/field-types/richtext/components/SimpleToolbar.tsx +362 -0
- package/src/editor/field-types/richtext/components/SimpleToolbarButton.tsx +36 -0
- package/src/editor/field-types/richtext/contextMenuFactory.tsx +264 -0
- package/src/editor/field-types/richtext/index.ts +6 -5
- package/src/editor/field-types/richtext/types.ts +168 -148
- package/src/editor/page-editor-chrome/CommentHighlighting.tsx +1 -1
- package/src/editor/page-editor-chrome/FrameMenu.tsx +16 -11
- package/src/editor/page-editor-chrome/PlaceholderDropZone.tsx +1 -1
- package/src/editor/page-viewer/PageViewerFrame.tsx +4 -3
- package/src/editor/services/agentService.ts +16 -5
- package/src/editor/services/aiService.ts +4 -0
- package/src/page-wizard/PageWizard.tsx +10 -13
- package/src/page-wizard/WizardSteps.tsx +3 -1
- package/src/page-wizard/service.ts +11 -0
- package/src/page-wizard/steps/ContentStep.tsx +376 -43
- package/src/page-wizard/steps/FindItemsStep.tsx +23 -3
- package/src/page-wizard/steps/LayoutStep.tsx +1 -1
- package/src/page-wizard/steps/MetaDataStep.tsx +1 -1
- package/src/page-wizard/steps/SchottSelectImagesStep.tsx +141 -0
- package/src/page-wizard/steps/StructureStep.tsx +40 -5
- package/src/page-wizard/steps/TranslateStep.tsx +772 -0
- package/src/page-wizard/utils/dataAccessor.ts +85 -0
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +18 -3
- package/src/splash-screen/OpenPage.tsx +14 -1
- package/src/splash-screen/RecentPages.tsx +4 -2
- package/tsconfig.build.json +1 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
2
|
+
|
|
3
|
+
interface DropdownOption {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
onSelect: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface SimpleDropdownProps {
|
|
13
|
+
options: DropdownOption[];
|
|
14
|
+
label?: string;
|
|
15
|
+
showIconsOnly?: boolean;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
title?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const SimpleDropdown: React.FC<SimpleDropdownProps> = ({
|
|
21
|
+
options,
|
|
22
|
+
label,
|
|
23
|
+
showIconsOnly,
|
|
24
|
+
isActive,
|
|
25
|
+
title,
|
|
26
|
+
}) => {
|
|
27
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
28
|
+
const dropdownRef = useRef<HTMLDivElement>(null);
|
|
29
|
+
|
|
30
|
+
// Close dropdown when clicking outside
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
33
|
+
if (
|
|
34
|
+
dropdownRef.current &&
|
|
35
|
+
!dropdownRef.current.contains(event.target as Node)
|
|
36
|
+
) {
|
|
37
|
+
setIsOpen(false);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
42
|
+
return () => {
|
|
43
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
47
|
+
const activeOption = options.find((option) => option.isActive);
|
|
48
|
+
const displayOption = activeOption || options[0];
|
|
49
|
+
|
|
50
|
+
const handleToggle = (event: React.MouseEvent) => {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
setIsOpen(!isOpen);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const handleOptionSelect = (option: DropdownOption) => {
|
|
56
|
+
option.onSelect();
|
|
57
|
+
setIsOpen(false);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<div className="simple-dropdown" ref={dropdownRef}>
|
|
62
|
+
<button
|
|
63
|
+
className={`toolbar-dropdown-button ${isActive ? "active" : ""}`}
|
|
64
|
+
onMouseDown={handleToggle}
|
|
65
|
+
title={title || `${label || "Format"} options`}
|
|
66
|
+
style={{
|
|
67
|
+
padding: "5px 10px",
|
|
68
|
+
margin: "0",
|
|
69
|
+
background: isActive ? "#ffffff" : "transparent",
|
|
70
|
+
border: "none",
|
|
71
|
+
borderRadius: "3px",
|
|
72
|
+
cursor: "pointer",
|
|
73
|
+
boxShadow: isActive ? "0 1px 2px rgba(0,0,0,0.1)" : "none",
|
|
74
|
+
display: "flex",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
minWidth: "120px",
|
|
77
|
+
justifyContent: "space-between",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{label ? (
|
|
81
|
+
<>
|
|
82
|
+
<span className="toolbar-dropdown-content">
|
|
83
|
+
{label}: {displayOption?.label}
|
|
84
|
+
</span>
|
|
85
|
+
<span className="toolbar-dropdown-arrow">▼</span>
|
|
86
|
+
</>
|
|
87
|
+
) : showIconsOnly ? (
|
|
88
|
+
<>
|
|
89
|
+
<span className="toolbar-dropdown-icon">{displayOption?.icon}</span>
|
|
90
|
+
<span className="toolbar-dropdown-arrow">▼</span>
|
|
91
|
+
</>
|
|
92
|
+
) : (
|
|
93
|
+
<>
|
|
94
|
+
<span className="toolbar-dropdown-icon">
|
|
95
|
+
{displayOption?.icon && (
|
|
96
|
+
<span className="toolbar-dropdown-icon">
|
|
97
|
+
{displayOption.icon}
|
|
98
|
+
</span>
|
|
99
|
+
)}
|
|
100
|
+
<span className="toolbar-dropdown-content">
|
|
101
|
+
{displayOption?.label}
|
|
102
|
+
</span>
|
|
103
|
+
</span>
|
|
104
|
+
<span className="toolbar-dropdown-arrow">▼</span>
|
|
105
|
+
</>
|
|
106
|
+
)}
|
|
107
|
+
</button>
|
|
108
|
+
|
|
109
|
+
{isOpen && (
|
|
110
|
+
<div
|
|
111
|
+
className="dropdown-menu"
|
|
112
|
+
style={{
|
|
113
|
+
position: "absolute",
|
|
114
|
+
top: "100%",
|
|
115
|
+
left: 0,
|
|
116
|
+
background: "white",
|
|
117
|
+
border: "1px solid #ddd",
|
|
118
|
+
borderRadius: "3px",
|
|
119
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
|
|
120
|
+
zIndex: 1000,
|
|
121
|
+
minWidth: "120px",
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
{options.map((option) => (
|
|
125
|
+
<button
|
|
126
|
+
key={`${option.type}-${option.id}`}
|
|
127
|
+
className={`dropdown-item ${option.isActive ? "active" : ""}`}
|
|
128
|
+
onClick={() => handleOptionSelect(option)}
|
|
129
|
+
style={{
|
|
130
|
+
display: "flex",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
width: "100%",
|
|
133
|
+
padding: "8px 12px",
|
|
134
|
+
border: "none",
|
|
135
|
+
background: option.isActive ? "#f0f0f0" : "transparent",
|
|
136
|
+
cursor: "pointer",
|
|
137
|
+
textAlign: "left",
|
|
138
|
+
}}
|
|
139
|
+
onMouseEnter={(e) => {
|
|
140
|
+
if (!option.isActive) {
|
|
141
|
+
(e.target as HTMLElement).style.background = "#f8f8f8";
|
|
142
|
+
}
|
|
143
|
+
}}
|
|
144
|
+
onMouseLeave={(e) => {
|
|
145
|
+
if (!option.isActive) {
|
|
146
|
+
(e.target as HTMLElement).style.background = "transparent";
|
|
147
|
+
}
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
<span
|
|
151
|
+
className="dropdown-item-icon"
|
|
152
|
+
style={{ marginRight: "8px" }}
|
|
153
|
+
>
|
|
154
|
+
{option.icon}
|
|
155
|
+
</span>
|
|
156
|
+
<span className="dropdown-item-label">{option.label}</span>
|
|
157
|
+
</button>
|
|
158
|
+
))}
|
|
159
|
+
</div>
|
|
160
|
+
)}
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export default SimpleDropdown;
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/* SimpleRichTextEditor Styles */
|
|
2
|
+
|
|
3
|
+
/* Main editor container */
|
|
4
|
+
.simple-rich-text-editor {
|
|
5
|
+
/* Base styles for the editor */
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Editor content area */
|
|
9
|
+
.simple-editor-content {
|
|
10
|
+
border: 1px solid #ddd;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.simple-editor-content:focus {
|
|
16
|
+
outline: none;
|
|
17
|
+
border-color: #007bff;
|
|
18
|
+
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.simple-editor-content:empty:before {
|
|
22
|
+
content: attr(data-placeholder);
|
|
23
|
+
color: #999;
|
|
24
|
+
font-style: italic;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Toolbar styles - reusing existing Slate toolbar styles */
|
|
29
|
+
.simple-rich-text-editor .toolbar {
|
|
30
|
+
padding: 6px;
|
|
31
|
+
margin-bottom: 6px;
|
|
32
|
+
border-bottom: 1px solid #ddd;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
gap: 8px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.simple-rich-text-editor .toolbar-row {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 8px;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.simple-rich-text-editor .toolbar-group {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 2px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.simple-rich-text-editor .toolbar-button-group {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 2px;
|
|
55
|
+
background-color: #f5f5f5;
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
padding: 2px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.simple-rich-text-editor .toolbar-dropdown-container {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
background-color: #f5f5f5;
|
|
63
|
+
border-radius: 4px;
|
|
64
|
+
padding: 2px;
|
|
65
|
+
position: relative;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.simple-rich-text-editor .toolbar-dropdown-button {
|
|
69
|
+
padding: 5px 10px;
|
|
70
|
+
margin: 0;
|
|
71
|
+
border: none;
|
|
72
|
+
border-radius: 3px;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
min-width: 120px;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.simple-rich-text-editor .toolbar-dropdown-button:not(:disabled) {
|
|
81
|
+
background: transparent;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.simple-rich-text-editor .toolbar-dropdown-button:not(:disabled):hover {
|
|
85
|
+
background: rgba(0, 0, 0, 0.05);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.simple-rich-text-editor .toolbar-dropdown-button.active {
|
|
89
|
+
background: #ffffff;
|
|
90
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.simple-rich-text-editor .toolbar-dropdown-button:disabled {
|
|
94
|
+
background: transparent;
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
opacity: 0.6;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.simple-rich-text-editor .toolbar-dropdown-arrow {
|
|
100
|
+
margin-left: 5px;
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.simple-rich-text-editor .toolbar-dropdown-content {
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.simple-rich-text-editor .toolbar-dropdown-icon {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
margin-right: 8px;
|
|
114
|
+
flex-shrink: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Dropdown menu styles */
|
|
118
|
+
.simple-dropdown {
|
|
119
|
+
position: relative;
|
|
120
|
+
display: inline-block;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.dropdown-menu {
|
|
124
|
+
z-index: 1000;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dropdown-item {
|
|
128
|
+
transition: background-color 0.15s ease;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.dropdown-item:hover {
|
|
132
|
+
background-color: #f8f8f8 !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dropdown-item.active {
|
|
136
|
+
background-color: #f0f0f0 !important;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Special mark styles */
|
|
140
|
+
.simple-editor-content .extrabold {
|
|
141
|
+
font-weight: 800;
|
|
142
|
+
text-transform: uppercase;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* List styles */
|
|
146
|
+
.simple-editor-content ul,
|
|
147
|
+
.simple-editor-content ol {
|
|
148
|
+
margin: 0.5em 0;
|
|
149
|
+
padding-left: 2em;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.simple-editor-content ul {
|
|
153
|
+
list-style-type: disc;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.simple-editor-content ol {
|
|
157
|
+
list-style-type: decimal;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.simple-editor-content li {
|
|
161
|
+
margin: 0.25em 0;
|
|
162
|
+
display: list-item;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Nested list styles */
|
|
166
|
+
.simple-editor-content ul ul {
|
|
167
|
+
list-style-type: circle;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.simple-editor-content ul ul ul {
|
|
171
|
+
list-style-type: square;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.simple-editor-content ol ol {
|
|
175
|
+
list-style-type: lower-alpha;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.simple-editor-content ol ol ol {
|
|
179
|
+
list-style-type: lower-roman;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Block element spacing */
|
|
183
|
+
.simple-editor-content p,
|
|
184
|
+
.simple-editor-content h1,
|
|
185
|
+
.simple-editor-content h2,
|
|
186
|
+
.simple-editor-content h3,
|
|
187
|
+
.simple-editor-content h4,
|
|
188
|
+
.simple-editor-content h5,
|
|
189
|
+
.simple-editor-content h6 {
|
|
190
|
+
margin: 0.5em 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.simple-editor-content h1 {
|
|
194
|
+
font-size: 2em;
|
|
195
|
+
font-weight: bold;
|
|
196
|
+
}
|
|
197
|
+
.simple-editor-content h2 {
|
|
198
|
+
font-size: 1.75em;
|
|
199
|
+
font-weight: bold;
|
|
200
|
+
}
|
|
201
|
+
.simple-editor-content h3 {
|
|
202
|
+
font-size: 1.5em;
|
|
203
|
+
font-weight: bold;
|
|
204
|
+
}
|
|
205
|
+
.simple-editor-content h4 {
|
|
206
|
+
font-size: 1.25em;
|
|
207
|
+
font-weight: bold;
|
|
208
|
+
}
|
|
209
|
+
.simple-editor-content h5 {
|
|
210
|
+
font-size: 1.1em;
|
|
211
|
+
font-weight: bold;
|
|
212
|
+
}
|
|
213
|
+
.simple-editor-content h6 {
|
|
214
|
+
font-size: 1em;
|
|
215
|
+
font-weight: bold;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* First and last element margin reset */
|
|
219
|
+
.simple-editor-content > *:first-child {
|
|
220
|
+
margin-top: 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.simple-editor-content > *:last-child {
|
|
224
|
+
margin-bottom: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Enhanced tooltip styles */
|
|
228
|
+
.toolbar-button,
|
|
229
|
+
.toolbar-dropdown-button {
|
|
230
|
+
position: relative;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.toolbar-button[title]:hover::after,
|
|
234
|
+
.toolbar-dropdown-button[title]:hover::after {
|
|
235
|
+
content: attr(title);
|
|
236
|
+
position: absolute;
|
|
237
|
+
bottom: -35px;
|
|
238
|
+
left: 50%;
|
|
239
|
+
transform: translateX(-50%);
|
|
240
|
+
background: rgba(0, 0, 0, 0.9);
|
|
241
|
+
color: white;
|
|
242
|
+
padding: 6px 8px;
|
|
243
|
+
border-radius: 4px;
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
white-space: nowrap;
|
|
246
|
+
z-index: 1000;
|
|
247
|
+
pointer-events: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.toolbar-button[title]:hover::before,
|
|
251
|
+
.toolbar-dropdown-button[title]:hover::before {
|
|
252
|
+
content: "";
|
|
253
|
+
position: absolute;
|
|
254
|
+
bottom: -8px;
|
|
255
|
+
left: 50%;
|
|
256
|
+
transform: translateX(-50%);
|
|
257
|
+
border: 4px solid transparent;
|
|
258
|
+
border-bottom-color: rgba(0, 0, 0, 0.9);
|
|
259
|
+
z-index: 1000;
|
|
260
|
+
pointer-events: none;
|
|
261
|
+
}
|