Implement professional smart formatting with toggle logic and whitespace preservation

This commit is contained in:
2025-09-21 21:55:08 +02:00
parent d44bdd41b4
commit 0cfce1c95a
8 changed files with 1304 additions and 289 deletions

View File

@@ -442,6 +442,36 @@ body:not(.insertr-edit-mode) .insertr-editing-hover::after {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* Active/applied formatting state - shows current selection has this formatting */
.insertr-style-btn.insertr-style-active {
background: var(--insertr-primary);
border-color: var(--insertr-primary);
color: white;
box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}
.insertr-style-btn.insertr-style-active .insertr-preview-content {
color: white;
}
.insertr-style-btn.insertr-style-active:hover {
background: var(--insertr-primary-hover);
border-color: var(--insertr-primary-hover);
transform: none;
}
/* Active state for default style buttons */
.insertr-style-btn.insertr-default-style.insertr-style-active {
background: var(--insertr-info);
border-color: var(--insertr-info);
color: white;
box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}
.insertr-style-btn.insertr-default-style.insertr-style-active .insertr-preview-content {
color: white;
}
/* Default formatting style buttons */
.insertr-style-btn.insertr-default-style {
border-color: var(--insertr-info);