Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to CKEditor #453

Merged
merged 45 commits into from
Jun 6, 2024
Merged

Switch to CKEditor #453

merged 45 commits into from
Jun 6, 2024

Conversation

tcouch
Copy link
Collaborator

@tcouch tcouch commented May 13, 2024

closes #423 and #452
related to #433 , may have resolved it since it caches now

Trying CKEditor as a fix for Quill's broken mention plugin (plus the weird pasting behaviour too hopefully)

@tcouch tcouch marked this pull request as ready for review May 30, 2024 13:08
src/rard/research/forms.py Outdated Show resolved Hide resolved
@tcouch
Copy link
Collaborator Author

tcouch commented May 31, 2024

It just occurred to me that the html for existing footnotes won't be compatible with the new footnotes style. We'll need to write a migration to convert them.

@tcouch
Copy link
Collaborator Author

tcouch commented May 31, 2024

The introduction on WorkForm and BookForm needs to have the editor enabled.

@tcouch
Copy link
Collaborator Author

tcouch commented May 31, 2024

Public commentary inline edit form needs to have its editor enabled

@tcouch
Copy link
Collaborator Author

tcouch commented May 31, 2024

Commentary apparatus criticus mentions aren't working if there are two original texts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicate_fragment view function is massive. Most of the logic should probably be split out into utils and possible divided into a few smaller functions.

Copy link
Collaborator

@acholyn acholyn Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have opened #455 to address this in a later PR as another PR currently updates the logic

@acholyn
Copy link
Collaborator

acholyn commented May 31, 2024

The introduction on WorkForm and BookForm needs to have the editor enabled.

do they not use the IntroductionFormBase? Do I also need to enable it on the AntiquarianCreateForm as well?

@acholyn
Copy link
Collaborator

acholyn commented May 31, 2024

Public commentary inline edit form needs to have its editor enabled

self.fields["commentary_text"].widget.attrs["class"] = "enableCKEditor"

is this in the wrong place?

@tcouch
Copy link
Collaborator Author

tcouch commented May 31, 2024

The introduction on WorkForm and BookForm needs to have the editor enabled.

do they not use the IntroductionFormBase? Do I also need to enable it on the AntiquarianCreateForm as well?

Apparently not - it's the form you get when you create a new work or book as opposed to editing them once they're created. And yes looks like AntiquarianCreateForm also needs it.

@tcouch
Copy link
Collaborator Author

tcouch commented May 31, 2024

Public commentary inline edit form needs to have its editor enabled

self.fields["commentary_text"].widget.attrs["class"] = "enableCKEditor"

is this in the wrong place?

Pushed a fix: I think the problem was it was inside an if block that didn't always get executed. Copied the approach used for CommentaryFormBase instead.

@acholyn acholyn requested a review from cdinu June 3, 2024 14:05
@tcouch
Copy link
Collaborator Author

tcouch commented Jun 4, 2024

The create forms for Works and Antiquarians (/work/create/ and antiquarian/create/) need to have their editors enabled.

@acholyn acholyn merged commit 3d08d5f into development Jun 6, 2024
5 checks passed
@acholyn acholyn deleted the fix/mentions-preventing-tofs branch June 6, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with pasting into text editor triggering footnote section via carriage returns
2 participants