A more functional and better looking site for Steem Ultimate Editor!

in #utopian-io6 years ago (edited)

Repository

https://github.com/tngflx/Steem-UltimateEditor

What is Steem Ultimate Editor?


ultedtlogosmall.png

Steem Ultimate Editor poised to replace markdowns with simple buttons to create a post! Creating post shouldn't be so troublesome and requires a significant amount of time on trial and error. What if I tell you, there's a tool that allows you to just click buttons in order to perform some basic and even advance customization to the style of your post? Let's have a look what Steem Ultimate Editor brought to the table this time after an improvement over the last version. Which you can check out here.

Objectives

  • Allow minnows or newcomers to have a more friendly environment to create posts
  • Significantly reduce the amount of time taken to create a post
  • Beautify your post within clicks!
  • Promoting high quality posts with future features such as source checking

Improvement over the last version

#1 : Integration with steemconnect

Instead of prompting user copy and paste, users can now login via steemconnect. Steemconnect login form is in popup form, so you don't have to leave your workspace while it is logging in. Steemconnect will also auto logout in case of idling for over 20 minutes. This is done by such code :

$(document).ready(function () {
    //Increment the idle time counter every minute.
    var idleInterval = setInterval(timerIncrement, 60000); // 1 minute

    //Zero the idle timer on mouse movement.
    $(this).mousemove(function (e) {
        idleTime = 0;
    });
    $(this).keypress(function (e) {
        idleTime = 0;
    });
});

function timerIncrement() {
        idleTime = idleTime + 1;
    if (idleTime > 19) { // 20 minutes
        Signout();
    }
}

Steemconnect in popup form! P/s : I believe this is the first ever workable popup for steemconnect :P Most of developers prefer a full page login which is not nice to take you away from what you're doing.

ultedt1.gif

#2 : Tags are automatically categorized on spacing

Tags are now easier to remove or type instead of leaving it all in one long line of strings. And tags will have a red border if it's left empty to be posted. It also check for your title. Do notice it doesn't check for payout type. Cause the default type will be 50/50 sbd steempower.

Codes that made it happen :

//Check tags field and payout type if it's filled
function checkDraft() {
    $('.bootstrap-tagsinput').on('click', function () {
        $('.bootstrap-tagsinput').removeClass('warning');
    });

    $('#title').on('click', function (event) {
        $('#title').removeClass('warning');
    });

    if (tags === null && title !== '') {
        alert('Tags field cannot be left blank');
        $('.bootstrap-tagsinput').addClass('warning');
        return false;
    } else if (title === '' && tags !== null) {
        alert('Please specify a title')
        $('#title').addClass('warning');
        return false;
    } else if (tags === null && title == '') {
        alert('You might as well don\'t make a post. Kidding. Please check your title and tags')
        $('.bootstrap-tagsinput').addClass('warning');
        $('#title').addClass('warning');
        return false;
    } else {
        return true;
    }
}

Tags Demonstration :

#3 : Drafts are autosaved to Localstorage

You don't have to worry about your draft disappeared when you refresh your page. It happened to me when I try to use busy.org editor. It was a painful experience. Auto save draft is a must for a blog editor. Draft are saved in a json readable format, so I implemented a json extension which will trim all the whitespace found in key and value field without compromising the json format.

function savDraft() {
    updateContent();

    const data = {
        author: author,
        title: title,
        body: draft,
        footer: footer,
        permlink: tags
    }

    //JSON extension 
    JSON.extn = {

        format: '\t',

        replacer: function (key, value) {
            function trim(text) {
                var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
                text = (text == null)
                    ? ""
                    : (text + "").replace(rtrim, "");
                return text;
            }
            return typeof this[key] === "string" ? trim(value) : value;
        },
        stringify: function (obj, replacer, space) {
            return JSON.stringify(obj, replacer, space);
        }, 

        trimedStringify: function (obj) {
            return this.stringify(obj, this.replacer);
        },
    }
    //Saving data to localstorage
    localStorage.setItem("draft", JSON.extn.trimedStringify(data, null, 0));
    //console.log("Saved draft")
}

#4 : Additional features integrated : superscript, subscript, html tags recognition

Technology Stack

Jquery, HTML, PHP, Handlebars, Javascript

Roadmap

-Adding emoji
-New banner
-You name the features :)

How to contribute?

-Contact me personally on discord or comment below!

Sort:  

Thank you for your contribution. A question, what will happen if I have a lot of data stored in the Local Storage (i.e. a lot of drafts), will it not make my browser slow. Also please only add relevant tag to the contribution, "teammalaysia" is not relevant for this contribution.

Your contribution has been evaluated according to Utopian rules 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]

Hey @codingdefined
Here's a tip for your valuable feedback! @Utopian-io loves and incentivises informative comments.

Contributing on Utopian
Learn how to contribute on our website.

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

Vote for Utopian Witness!

I don’t know anything about coding but I guess this can bring a huge improvement to the site.

Thank for you sir

This is looking very promising! I think it's a wonderful way to make life a little easier for new Steemians. Great work.

Thanks! I hope i can release it soon :)

I am a writer, not a coder. I learned everything Steemit the hard and time consuming way, but also have shared tutorials with my fellow community members.

This is a great share! Thanks!

Well suggest some features you'll like to see in the editor :) I might lessen your pain more :)

Actually, one thing I was looking for lately is a way to make text smaller- such as in a disclaimer.

Ohhh wow your condenser is looking to be a great! I am so over Steemit and actually use Busy but yours is looking awesome!

BTW you can make use of the line dividers I use that you left in my post which is frm the Promo-mentors and you might want to joiin as well hahaha

You have been scouted by @promo-mentors. We are always on the look out for promising authors.

I would like to invite you to our discord group https://discord.gg/vDPAFqb.

When you are there send me a message if you get lost! (My Discord name is the same as the one here)

Hmm I intended it to be just an additional tool for steemians. But now Im starting to make it look like a condenser. Well more choices for everyone in case steemit or busy down.

It is first time I see SteemConnect authentication as popup. Will take a look how You did this. Awesome!

Thanks for stopping by. I can tell you straight away. The key is style.display="show" and also a hidden loader div inside your main html page. All css trick :P. You beat the CORS policy by that way :D

Thanks for short summary! Gonna try it.

No prob :)

Dude your steemnova is real cool. I wonder why no one is using some more graphical game system? You know just some 2d with unity browser is able to run right? I'm still a newbie :P

SteemNova is intended to look retro-style, like its ancestor Ogame 12 years ago :) However I am working on restyle UI in more responsive way.
After that I have plans to expand the game a little into Steem infrastructure :)

This post has been curated by TeamMalaysia Community :-

To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach

Vote TeamMalaysia witness bitrocker2020 using this link vote for witness

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

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

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

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.028
BTC 63099.80
ETH 2455.59
USDT 1.00
SBD 2.58