Skip to content

Commit 81f2e07

Browse files
committed
chore:cleanup code
1 parent 4c2f091 commit 81f2e07

5 files changed

Lines changed: 0 additions & 11 deletions

File tree

src/draftail_text_utils/models.py

Whitespace-only changes.

src/draftail_text_utils/rich_text/base.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
features, converter rules, and control plugins.
66
"""
77

8-
import re
98

109
from django.utils.html import json_script
1110
from wagtail.admin.rich_text.converters.html_to_contentstate import (
@@ -20,11 +19,6 @@
2019
)
2120

2221

23-
def camel_to_kebab(name):
24-
"""Convert a camelCase string to kebab-case."""
25-
return re.sub(r"(?<!^)(?=[A-Z])", "-", name).lower()
26-
27-
2822
def control_json_script(type_, label, description, icon, data=None):
2923
"""
3024
Returns a JSON script for a toolbar control plugin for Draftail.

src/draftail_text_utils/static/draftail_text_utils/js/font_size_entity.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
const STYLE_KEY = 'style';
1111
const DATASET_KEY = 'data-entity-type';
1212

13-
// Decorator: renders the entity's text inline in the editor
1413
const FontSizeDecorator = ({ children, contentState, entityKey }) => {
1514
const entity = contentState.getEntity(entityKey);
1615
const { size: fontSize } = entity.getData();

src/draftail_text_utils/static/draftail_text_utils/js/highlight_color_entity.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
const STYLE_KEY = 'style';
1111
const DATASET_KEY = 'data-entity-type';
1212

13-
// Decorator: renders the entity's text inline in the editor
1413
const HighlightColorDecorator = ({ children, contentState, entityKey }) => {
1514
const entity = contentState.getEntity(entityKey);
1615
const { backgroundColor: entityColor } = entity.getData();
@@ -28,7 +27,6 @@
2827
);
2928
};
3029

31-
// Source: immediately closes (the control handles the UI)
3230
const HighlightColorSource = ({ onClose }) => {
3331
onClose();
3432
return null;

src/draftail_text_utils/static/draftail_text_utils/js/text_color_entity.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
const STYLE_KEY = 'style';
1111
const DATASET_KEY = 'data-entity-type';
1212

13-
// Decorator: renders the entity's text inline in the editor
1413
const TextColorDecorator = ({ children, contentState, entityKey }) => {
1514
const entity = contentState.getEntity(entityKey);
1615
const { color: entityColor } = entity.getData();
@@ -27,7 +26,6 @@
2726
);
2827
};
2928

30-
// Source: immediately closes (the control handles the UI)
3129
const TextColorSource = ({ onClose }) => {
3230
onClose();
3331
return null;

0 commit comments

Comments
 (0)