Comments (4)
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.
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.
ContentFlows sounds great, is it still planned?
from contenttools.
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)
- Save issue - saves fine, but won't allow a second "save" HOT 5
- Making CT compatible with CSP style-src set to 'self'
- Can't edit files that were included or read by php HOT 17
- Edit multiple paragraphs at once. HOT 2
- Is there a way to change the default tag output for normal html tags HOT 2
- Missing translation in /src/scripts/ui/dialogs/table.coffee
- Problem update image classes HOT 5
- Build files to use dynamic import in pure javascript HOT 1
- How to use assign ? HOT 2
- Hot to keep style attributes on save.
- Support for Sass >= 1.33 HOT 11
- npm install failed HOT 2
- Feature: Support drag & drop of images
- The image uploader HOT 2
- Inspector bar doesn't show embedded HTML elements when wrapped with paragraph HOT 1
- Line breaks not saving
- Add class to a link
- Lazy loading of images
- Source code edit? Insert <script> tag HOT 3
- The part in italics is not the right one HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contenttools.