Comments (5)
Hey,
thank you for your report. This totally makes sense but we are not likely to extend String.substitute in MooTools Core. The version in MooTools Core is intended for minor use cases only.
If you can think of a proper Template Class or similar and want to build it, we are more than happy to add it to MooTools More :)
from mootools-core.
Hi again,
I built one, how do I share with Mootools team to see if it can be accepted in More?
from mootools-core.
Either here: https://github.com/mootools/mootools-more
or on the Mailing List: https://groups.google.com/forum/#!forum/mootools-users
I think it would be better to show it with demos etc. on the mailing list so we can discuss it. Note that what I have in mind is supposed to be a fully featured template engine and not just simple text-replace.
from mootools-core.
Thanks, I will organize my code and examples and post them for discussions.
What I have is more than extending substitute, I have a class that extract HTML from the page or take an element constructed with new Element(), and use it as a template, fill it using an object or array, and insert the result back as many times as needed, it's also smart enough to know if the object used as a data source is an array and insert multiple one for each element say to fill a list.
I also added an in-element template, something that looks for an expression/word in side an element and surround it with a template, to be used for example as highlighter.
I hope it will be good enough to be added to More as a thank you Mootools contribution.
from mootools-core.
Hay, Have a look at this, I will post it in Mootools More too!
http://allochi.wordpress.com/2011/08/19/mootools-html-templates/
from mootools-core.
Related Issues (20)
- Request/Request.HTML execute non-javascript <script> tags as Javascript HOT 1
- Update Array.prototype.flatten to match TC39 proposal HOT 13
- Deprecate MooTools? HOT 9
- creating 404 error for video preroll ad on adding just library. HOT 8
- Change this repo title to HTTPS HOT 7
- Conflict with ecmascript Map HOT 2
- Mootools + Google Maps V3 conflict issue causing google streetview not working. HOT 9
- Object.merge deletes EcmaScript Map Object HOT 4
- MooTools library conflicting with new Event(typeArg) HOT 3
- NS_ERROR_FAILURE XMLHttpRequest exception HOT 9
- Mootools.net down HOT 8
- [spam]
- [SPAM]
- Mootools + Google adsense
- GHSL-2020-345: seeking security contact for your project
- Digital Marketing Course
- spam
- node modules error HOT 3
- mootools.net down HOT 2
- Joomla 3. Recaptcha v2 always spin. HOT 1
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 mootools-core.