OpenSource For You

Building a word cloud generator add-in

-

In this section, we will build a simple word cloud generator task pane add-in for Microsoft Word, which allows users to select a bunch of words from which it generates a word cloud image. It also allows users to insert that word cloud into the document. For the actual word cloud generation, we will take the help of a JavaScript library called wordcloud2.js ( https:// github.com/timdream/wordcloud2.js). So, let’s get started with the interestin­g parts. 1. Fire up Visual Studio and go to File > New > Project. 2. Although almost all of the developmen­t is done in HTML 5, CSS and JavaScript, for some reason, the template for the project is located under the Visual C# section. So navigate through the drop down hierarchy to Visual C# > Office/SharePoint> Office Addin. 3. Select Office Addin Project, name it ‘Word Cloud Generator’, click OK and in the next screen, select Pane Addin as the type. Now, if you navigate to the Solution Explorer, you will see two projects — ‘Word Cloud Generator’ and ‘Word Cloud Generator Web’. The former contains the Manifest.xml file and the latter contains all our HTML 5, CSS and JavaScript files. 4. Navigate to the Word Cloud Generator Project and open Task

Newspapers in English

Newspapers from India