TSharedPtr<SWidget> SGraphNodeDocumentation::CreateDocumentationPage()
{
	TSharedPtr<SWidget> DocumentationWidget;

	if( IDocumentation::Get()->PageExists( GraphNode->GetDocumentationLink() ))
	{
		TSharedRef< IDocumentationPage > DocumentationPage = IDocumentation::Get()->GetPage( GraphNode->GetDocumentationLink(), NULL );
		TMap< FString, FString > InVariables;
		FExcerpt DesiredExcerpt( GraphNode->GetDocumentationExcerptName(), SNullWidget::NullWidget, InVariables, 0 );

		// Set attributes to control documentation WrapAt and optional width
		DocumentationPage->SetTextWrapAt( TAttribute<float>( this, &SGraphNodeDocumentation::GetDocumentationWrapWidth ) );

		if( DocumentationPage->GetExcerptContent( DesiredExcerpt ))
		{
			// Create Content
			SAssignNew( DocumentationWidget, SBox )
			.WidthOverride( this, &SGraphNodeDocumentation::GetContentWidth )
			.HeightOverride( this, &SGraphNodeDocumentation::GetContentHeight )
			[
				SAssignNew( ContentWidget, SVerticalBox )
				+SVerticalBox::Slot()
				.Padding( GraphNodeDocumentationDefs::DefaultContentBorder )
				[
					SNew( SBorder )
					.HAlign( HAlign_Left )
					.Content()
					[
						SNew( SScrollBox )
						+SScrollBox::Slot()
						[
							DesiredExcerpt.Content.ToSharedRef()
						]
					]
				]
			];
			// Find Maximum Content area for resizing
			UserSize = GraphNodeDocumentationDefs::MaximumNodeSize;
			ContentWidget->SlatePrepass();
			DocumentationSize = ContentWidget->GetDesiredSize();
			if( GraphNode->NodeWidth != 0.f && GraphNode->NodeHeight != 0.f )
			{
				// restore node size
				UserSize.X = GraphNode->NodeWidth;
				UserSize.Y = GraphNode->NodeHeight;
			}
			else
			{
				// set initial size
				UserSize = GraphNodeDocumentationDefs::DefaultContentSize;
				ContentWidget->SlatePrepass();
				UserSize = ContentWidget->GetDesiredSize();
			}
		}
	}
	if( !DocumentationWidget.IsValid() )
	{
		// Create Placeholder
		SAssignNew( DocumentationWidget, SBox )
		.WidthOverride( this, &SGraphNodeDocumentation::GetContentWidth )
		.HeightOverride( this, &SGraphNodeDocumentation::GetContentHeight )
		[
			SAssignNew( ContentWidget, SVerticalBox )
			+SVerticalBox::Slot()
			.Padding( GraphNodeDocumentationDefs::DefaultContentBorder )
			[
				SNew( SBorder )
				.HAlign( HAlign_Left )
				.Content()
				[
					SNew( SScrollBox )
					+SScrollBox::Slot()
					[
						SNew( STextBlock )
						.WrapTextAt( this, &SGraphNodeDocumentation::GetDocumentationWrapWidth )
						.Text( LOCTEXT( "InvalidContentNotification", "No valid content to display.Please choose a valid link and excerpt in the details panel" ))
					]
				]
			]
		];
		// Find Maximum Content area for resizing
		UserSize = GraphNodeDocumentationDefs::PlaceholderContentSize;
		DocumentationSize = GraphNodeDocumentationDefs::PlaceholderContentSize;
	}
	// Cache link/excerpt this widget was based on
	CachedDocumentationLink = GraphNode->GetDocumentationLink();
	CachedDocumentationExcerpt = GraphNode->GetDocumentationExcerptName();
	
	return DocumentationWidget;
}