-
Notifications
You must be signed in to change notification settings - Fork 93
Add Edit In Place functionnality #23
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I think it looks good. Let's just do some more of those things listed as TODO on this PR and I'll be happy to merge.
|
||
public function checkRequest(Request $request = null) | ||
{ | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a TODO
here so we do not forget.
This could not be done in a Twig Extension because TwigBundle have some hard coded FQN in the compiler. So now we have: - a Twig extension to mark filters as HTML safe - a Translator injected in the trans extension which output HTML
bff760f
to
7b78f3c
Compare
1f66fc6
to
498e0a8
Compare
498e0a8
to
426f281
Compare
@Nyholm Ready for review! I will also create issues for some issues and todo I left there, And I'm sending the documentation PR today 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. It looks great.
While reading the changes Im starting to consider moving some classes to a library... But Im not sure. We can talk about that later. I'll merge this for now. Really good job!
This PR adds Edit In Place to any page on a Symfony project. This is highly experimental⚠️ but.. it's awesome 😋
The JavaScript part is based on the excellent ContentTools lib, v1.3.1 by Anthony Blackshaw, very well written and using a real ContentEditable attribute, which is very elegant.
Demo
TODO
There is still a lot of stuffs to do:
[ ] all the links when editing should have the token added for easy navigation. Also maybe an URL token is NOT the best way to handle enabling / disabling the editor.html
in the key name, pop the HTML editor?)[ ] maybe support PHP templating too?Cheers