Re: Set default text or html when CuteEditor is first loaded

  •  06-20-2010, 11:57 PM

    Re: Set default text or html when CuteEditor is first loaded

    Hi mediaworks,
     
    1. Open project "Provider.sln"(\Providers\HtmlEditorProviders\CEHtmlEditorProvider\Provider.sln)
     
    2. Find section below
    1. Protected Sub cntlCE_Load(ByVal sender As ObjectByVal e As EventArgs) Handles cntlCE.Load   
    2.            Try  
    3.                AddDNNLinks()   
    4.            Catch ex As Exception   
    5.                Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & ex.Message)   
    6.            End Try  
    7.        End Sub  
    3. Change to
    1. Protected Sub cntlCE_Load(ByVal sender As ObjectByVal e As EventArgs) Handles cntlCE.Load   
    2.          Try  
    3.              AddDNNLinks()   
    4.   
    5.              If cntlCE.Text = "" Then  
    6.                  'here is the text you want to show in editor by default   
    7.                  cntlCE.Text = "<p>this is a test</p>"  
    8.              End If  
    9.          Catch ex As Exception   
    10.              Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & ex.Message)   
    11.          End Try  
    12.      End Sub  
    4. Bulid the project and use "DotNetNuke.CEHtmlEditorProvider.dll" to replace the old file in bin folder of your dnn site.
     
    Note: CuteEditor does not support empty <p></p> target, so i use<p>this is a test</p> in the above code.
     
    Note: project "Provider.sln" maybe needs some dll files. You can find them in bin foder of your dnn site.
     
    Regards,
     
    ken
View Complete Thread