Re: How to Make Template Layout Fixed

  •  08-06-2010, 7:40 AM

    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
View Complete Thread