Hello, everyone, I am still your cute new friend, Melio Pig, today is to send an article, as the title shows, the front friendly reminder, this is the scene of a large water article, it is still too late to close!

Task record

Separate menu and edit area Settings from default content

This task, in fact, is a very simple task, I spent a long time, mainly run off the point, this run off the point can be said to be dry, but is not the real bug to fix, I will talk in detail later, first look at the following code

<div class="wrap">
  <p>This is a P tag</p>The text here is not in the label<p>This is also a P tag</p>
</div>
Copy the code

I think the user set this in the default text area div class=”wrap”, is it going to be brought into the editor, or is it going to be wrong to say brought in or not brought in, is it going to be brought in a part, the unlabeled content is not going to be brought into the actual editing area, because in our source code, we only get children, What, you don’t know why children can’t get the plain text content, the text is not in the tag, don’t worry, I forgot a little at first haha, look at mdn-children, there is a description returns a child elements of a Node, Is a dynamically updated HTMLCollection. “, so the plain text cannot be retrieved. The corresponding text nodes can be retrieved by childNodes, but there are other problems, such as the return of a NodeList. The difference between this and the previous one is that one is dynamically updated, and the other is a snapshot. Refactoring can cause all kinds of problems. So I talked to the boss about it, and it came to the conclusion that if it’s something you can’t put in plain text, we’re not going to do it. Because we have our own use, and the needs of users of similar (users understand the bug can’t bring content into the editor thought it was the scene), quite so your customized requirements, we should not to help to implement, and plain text set a tag is so lazy, can’t spoil the user balabala, I actually think it is quite reasonable, so I replied to the user, and wait for the reply!

Then, after a while, another guy in the team tried out the truth. Actually, we separated the menu editing area, and the default content of the separated editing area was set, even those with labels were not brought into the editor. That this affirmation is our problem, this how can endure, how can let the user suffer such grievance! This bug was dealt with in minutes. I’m going to show you some of the logic of the repair

    if (textSelector == null) {... }else {
        // toolbarSelector and textSelector
        $toolbarSelector.append($toolbarElem)
        // After the menu is separated, the content of the text area is temporarily saved
        $subChildren = $(textSelector).children() // new
        $(textSelector).append($textContainerElem)
        // Save the original contents of the editor area temporarily
        $children = $textContainerElem.children()
    }

    ...

    // After the menu is separated, the text area with labels is brought into the editor
    if ($subChildren && $subChildren.length) {
        $textElem.append($subChildren)
        // Hide placeholder while editor has default values
        $placeholder.hide()
    }
Copy the code

So the first task was done, and I contributed code to the open source team for the first time!

Xiumi and editor adaptation and access

This is a research task and a tough one, so why did I complete this task? Because the implementation cost is too high, it should be directly pending after the research. Haha, I also need to output the documents after the research in the team, but the output is in the language

First of all, I simply went to understand the next Baidu editor, after all, the user said that xiu meters in Baidu editor no problem to use, but in our editor on various forms of expression is inconsistent, or that sentence, how can let the user wronged! I quickly tried, plus also looked at baidu editor on access to xiumi documents. As it turns out, sa didn’t find it, and it turns out that our editor really doesn’t support Soomi well. Then go to the website of Xiumi? Everything pays off. At the bottom of xiumi’s official website, I saw a third-party docking xiumi. That’s what I’m looking for! So I clicked on the link and saw this

After that, I continued to discuss with the boss, and the result was that the implementation cost was relatively high, so I started pending. Therefore, the second task has come to an end. It is also easy to complete the research task and investigate the relevant feasibility.

And after feeling

Young people do not speak martial virtue

As an old salted fish of the post-90s generation, why would this be listed as the first feeling after participation? It must be too strong feeling. After I joined the team, I found that there were still big shots among the team members who had not graduated, and there were many big shots who had not been working for a year! These young men oh my God! Oh my god! Skilled, disciplined, and eager to learn, when I was their age, it was really a salt fish, too ashamed (last time I seemed to write an article about this -)! Then 61, who led me to get familiar with the process, was a man who only worked for half a year. He joined one month earlier than ME. He was a young man who got up early every day to learn martial arts and did not speak martial arts. Haha, I stole his circle of friends, everyone feel!

Anyway, IF a person can persist in doing one thing for a long time, even if it is playing games, I think it is very powerful and worthy of respect. For example, Meihara Daigo, a professional fighter of Japanese e-sports, is the same. Their strongest talent is to keep learning hard. So I also set such a goal for myself (not the strong that also want to learn from the strong first imitate)! In their game shortage, get up early every day to play the code, and then have their own games to play when the combination of work and rest, get up early to play the game is not sweet (funny face, I am really a small genius), and a picture of chicken soup, from the netizen to Mei Yuan da I introduced the evaluation screenshots

Meng Xinzhi shivered

Ah, this is also I feel very deep, I really hope I can become stronger as soon as possible. Some leaders in the team really do several tasks and several issues a day, and immediately receive new issues after completion, while I am an issue for n days, shivering in the corner, watching the leaders learn from the leaders. However, our open source team is very harmonious. The big guys are nice, gentle, patient, and often light a light on my dark path when I’m shaking very badly. So now I am also familiar with some of the basic process of the team, in the time of the code train of thought has become clear, and the leaders work together to make our products better!

A place to realize your dreams and express your worth

Our team’s goal has always been to make the best open source Web rich text editor with the best use experience in China! “, you may look, will think is not your open source will have a lot of income, you are how to insist on such a problem. First of all, we have no income, we all rely on self-drive to learn, to do such a product. Then I think every member (including me) wants to improve their own technology, let more people use wangEditor, get recognition from peers, and also increase their competitiveness and reflect their technical value. Finally, I’ll show you a few screenshots from our documentation, our boss’s nuggets article, and some feedback from our users (stolen images), which is a source of endless power for us to continue to strive for open source!