Integrate TinyMCE Editor into Extension Manager

Topics: Business Logic Layer, Controls
Oct 19, 2011 at 8:47 PM

I would like to integrate TinyMCE editor into my extension settings of one of my custom extensions. In essence giving the blogger the ability to create a formatted message and save it as a settings called "Message". Any idea how to implement this?

Coordinator
Oct 19, 2011 at 8:58 PM

Look at this tutorial, specially on custom administration part. Basically you can create custom page that extension will use to maintain settings and add TinyMCE to this page same way it is added in the BlogEngine's admin UI for editing posts and pages.

Oct 19, 2011 at 9:53 PM
Thanks Ruslan,
I will check this out right now and let you know if I need any help. This is my first extension and I think I might have jumped in to the deep end. Here is my concept:
For what it is worth, I would like to create an email blast extension. This would be a tool where a blogger can create a monthly newsletter campaign. The blogger should be able to:
1. Create a page labeled "Newsletter"
2. Go to the newsletter extension > settings
3. Enter a formatted email message
4. Import contacts via a spreadsheet or enter contacts manually
5. Schedule a time to send
6. Receive confirmation that it was sent

Do you have any other good input for me? I don't want to go a hundred miles down the wrong path...lol. I'm sure you been there before and it's not fun.

Jonny

On Wed, Oct 19, 2011 at 3:59 PM, rtur <notifications@codeplex.com> wrote:

From: rtur

Look at this tutorial, specially on custom administration part. Basically you can create custom page that extension will use to maintain settings and add TinyMCE to this page same way it is added in the BlogEngine's admin UI for editing posts and pages.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Coordinator
Oct 19, 2011 at 10:13 PM

Looks doable. You can create extension with 2 settings objects, one tabular to enter all your contacts and one with list of single values like scheduled time etc. In the custom admin page you can load contacts, add/remove, check those who you want to send, set time. Extension itself would have a timer checking every say 30 minutes if send time is due, then send mail and remove scheduled time plus add success message to second settings. When this all works and you reliably sent yourself few ugly emails, replace textbox with TinyMCE to prettify messages. Let me know if run into problem. 

Oct 20, 2011 at 3:51 PM
I have never built any kind of email blast application. Do you think this is a good page for me to reference? Send Mail Via .NET - http://zeeshanumardotnet.blogspot.com/2009/01/send-mails-via-net_6900.html


On Wed, Oct 19, 2011 at 5:13 PM, rtur <notifications@codeplex.com> wrote:

From: rtur

Looks doable. You can create extension with 2 settings objects, one tabular to enter all your contacts and one with list of single values like scheduled time etc. In the custom admin page you can load contacts, add/remove, check those who you want to send, set time. Extension itself would have a timer checking every say 30 minutes if send time is due, then send mail and remove scheduled time plus add success message to second settings. When this all works and you reliably sent yourself few ugly emails, replace textbox with TinyMCE to prettify messages. Let me know if run into problem.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Oct 21, 2011 at 3:32 PM

Hey Ruslan,

Do you have an example of a custom admin page that is not the nivoslider. The whole nivo slider is kind of throwing me off. You tell me to just focus on the custom admin part but I think there are things in that part that depend on step 1 and step 2. It's messing with my head.

Jonny

Coordinator
Oct 21, 2011 at 3:54 PM

Try this one, it is a little old but most things did not change.

Oct 26, 2011 at 8:23 PM
Edited Oct 26, 2011 at 8:30 PM

Hey Ruslan,

What supported event would I attach this email blast extension to? Would an email blast extension even use any of the supported events?

I am referring to this code part:

[SupportedEvent] += new EventHandler<ServingEventArgs>([PrivateMethod]);

Coordinator
Oct 26, 2011 at 10:33 PM

I don't think you need any event handlers. You would start timer in extension constructor, it would check if it need to send mail and then go to sleep for period of time. You could also add a button in admin page to send mail manually, but that also not requires to subscribe to any events.

Oct 27, 2011 at 2:08 PM

Hey Ruslan,

How do I start timer in extension constructor? I am googling it and will let you know if I come up with something. Thanks.

Coordinator
Oct 27, 2011 at 5:48 PM

Here is a simple starting point. You would add this code:

 

timer1.Elapsed += new ElapsedEventHandler(timer1_Elapsed);
timer1.Interval = 1800000;
timer1.Enabled = true;
timer1.Start();

in extension constructor (method with same name as extension). timer1_Elapsed will be executed every 30 minutes, so your sending email code goes there. You can change interval to any number, just remember it is milliseconds.