cancel
Showing results for 
Search instead for 
Did you mean: 

Markdown, Notes, and Drive

wosmond_
Champ in-the-making
Champ in-the-making

Is there any way for .md (Markdown) files created locally in a Drive folder to be recognized as Notes, and thereby parsed on the Summary page? The workaround is to first create an empty Note, set the type to Markdown, let the .md sync down to the folder, then edit it locally. Not a very good solution...

1 ACCEPTED ANSWER

Bertrand_Chauvi
Confirmed Champ
Confirmed Champ

When you are using Drive, the Nuxeo platform actually makes use of the FileManager for import. The FileManager checks the mimetype, and creates the corresponding document type.

You can have a look at this contribution to see the default types depending on a given mimetype: http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.platform.fi...

From this contribution, you can see that anything received with the "text/x-web-markdown" mimetype will be treated as a note by default.

There is therefore a chance that your application is not generating the correct mimetype for the FileManager to understand it. In such case, you could specify this mimetype and say that it should generate a Note by adding a XML contribution looking like this:

<extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
<plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" name="MyMarkdownImporter" order="9">
  <filter>add/your/own/mimetype/here</filter>
</plugin>
</extension>

This extension can easily be added through Nuxeo Studio or a development plugin project.

View answer in original post

3 REPLIES 3

Bertrand_Chauvi
Confirmed Champ
Confirmed Champ

When you are using Drive, the Nuxeo platform actually makes use of the FileManager for import. The FileManager checks the mimetype, and creates the corresponding document type.

You can have a look at this contribution to see the default types depending on a given mimetype: http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.platform.fi...

From this contribution, you can see that anything received with the "text/x-web-markdown" mimetype will be treated as a note by default.

There is therefore a chance that your application is not generating the correct mimetype for the FileManager to understand it. In such case, you could specify this mimetype and say that it should generate a Note by adding a XML contribution looking like this:

<extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
<plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" name="MyMarkdownImporter" order="9">
  <filter>add/your/own/mimetype/here</filter>
</plugin>
</extension>

This extension can easily be added through Nuxeo Studio or a development plugin project.

Thank you Bertrand. Working off of your answer I have manually created the following registry key in Windows 7

Great news