How to Make Template Layout Fixed

Last post 08-06-2010, 8:36 AM by Chaplain Doug. 3 replies.
Sort Posts: Previous Next
  •  08-06-2010, 3:20 AM 63158

    How to Make Template Layout Fixed

    I now know how to create a template using tables.  However, I do not want the user to be able to resize the width of any cells or columns (or rows for that matter).  Presently the user can drag and resize the cells.  How can I freeze the layout so that the user can only change the content in the cells and not the cells themselves?  Thanks so much for the help.
  •  08-06-2010, 5:13 AM 63164 in reply to 63158

    Re: How to Make Template Layout Fixed

    I found the editor property Editor.EnableObjectResizing="False".  However, this works for html tables but not for DIVs.  Any idea how to remedy this?
  •  08-06-2010, 7:40 AM 63169 in reply to 63164

    Re: How to Make Template Layout Fixed

    Please refer to:
    Add Uneditable Regions to a Template

    This section describes how to create non-editable sections of content in WYSIWYG mode. For instance, you may wish to prevent the user from changing the text in a paragraph or table cell.

    To make a section of content in the editor unchangeable, use these two attributes: CONTENTEDITABLE and UNSELECTABLE. Combined, these two attributes prevent a section of HTML, typically a paragraph or block of text enclosed in DIV or SPAN tags, from being selected and modified. The section can still be deleted. And, if the user switches to 'View As HTML' Mode, then the content can be changed.

    If the item has properties, like table cells, the properties can still be changed. Add these attributes to content that will be loaded into the editor. The HTML elements will then apply and appear in the editor, but won't be editable. Set contenteditable="false" and unselectable="on".

    Example:

    Using your favorite text editor, create a new HTML page and name it "example1.html".

    Open the example1.html file and copy/paste the code below, save it to ~/CuteSoft_Client/CuteEditor/Templates folder.

    <div align="center"> 
    
     <center>
      <table border="0" cellpadding="5" cellspacing="1" width="98%">
       <tr>
        <td align="right" valign="top" width="20%" bgcolor="#ffff00">&nbsp;
        </td>
        <td width="15" bgcolor="#ffff00"></td>
        <td valign="bottom" width="80%" bgcolor="#ffff00"><div UNSELECTABLE="ON" contenteditable="false">This Heading is not editable.</div></td>
       </tr>
       <tr>
        <td valign="top" width="20%" bgcolor="#ff9900"><strong>SECTION 1</strong><br>
         Title 1<br>
          Title 2<br>
          Title 3<br>
          <br>
         </font>
        </td>
        <td width="15" bgcolor="#0033cc"></td>
        <td valign="top" width="80%" bgcolor="#0033cc">Lorem ipsum dolor sit amet,
         consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut
         lacreet dolore magna aliguam erat volutpat.</td>
       </tr>
      </table>
     </center>
    </div>

    References

    Microsoft documentation on the UNSELECTABLE Attribute.
    Microsoft documentation on the CONTENTEDITABLE Attribute.
     
    Regards,
    Eric
  •  08-06-2010, 8:36 AM 63175 in reply to 63169

    Re: How to Make Template Layout Fixed

    Thanks Eric.  I am already using uneditable regions to keep content inside DIVs from being edited.  However, what I am after is allowing the content inside a DIV to be edited and the make the DIV not resizable in the Cute Editor.  Any thoughts on this?  Thanks.
View as RSS news feed in XML