Juergen Posted May 19, 2015 Share Posted May 19, 2015 Hello @ all, I want to manipulate the markup of images added via the editor. In this case I have 2 possibilities: 1) To create a textformatter module or 2) to manipulate the output via jQuery General question: Will be the markup from a textformatter module cached or will it be created on runtime like jQuery? I prefer cacheable content so if it will be cachable I would tend to create a module instead of jQuery manipulation. Thanks in advance for your help. Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 19, 2015 Share Posted May 19, 2015 It works like this: Add image to ckeditor (markup pasted in from plugin) Potential jQuery stuff happens on the ckeditor Markup is saved to database as it's in the editor Markup is loaded for frontend access from the database Potential textformatters are applied at runtime by php (cacheable by markupcache) Markup is send to the user Potential jQuery stuff happens (frontend) In 1, 2, 5 and 7 are the common places where you could bring in your custom logic. Which one you take depends on the use case. 1 Link to comment Share on other sites More sharing options...
Juergen Posted May 19, 2015 Author Share Posted May 19, 2015 Thanks !!! Point 5 seems very interesting to me. Another possibility would be to copy the pwimage plugin, rename it, adapt the markup and use this instead of the original image plugin. In this case the markup will be stored in the database exactly the way that it is visible in the editor - no textformatter or jQuery manipulation necessary. Mhh, I am struggle within. I will think over. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now