in MyStatusTool, Software Development

Notes on adding a feature to MyStatusTool

Looking at adding medium-editor to MyStatusTool, downloaded zip file from medium-editor repo.

Made a copy of my current setup

Updated config.json and app.js to use port 2030

Looked at this demo of use of textarea with medium-editor, will work on adding this to admin.js

Updated views\admin.js to add references to medium-editor CSS and JS files, and add other stuff to support.

Added medium-editor CSS and JS files to public\css and public\js folders

Was able to get the medium-editor working, but could not see the labels on the toolbar. After a fair amount of searching, found a set of options for button labels that made me go back to the demo page I was using for an example. Instead of “false” (the default value), the button labels option was “fontawesome”. I had issues with some other app in trying to correctly access FontAwesome fonts, so I decided to change that to “none”, and then I was able to see the labels – awesome!

I then was able to add links in some text, and that worked correctly in the displayed text and the RSS feed. I did notice that there were paragraph marks in the RSS feed description. I had seen some mention of medium-editor adding paragraph tags, so I added some logic to app.js to strip the tags before creating the feed (I was already doing this for the post itself).

I then tried all of the buttons on the toolbar, and they had the desired effect – nice!

During this effort, I briefly looked at some other options (TinyMCE, Quill), but found there were restrictions or payment requirements, so I am glad I was able to get the medium-editor working. I will be adding these changes to the repo and doing a little more testing before rolling out to my beta testers (let me know if you would like to be a beta tester for MyStatusTool!)…

Write a Comment

Comment