Quote from: sriananda at Oct 14, 2015, 11:23 AM...
Is that possible ?
Anything is possible, clientside with clientside material.
But let me explain something: either you abandon ship and go the route of ContentBlocks, or you put on a constructor's hat, brace the flames, and achieve what you want with your current setup.
Here is an idea for you. In the manager, you are using
textareas. These are a bit doggish. Anything in them is editable, content and whatever else you have added.
Well, the idea of proper design is to make only content available to the user in the first place.
If you like DIYs see
http://www.tinymce.com/forum/viewtopic.php?id=23405
some more related ideas
http://stackoverflow.com/questions/7522848/contenteditable-false-inside-contenteditable-true-block-is-still-editable-in-ie8
http://jsfiddle.net/haxhia/uUKPA/3/
Similar method I have used successfully (which is almost ready for publication, in fact is in the next release of TinymceWrapper -
frontend only)
You can hack it and achieve what you want.
1. Clone-convert all textareas to contenteditable divs
2. Now add the attribute
contenteditable = false to any and all parent elements you want their content locked.
In fact, you don't need #2: due to the contenteditable attribute, the containing element cannot be removed, only its contents.
3. When you hit save, the abominable textareas get updated with the contents of the DIVS and then saves.
So
<textarea id="#ta">
<p class="cannotNotDeleteMe">
I am the notorious MODx manager textarea
</p>
<p class="cannotNotDeleteMe">
I am the notorious MODx manager textarea
</p>
</textarea>
becomes (test this in jsfiddle)
<div contenteditable="false" data-origin="ta">
<p class="canNotDeleteMe" contenteditable="true">
this is editable
</p>
<p class="canNotDeleteMe" contenteditable="true">
this is editable
</p>
</div>
And yes, TinyMCE handles this very nicely, you just have to think through thoroughly.