Okay... this post may be long... but try to read the whole post and come with feedback (positive and negative)
I would like to be able to protect some html against being edited, and some not possible to be deleted.
(Preliminary FEATURE request)
The newly introduced:
is really handy piece of work.
Is it possible to create something similar for visible tags in the editor?
Let say you let your users insert premade code into the editor using a custom made dialog ...
Let say the user inserted a DIV with one H3 tag and one table with one cell.
Then say you want a rules like this:
The user should be able to edit text widthin the H3 tag.
The user should be able to edit text widthin the TD tag of the TABLE.
The user should not be able to delete H3 tag.
The user should not be able to delete TABLE.
The user should be able to delete the DIV tag, but then also deleting all content widthin that tag.
The user should not be able to insert tags or text within the DIV tag and outside the H3 or TABLE tag.
Could maybe be implemented by using this within the tags:
which means that editing directly inside tag is not allowed, but editing within sub tags may be allowed (which depends if fckedit="no" are used on subtags or not)
Which means deletion of that single tag is not allowed directly, but should be deleted if parent tag are.
And then if FCK writes some code to obey the rules .... well it might work.... and should opt for some new possibilities...
Se example code below.... and if you have some thoughts about this ...well.....
<div fckedit="no" class="someclass">
<h3 fckdelete="no">Title here</h3>
<table fckdelete="no" width="100%" cellspacing="0" cellpadding="0" border="0">
Another more practical example could be this:
Let say you wanted your CMS users to be able to insert code like this in their pages (see link below):
(Move the mouse-pointer over the tabs in the page and you will see a cool effect)
This is ONE of the cool and practical stuff I want implemented in my CMS system.
I have looked a the source of the above minitab example and made a much simpler, yet effective crossbrowser version.
In order to use this code I need to create a custom dialog where my site-admins can enter tab-text as well as content for each of the tabs.
But to make this work nicely then I should be able to protect the inserted code from being altered from within FCKeditor. If one of my users inserted my custom minitab then if he laiter on want to change it, he would have to delete the whole minitab in FCKeditor or even better, be able to right-click somewhere inside the minitab and get a context-menu where he can select "edit minitab". Clicking "edit-minitab" should display the current minitab values in the custom made dialog.
Hope you see the potential of this. I mean here the benefit of being able to protect some of the HTML in FCKeditor.
Hope this was not too far out and that other can comment on this idea of protecting some of the HTML, and comment if this way of protecting HTML tags are doable or if there are other better ways of doing it.
Hope some of the developers can join in as well.
What do you think?
Can this feature be implemented?