📜 ⬆️ ⬇️

FrontendSimpleEdit - a simple content editor for the external part of the site on MODX Revolution

I had Aloha Editor for MODX Revolution . But after working with him, I was disappointed. It is too heavy (big scripts) and adds its own tags to the code. I wanted something simple and versatile. As a result, this plug-in was born.



FrontendSimpleEdit is a plugin that allows you to edit the values ​​of the fields and TV resources of MODX Revo in the outer part of the site.
For the work of the editor you need jQuery 1.7+.
')
If jQuery is not used on your site, add the line to HEAD:

<script type="text/javascript" src="/assets/components/frontend_simple_edit/js/jquery-1.10.2.min.js"></script> 


To edit the values ​​of the fields and TV resources you need to put labels in the html-code through the attribute "data-fedit".

Examples:

 <h1 data-fedit="pagetitle">[[*pagetitle]]</h1> 


 <div class="text" data-fedit="content"> [[*content]] </div> 


 <div class="price" data-fedit="tv1"> [[*price]] </div> 


For TV (additional fields) you need to specify the ID TV with the prefix "tv". For example: data-fedit = "tv1".

Future plans:
- Make an additional opportunity to specify the elements for editing without the attributes "data-fedit".
- Make it possible to edit not only resources (documents) of MODX, but also pages from any database tables (for example, created in MIGX).
- Make a parameter so that you can enable the ability to process MODX tags in content.
- Make support for IE8 (for now IE9 +).

Download:
modx.com/extras/package/frontendsimpleedit

Sources:
bitbucket.org/andchir/frontendsimpleedit/src

Source: https://habr.com/ru/post/206112/


All Articles