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

Refactor TinyMCEEditorField: support custom TinyMCE configuration #380

Merged
merged 19 commits into from
Jan 11, 2024

Conversation

hasansezertasan
Copy link
Contributor

@hasansezertasan hasansezertasan commented Nov 4, 2023

I'm not sure if my approach with config attribute is the right way to do it but its better than strict and its something...

TinyMCE is quite configurable: Here are some examples: TinyMCE 6 examples | TinyMCE Documentation

Copy link
Owner

@jowilf jowilf left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. I've added some comments; could you please review them?

starlette_admin/templates/forms/tinymce.html Outdated Show resolved Hide resolved
@hasansezertasan
Copy link
Contributor Author

@jowilf this and #379 follows the same pattern for "configuration". I removed unnecessary templates and used ".data()" to get the "data" attributes, instead of plain .attr() method.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d76582d) 100.00% compared to head (01fcc96) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #380   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           75        75           
  Lines         5767      5779   +12     
=========================================
+ Hits          5767      5779   +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jowilf jowilf changed the title Configurable TinyMCEEditorField Support custom TinyMCE configuration Jan 10, 2024
@hasansezertasan
Copy link
Contributor Author

The changes you made don't seem to break anything. I was being cautious with all "if-else" things but I think that's the developer's job to be careful about it now.

@jowilf jowilf changed the title Support custom TinyMCE configuration Refactor TinyMCEEditorField: support custom TinyMCE configuration Jan 11, 2024
@jowilf jowilf merged commit e97136e into jowilf:main Jan 11, 2024
6 checks passed
@hasansezertasan hasansezertasan deleted the TinyMCEEditorField branch January 11, 2024 04:33
@jowilf jowilf mentioned this pull request Jan 16, 2024
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.

None yet

2 participants