Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse markdown text in chat content and format as standard HTML #79

Closed
deleolajide opened this issue Oct 14, 2018 · 5 comments
Closed

Comments

@deleolajide
Copy link
Member

deleolajide commented Oct 14, 2018

Use the marked-js library to convert readable markdown text in Converse chat/chat-room panels into view-able HTML. This is not compatible with XEP-0393.

@deleolajide
Copy link
Member Author

deleolajide commented Oct 14, 2018

Done and available in version 0.6.0.

Adding marked-js to Converse was straightforward. The only feature that seems to be missing seems to be the use of parenthesis to mark spans. All three use cases from the XEP are supported.

image

My use case will be markdown code pasted from GitHub or elsewhere. A bit more work needs to be done on the marked.css styling to make it generic enough and usable for that.

@deleolajide
Copy link
Member Author

deleolajide commented Oct 16, 2018

Added clipboard to markdown using Euan Goddard's utility.

This enables rich text to be copied from documents or web pages and pasted into Converse chat as markdown.

@deleolajide
Copy link
Member Author

Added a very good markdown editor also using marked.js from lepture.

This completes the markdown support and closes this issue. Pàdé users can author or paste external formatted blocks of text into conversations that are readable from plain text XMPP clients,

image

@deleolajide
Copy link
Member Author

deleolajide commented Dec 17, 2018

Add support for Markdown Interactive Content by generating html form labels and input controls from markdown using the marked-forms project

image

This will be a simplified alternative to H5P interactive publishing that can be easily used with Canned Responses to provide a solution to a number of use cases which include:

  • User Polls
  • Voting
  • Surveys
  • Information gathering

Use XEP-004: Data Forms to publish the data from the forms to the PEP node of the user that posts the interactive content.

@deleolajide
Copy link
Member Author

Done and available in version 0.8.11.

xAPI was too complicated for this requirement. Now it seems PEP and XMPP data forms are also an overkill to deliver forms data back to the form originator. As the data will be consumed client-side in JavaScript by the originator, a JSON playload delivered via XEP-0335: JSON Containers will be best suited for the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant