-
Notifications
You must be signed in to change notification settings - Fork 0
Import From Wikipedia
Shashank Khanna edited this page Sep 1, 2016
·
1 revision
#Import from Wikipedia Using the ‘W’ key from above the text editor, we can import existing Wikipedia articles into the editor
- Inside the div, editor_window, form element wikiSearchForm, causes the function searchWiki to run on submitting the form.
- searchWiki performs an ajax call to the Wikipedia’s search api : https://en.wikipedia.org/w/api.php
- using regex, it seperates the wiki code, from the main content
- the contents variable is then set to just the body of the wiki markdown, without the headers and footers
- The references/citations are then removed from the content
- This is then sent via an ajax call (post request) to an internal api – that sends the contents to pandoc
- Upon receiving it after conversion to html via pandoc, it uses regex to append the citations in the format that ckeditor accepts
- Home
- [Getting Started] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Getting-Started)
- [How to Contribute] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Contributing--(for-Developers))
- Feature Documentation
- [Edit in WYSIWYG] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Edit-in-WYSIWYG)
- [Search Pubmed] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Search-Pubmed-Database)
- Save Documents
- [Import from Wikipedia] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Import-From-Wikipedia)
- Convert to Wiki Markdown