return;
}
}
AbstractPostEditor editor;
MainFrame frame = controller.getMainFrame();
FeatureManager fm = controller.getFeatureManager();
boolean isRichEditor = bloggingPreferences.isRichEditor() || !fm.isPtbAdvanced();
if (fm.isPtbAdvanced())
{
PostEditorAdv edAdv = new PostEditorAdv(frame, isRichEditor);
java.util.List<TargetBlog> blogs = bloggingPreferences.getBlogs();
edAdv.setTargetBlogs(blogs.toArray(new TargetBlog[blogs.size()]),
new TargetBlog[] { targetBlog });
editor = edAdv;
} else
{
PostEditor edNor = new PostEditor(frame, isRichEditor);
edNor.setTargetBlog(targetBlog);
editor = edNor;
}
// Get template
Template template = Templates.getByName(templateName);
PostData data = type.getPostData(template);
if (data.text == null) return;
editor.setPostTitle(data.title);
editor.setPostText(data.text);
editor.setSourceArticle(data.sourceArticle);
editor.setEditorFont(RenderingManager.getArticleBodyFont());
editor.open();
}
}