I have the following code inside my editor:
<table border="1">
<tbody>
<tr>
<th> Name</th>
<th> Reaction</th>
</tr>
<tr>
<td> Bee Sting</td>
<td> faint</td>
</tr>
<tr>
<td> Purrell </td>
<td> Hand Sanitizer </td>
</tr>
</tbody>
</table>
2 questions:
1. how can I make this table readonly
2. and also not deletable (that is, the user can enter text before and after the table, but is not able to delete the table?
I've tried using disabled="disabled" and readonly="readonly" properties, but I can still remove it. Any ideas?
P.S I am using IE 7
thanks,
adico
<table border="1">
<tbody>
<tr>
<th> Name</th>
<th> Reaction</th>
</tr>
<tr>
<td> Bee Sting</td>
<td> faint</td>
</tr>
<tr>
<td> Purrell </td>
<td> Hand Sanitizer </td>
</tr>
</tbody>
</table>
2 questions:
1. how can I make this table readonly
2. and also not deletable (that is, the user can enter text before and after the table, but is not able to delete the table?
I've tried using disabled="disabled" and readonly="readonly" properties, but I can still remove it. Any ideas?
P.S I am using IE 7
thanks,
adico
Re: table question
My name is neha. I'm using fckeditor with asp.net2.0. I want to restrict user for table width in fckeditor.
suppose i want to restrict the user that he won't be able to add table using fckeditor of width more than 500px. How can i do this?
Since there are two ways of adding tables using fckeditor:
1. insert table from fckeditor.
2. Adding Html code using "source" button in fckeditor
So i need to restrict user from both the ways.
Also the html data from the source of fckeditor needs to be saved in database. So what i need is suppose user has set the table width to 600px then it will change to width=500px and the new changed width i.e 500px will get saved in database.
So this needs to be done from both above mentioned perspectives.
Its really urgent. Can anybody help me regarding this?
Thanks,
Neha
Re: table question
or change max-width for width, but tables would always be 500px wide.
Then on the server side you will still have to parse the HTML searching for <table> tags and changing the embedded width if greater than 500px, or maybe you can add the above rule to a <style> tag in the HTML.