Git Product home page Git Product logo

Comments (6)

CptMeatball avatar CptMeatball commented on May 31, 2024

What would be the direct advantage of this change? You can see the image in the media folder, but you can't do anything with it without breaking the front-end (apart from overwriting it).

from contenteditor-plugin.

 avatar commented on May 31, 2024

The benefit is that's a better practice for the october CMS as it's the recommanded way to get the image path. For example if, for some reason, you have to change the path of your media directory, you don't need to change the "src" attributes of all your images, instead, you work on the media variable of october CMS.

In addition, it can prepare the images to be extended, for example with the image resizer plugin that works as a twif filter. If the contenteditor plugin can't understand mustache tags, that possibility can be forget definitively.

So I think there are plenty advantages to use october syntax for images.

from contenteditor-plugin.

Samuell1 avatar Samuell1 commented on May 31, 2024

I think, it can be possible but image cant be rendered because, that media tag needs to be parsed with php not js, you can see only empty image without nothing

from contenteditor-plugin.

 avatar commented on May 31, 2024

Maybe the contenteditor plugin can globally register the path of october media tag and make it available in javascript.

The same way you define the contenteditor default media folder in backend, that variable is not registered in JS, but it can be accessed by contenteditor js plugin when it need to upload an image.

from contenteditor-plugin.

Samuell1 avatar Samuell1 commented on May 31, 2024

Register default media folder is something other then this. {{ '/folderpath/dummy.png'|media }} this needs to be parsed with php template system TWIG, but you cant parse php on frontend

from contenteditor-plugin.

CptMeatball avatar CptMeatball commented on May 31, 2024

The Media Manager isn't accessible on the front-end (AFAIK), so there is no clean way to implement this feature I think.

from contenteditor-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.