I have my CKEDITOR form prepopulated with hidden table which is being submitted together with user inputed text. This works fine, but sometimes user presses backspace too many times and deletes the hidden table.
Is there a way to block editing on this hidden table inside ckeditor textarea? So when user presses backspace the hidden table isn't affected and stays in.
As soon as CKEDITOR instance is ready this source (bellow) is put inside CkEditor Textarea (using setData() attribute) and User only sees the returned <p></p>
value. In this case its <p>I really think I can do this!</p>
. Its a description of his profile and he can keep it and edit it. The rest is hidden and only visible in e-mail when form is submitted. Its strange that <p></p>
is on top but if user presses Backspace couple times the table gets deleted and therefor not submitted.
<span id=messageTemplate1 class=message>
<p>I really think I can do this!</p>
<table class=hide style=font-size: 12px;>
<tbody>
<tr class=hide>
<td>
Application sent by <strong><a href=http://www.globalcastingcenter.com/talent/jack-bolton>Matt Faro</a></strong> for Audition: <a href=http://www.globalcastingcenter.com:80/CustomContentRetrieve.aspx?ID=4185493>Actors Needed</a>
</td>
</tr>
<tr class=hide>
<td>
Reply to applicant directly: [email protected] or visit full profile: http://www.globalcastingcenter.com/talent/jack-bolton
</td>
</tr>
</tbody>
</table>
<table class=hide style=font-size: 12px;>
<tbody>
<tr class=hide>
<td><strong>Short Profile Summary:</strong></td>
</tr>
</tbody>
</table>
<table class=hide style=font-size: 12px;>
<tbody>
<tr class=hide>
<td>
<a href=http://www.globalcastingcenter.com/talent/jack-bolton><img alt= src=http://globalcastingcenter.com/talent_images/4164035_258551_foto.png?Action=thumbnail&Width=144&Height=215 /></a>
</td>
</tr>
</tbody>
</table>
<table style=font-size: 12px; class=hide>
<tbody>
<tr class=hide>
<td><strong>Areas:</strong></td>
<td>Actor,Extra</td>
</tr>
<tr class=hide>
<td><strong>Country:</strong></td>
<td>WORLDWIDE,Any</td>
</tr>
<tr class=hide>
<td><strong>Age:</strong></td>
<td>26</td>
</tr>
</tbody>
</table>
</span>
Now when I load your plugin my CKeditor box disapears, please press Apply on testing page http://gcc-july.themantas.co.uk/auditions/actors-needed please login first to be able to access the message box Login name: [email protected] pssw: test
My config file:
CKEDITOR.editorConfig = function( config )
{
config.toolbar = 'MyToolbar';
config.toolbar_MyToolbar =
[
{ name: 'clipboard', items : [ 'Undo','Redo' ] },
{ name: 'styles', items : ['FontSize' ] },
{ name: 'basicstyles', items : [ 'Bold','Italic'] },
{ name: 'paragraph', items : ['Outdent','Indent' ] },
];
config.removePlugins = 'contextmenu';
config.forcePasteAsPlainText = true;
config.pasteFromWordRemoveFontStyles = true;
config.pasteFromWordRemoveStyles = true;
config.extraPlugins = 'cwjdsjcsconfineselection';
config.startupShowBorders = false;
config.disableObjectResizing = true;
};
This is how the box looks when I disable your plugin: http://screencast.com/t/Kc2bIOU8md2
I use your suggested HTML structure.