Posts Tagged live writer

Building a Font Setting Plugin for Live Writer – Part 1


 

Well I’ve started and the first issue is using Visual Studio 2010 Beta 2.

I’ve backed the target .Net Framework back from 4.0 to 2.0 and get the following errors. Basically, the default Class Library template adds a bunch of > 2.0 assemblies. Deleting these from the references section of the project clears the errors. But I’m left with the quandary, will this have an impact on things down the track.

The answer will be revealed as I push forward with is development.

Also, implementing the abstract methods from SmartContentSource gives the following shell class (I don’t like the formatting, but I’ll play this as I go):

using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using WindowsLive.Writer.Api;
using System.Windows.Forms;

namespace craigwatson1962.spaces.live.com.FontSettingPlugin
{
    [WriterPlugin("",  //TODO: Generate a GUID for this plugin
        "Font Setting Plugin", 
        Description="Sets the font for the currently selected text",
        HasEditableOptions=true,
        ImagePath="resources/FontIcon.gif",
        Name="Font setting plugin",
        PublisherUrl="http://craigwatson1962.spaces.live.com")]
    public class FontSettingPlugin : SmartContentSource
    {
        public override SmartContentEditor CreateEditor(ISmartContentEditorSite editorSite)
        {
            throw new NotImplementedException();
        }

        public override string GeneratePublishHtml(ISmartContent content, IPublishingContext publishingContext)
        {
            throw new NotImplementedException();
        }
    }
}

Warning 1 The primary reference "System.Core", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Core" or retarget your application to a framework version which contains "System.Core". FontSettingPlugin
Warning 2 The primary reference "System.Xml.Linq" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". FontSettingPlugin
Warning 3 The primary reference "System.Data.DataSetExtensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". FontSettingPlugin
Warning 4 The primary reference "System.Xml.Linq", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Xml.Linq". FontSettingPlugin
Warning 5 The primary reference "System.Data.DataSetExtensions", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Data.DataSetExtensions". FontSettingPlugin
Warning 6 The primary reference "Microsoft.CSharp", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "Microsoft.CSharp" or retarget your application to a framework version which contains "Microsoft.CSharp". FontSettingPlugin
Warning 7 The referenced component ‘System.Core’ could not be found.   
Warning 8 The referenced component ‘System.Xml.Linq’ could not be found.   
Warning 9 The referenced component ‘System.Data.DataSetExtensions’ could not be found.   
Warning 10 The referenced component ‘Microsoft.CSharp’ could not be found.   

 

Advertisements

, , , , ,

3 Comments

Building a Windows Live Writer Plug-in


The programmer in me is getting itchy  fingers.

I started looking at building some smart buttons for the creative writing I’m putting up here.

It’s been a bit of a journey, but I think I’ve two ideas for plug-in I’d like to have in the Windows Version of Live Writer. These are:

  • Something which will remember I like writing in Calibri 12 point. Also could extend to sorting out the headings formatting in this editor as well. Then start making more that a handful of styles available for characters, or paragraphs (starting to sound like the features in a full WP package).
  • Something which lets me “link” the blog post of the creative writing together. What I want is a couple of buttons (pretty ones), which simply give a next segment, previous segment, start of story. Then the megalomaniac says starts, and groups the story segments in to chapters, and allows for multiple stories with different images in the buttons, oh and does it automatically (or at least lets the linkages be done from a list of the previous post [in a category?]).

Is it hard, first blush not really. This lays out the start of the process: Developing Plugins for Windows Live Writer. The first page does not look too hard (easy-peasy) really. The problems, and complexity, will probably be in the next two pages, and in what I expect to achieve.

I’ll post more on these projects as inspiration turns into reality.

, , , ,

Leave a comment

%d bloggers like this: