Adding Text Editor To Admin Side

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/11/2014 4:46:35 PM
Gravatar
Total Posts 13

Adding Text Editor To Admin Side

Hi. Thank you for reading this.

I am trying to allow the admin to enter some html that I'll use to construct an email and would like to use a text editor like the one in the basic html Content module. Is there any documentation on how to add this? I can add textboxes, etc. but, I haven't been able to add this option yet. Nor have I been successful in finding anything on google. Please help. Thank you again.

4/14/2014 9:05:49 AM
Gravatar
Total Posts 18439

Re: Adding Text Editor To Admin Side

Hi,

If you are building a custom feature you can easily add an html editor. The best thing to do is look at the code for existing features that use one and copy the needed parts.

ie this would go in the .aspx page or in a .ascx:

<mpe:EditorControl id="edContent" runat="server"></mpe:EditorControl>

and in code behind you would have something like this:

protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e); SiteUtils.SetupEditor(edContent, false, this);
}

and you would set the toolbar for it like this:

using mojoPortal.Web.Editor;

edContent.WebEditor.ToolBar = ToolBar.FullWithTemplates;

There are many examples in the code of existing features to help you figure it out

Hope that helps,

Joe

 

4/14/2014 9:18:12 AM
Gravatar
Total Posts 13

Re: Adding Text Editor To Admin Side

Perfect Joe. Thank you for taking the time.

4/14/2014 9:29:45 AM
Gravatar
Total Posts 18439

Re: Adding Text Editor To Admin Side

Glad to be of help, and thank you very much for the cup of coffee!

Cheers,

Joe

You must sign in to post in the forums. This thread is closed to new posts.