Code Monkey home page Code Monkey logo

Comments (4)

anthonyjb avatar anthonyjb commented on August 18, 2024 1

Hi @fernandofranca, so I understand what you're attempting to do but I don't recommend this approach. Whilst it's possible, longer term I want to solve this type of problem in a different way. Instead of creating more complex editable elements the idea is to introduce the concept of flows and templates.

Flows will allow users to add new sections of predefined HTML (templates) to an existing HTML document. Templates can contain regions and therefore will allow the structure not just the content of the page to be edited, your example would therefore be converted to a template along the lines of:

<div class="panel panel-default" data-flow="well">
    <div class="panel-heading" data-editable="region-#?#">
        <h3 class="panel-title">Panel title</h3>
    </div>
    <div class="panel-body" data-editable="region-#?#">
        <p>Panel content</p>
    </div>
</div>

#?# or something similar will be replaced automatically with a unique name for the region.

The idea of using flows isn't original there's a number of in-context editors that take this approach, but I want it to be an optional extension to the library (probably named ContentFlows or similar) not a requirement. This is very much just a set of notes at the moment I have nothing concrete started but I wanted to let you know what the intention is moving forward.

Of course if you need to do this short term then you may need to settle on using a complex editable element instead in the mean time - I believe @bfintal has had some luck in doing this, if he has the time perhaps he might be able to provide a concrete example.

from contenttools.

fernandofranca avatar fernandofranca commented on August 18, 2024 1

Thanks for your careful response, Anthony!
It's nice to know that are intentions to improve ContentTools even more. It is quite promising.

I've tried to improvise a hacky approach by appending DOM elements by force, but without a deeper knowledge of the library it ends up breaking a lot of functionalities.

Thanks!!!

from contenttools.

Morganjackson avatar Morganjackson commented on August 18, 2024

ContentFlows sounds great, is it still planned?

from contenttools.

anthonyjb avatar anthonyjb commented on August 18, 2024

Hi @Morganjackson,

Yes support for adding dynamic editable regions (a la ContentFlows) is still very much on the board. We're currently working on a new web development framework/CMS (open source) which we're hoping to launch early-mid 2017, supporting for dynamic editable regions is (along with a number of other features) planned for the initial release of that project.

from contenttools.

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.