-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected behaviour when editing a paragraph containing an image.
- Loading branch information
1 parent
6438d6d
commit d623417
Showing
8 changed files
with
220 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(uiop:define-package #:reblocks-text-editor/blocks/placeholder | ||
(:use #:cl) | ||
(:import-from #:common-doc | ||
#:define-node)) | ||
(in-package #:reblocks-text-editor/blocks/placeholder) | ||
|
||
|
||
(define-node placeholder (common-doc:document-node) | ||
() | ||
(:tag-name "placeholder") | ||
(:documentation "This node will be replaced by a real one with the same reference.")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(uiop:define-package #:reblocks-text-editor/html/image | ||
(:use #:cl) | ||
(:import-from #:reblocks-text-editor/html | ||
#:to-html | ||
#:html-class)) | ||
(in-package #:reblocks-text-editor/html/image) | ||
|
||
|
||
(defmethod to-html ((node common-doc:image)) | ||
(reblocks/html:with-html | ||
(let ((classes (remove nil | ||
(list "noneditable" | ||
(html-class node))))) | ||
(:img :id (common-doc:reference node) | ||
:class (format nil "~{~A~^ ~}" | ||
classes) | ||
:src (when (slot-boundp node 'common-doc:source) | ||
(common-doc:source node)) | ||
:title (when (slot-boundp node 'common-doc:description) | ||
(common-doc:description node)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters