Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions frontend/src/components/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function EditorCanvas({
handleDragOver,
handleDragLeave,
handleEditorClick
const [lineSpacing, setLineSpacing] = useState(1.5); // default line spacing e.g. 1.5

}) {
return (
<div className="editor-body">
Expand Down Expand Up @@ -51,6 +53,24 @@ function EditorCanvas({
onClick={handleEditorClick}
/>
</div>
<label>
Line Spacing:
<input
type="number"
min="1"
max="3"
step="0.1"
value={lineSpacing}
onChange={(e) => setLineSpacing(parseFloat(e.target.value))}
/>
</label>
<div
contentEditable
style={{ lineHeight: lineSpacing }}
>
{content}
</div>

</div>
);
}
Expand Down