Free editor and Markdown update - eduSteem

in #utopian-io6 years ago

Repository

https://github.com/bflanagin/eduSteem

Continuing the overall interface of eduSteem has become the theme the last few updates.

New Feature: Advanced Editor

Screenshot from 20180928 144439.png
New editor with side preview

Screenshot from 20181001 143918.png
Non-preview editor

Another "small update" that ended up touching almost every aspect of the program the new editor layout and tool bar adds a much more familiar look to the interface. Now both students and teachers can use the tool bar to help them make their posts really pop.

Implementation

pull request (65)

This update carries with it a lot of minor changes to a lot of the files found through out the program. However the new code is concentrated in EditorOpts.qml and markdown.js both of which can be viewed in their entirety by clicking on the links.

In EditorOpts we are simply setting up the buttons in a row. When an option is selected the required markdown formatting is inserted where ever the cursor is located within the document similar to the what you would expect in any word processor. However, hotkeys couldn't be added to this file due to the way key events are designed in QT. To remedy this we add the code snippet below.


property bool controlDown: false

Keys.onPressed: if (event.key === Qt.Key_Control) {
                   controlDown = true
                }
Keys.onReleased: {
            if (controlDown === true) {
                        switch (event.key) {
                        case Qt.Key_B:
                            if (editorOpts.bold === true) {
                                editorOpts.bold = false
                            } else {
                                editorOpts.bold = true
                            }
                            break
                        case Qt.Key_I:
                            if (editorOpts.italic === true) {
                                editorOpts.italic = false
                            } else {
                                editorOpts.italic = true
                            }
                            break
                        case Qt.Key_T:
                            if (editorOpts.strike === true) {
                                editorOpts.strike = false
                            } else {
                                editorOpts.strike = true
                            }
                            break
                        }
                        controlDown = false
                    }
                }
            }

Now we can use standard control+ operations as we would in other editors.

The real work was done in markdown.js as nearly every line was rewritten. The code in markdown.js was originally designed to be simple and quick. Taking into account the major features of the format and converting them into a qml friendly format (instead of html). This of course has many benefits given QT's rendering pipeline and ability to intelligently load and unload media. The new markdown.js abilities include:

  • Multiple nested format marks. Like Bold+Italic.
  • Better handling of images.
  • Better end mark algorithm that fails less often.
  • Rudimentary hyperlink support.

New Feature: Free Posts

When I first started working on eduSteem I had a set workflow in mind. There would be a balance between working as a class and working at the student's own pace. At the end of the week a report would be generated based on the work they submitted and then that report would be uploaded to STEEM as "Proof of Work / Proof of brain." These posts could be viewed by the parents and family of the child and they could upvote the posts as a way to support the child's education. However, what I did not expect was how many times I wouldn't have a set assignment for a task. Free Post is what the interface now defaults to when an lesson doesn't have an assignment attached to it.

Implementation

The FreePost.qml file was added to the assignments wizard and set as the default option in the switch statements that control what template is loaded for the student. The full source code for FreePost.qml can be found here.

Banner.png

Find out more

This project is first and foremost for my classroom and the benefit of my students. It is my hope that when complete other families and schools will adopt the software, and use it in their homes as well. The feature list isn't set in stone but here are a few of its current and planned features:

  • School management including calendars, Courses, Students, and Teachers
  • Lesson plan creation and publishing to STEEM and to an in application store for other teachers to download
  • Student reports created and published by the students through an semi-automated process
  • Auto review (Quizzes) based on review questions added to lessons
  • media storage via IPFS
  • Student rewards based on completion of assignments
  • Micro-scholarships provided by the up-votes the student receives on their weekly posts

As with all my projects eduSteem is open source. Most if not all proceeds from utopian and steem are used for the continued development of this and my other software's and projects.

For further reading check out these other posts here on Steemit.

I also have a Patreon page here if you would like to show your support for the project. The proceeds will be used to maintain the house and my students education as Steemit and Patreon are my sole sources of income.

As always it is my hope that this software along with any of the other projects I have undertaken will be found useful to the community. I do this for the love of the challenge and the need for the software.

GitHub Account

https://github.com/bflanagin

Sort:  

Thank you for your contribution. I can see that now the UI looks quite cool. Also, there are quite a lot of code which is commented out, it's better if you can remove it. There are quite a few console.log messages too, it would be better if you can log it using some better method so that it would be easier for you to debug it.


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @codingdefined!

So far this week you've reviewed 5 contributions. Keep up the good work!

Hi @bflanagin!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 1.775 which ranks you at #29109 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 387 contributions, your post is ranked at #368.

Evaluation of your UA score:
  • Only a few people are following you, try to convince more people with good work.
  • You have already convinced some users to vote for your post, keep trying!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Hey, @bflanagin!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63350.70
ETH 2595.60
USDT 1.00
SBD 2.85