Jump to content

Textformatter module and cache


Recommended Posts

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

It works like this: 

  1. Add image to ckeditor (markup pasted in from plugin)
  2. Potential jQuery stuff happens on the ckeditor
  3. Markup is saved to database as it's in the editor
  4. Markup is loaded for frontend access from the database
  5. Potential textformatters are applied at runtime by php (cacheable by markupcache)
  6. Markup is send to the user
  7. 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.

  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...