Questions from a Newbie

Last post 03-24-2008, 9:32 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  03-20-2008, 11:42 PM 38225

    Questions from a Newbie

    Hi,
    I recently purchased Cute Editor for PHP and have several questions.

    Here is the configuration code snippet the launches the editor:

                 $editor=new CuteEditor();
                 $editor->ID="Editor1";
                 $editor->LoadHTML($pageName.".htm");
                 $editor->EditorWysiwygModeCss="admin_edit_page_configuration.css";
                 $editor->FilesPath="CuteEditor_Files";
                 // specify path of custom configuration file
                 $editor->ConfigurationPath="CuteEditor_Files/Configuration/AVMcs.config";
                 $editor->Draw();
                 $editor=null;

    Here is the AVMcs.config file:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>

     <contextmenu>
      <item name="Editing" value="False" />
      <item name="Format" value="False" />
      <item name="Insert" value="False" />
      <item name="InsertAdvanced" value="False" />
      <item name="InsertFiles" value="False" />
      <item name="InsertForms" value="False" />
      <item name="Relative" value="False" />
      <item name="Tags" value="False" />
      <item name="Verbs" value="False" />
     </contextmenu>

     <toolbars>
      <item type="g_start" />
      <item type="image" name="Save" postback="True" />
      <item type="g_end" />
      
      <item type="g_start" />
      <item type="dropdown" name="CssClass" width="100" RenderItemBorder="true" text="[CssClass]"
       command="CssClass" />
      <item type="g_end" />  

      <item type="g_start" />
      <item type="image" name="CleanCode" imagename="cleanup" />
      <item type="image" name="NetSpell" imagename="spell" />
      <item type="image" name="Cut" />
      <item type="image" name="Copy" />
      <!-- groups are defined in Shared/Common.config -->
        <item type="image" name="PasteText" />
      <!-- <item type="image" name="Paste" /> -->
      <item type="separator" />
      <item type="image" name="Undo" />
      <item type="image" name="Redo" />
      <item type="g_end" />
      <item type="g_start" />
      <item type="image" name="Break" />
      <item type="image" name="InsertParagraph" imagename="Paragraph" />
      <item type="g_end" />

      <item type="g_start" />
      <item type="image" name="Bold" />
      <item type="image" name="Italic" />
      <item type="image" name="Underline" imagename="under" />
      <item type="image" name="JustifyLeft" imagename="left" />
      <item type="image" name="JustifyCenter" imagename="center" />
      <item type="image" name="JustifyRight" imagename="right" />
      <item type="image" name="RemoveFormat" imagename="unformat" />
      <item type="forecolor" />
      <item type="g_end" />
      <item type="g_start" />
      <item type="image" name="InsertOrderedList" imagename="numlist" />
      <item type="image" name="InsertUnorderedList" imagename="bullist" />
      <item type="image" name="Indent" />
      <item type="image" name="Outdent" />
      <item type="g_end" />
     </toolbars>

     <codeviewToolbars>
      <item type="g_start" />

      <item type="image" name="Find" />
      <item type="image" name="ToFullPage" command="FullPage" imagename="fit" hotkey="F12" />
      <item type="image" name="FromFullPage" command="FullPage" imagename="restore" hotkey="F12" />
      <item type="image" name="Cut" />
      <item type="image" name="Copy" />
      <item type="image" name="Paste" />
      <item type="image" name="SelectAll" />
      <item type="image" name="SelectNone" />
      <item type="g_end" />
     </codeviewToolbars>
     
    </configuration>


    Questions:
    1. The toolbar shows the “Css Class” drop down – how do I rename it from “Css Class” to something else?
    2. How do I restrict the user to pasting in only plain text?
    3. How do I control the context menu – enable/disable functionality (e.g. disable Cut, Copy, etc.)? I tried changing the parameters in AVMcs.config but nothing happens.


    Thank you so much for your help.

  •  03-24-2008, 9:32 AM 38287 in reply to 38225

    Re: Questions from a Newbie

    1. The toolbar shows the “Css Class” drop down – how do I rename it from “Css Class” to something else?
    Modify the language files. Language files can be found at CuteEditor_Files\Languages folder.
     

      <resource name="CssClass">Css Class</resource>
     
    2. How do I restrict the user to pasting in only plain text?
     
     
    Check this example and find the correct option for your situation. The source code of this example is included in the downlod package.
     
    >>How do I control the context menu – enable/disable functionality (e.g. disable Cut, Copy, etc.)? I tried changing the parameters in AVMcs.config but nothing happens.
     
    Please check this file: CuteEditor_Files\Configuration\Shared\Common.config.
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML