Giter VIP home page Giter VIP logo

pen's Introduction

pen's People

Contributors

1989car avatar alirezas avatar anhulife avatar bkeepers avatar calebmer avatar chasingmaxwell avatar debiancc avatar fritx avatar grabus avatar gurik avatar iranana avatar kkirsche avatar lichgo avatar mattmontgomery avatar michalcarson avatar myst729 avatar nathanathan avatar nycto avatar robertsass avatar samlau95 avatar sofish avatar terrencekhng avatar thomastweets avatar toobug avatar trautwein avatar vadzappa avatar vyahhi avatar zensh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pen's Issues

Bug when selecting text

When i try to select text in Chrome via keyboard shortcuts (option & arrow keys), the toolbar doesn't show up...

screen shot 2013-09-09 at 5 13 05 pm

是否考虑加入评论的功能?

类似于Medium那样,如果别人查看的话,可以对某个内容做评论,这样对于我们做编辑的同学就可以查看大家的内容和建议

Destroy function support ?

Wanna know, How can I destroy Pen function ?

Example :

When I hover A element so

var penA = new Pen({editor: document.querySelector('.A')});

When mouseover how to destroy that ?

Any appetite for tables?

It seems that most 'medium-style' editing experiences eschew HTML tables. I think I get the reasoning, but I also think there's certainly a place for one that includes simplified table management. Is there any appetite for this in your project?

Placeholder Text

Is there anyway to have placeholder text show up when the user deletes the content in the pen editor?

Paste plain text

Should be cool, if we have option like..

var options = {
  PastePlainText : true
}

Just let user paste plain text only (so another DIV inserted or more kidding div)

I know a solution like..

$('[contenteditable]').on('paste', function (e) {
    e.preventDefault();
    document.execCommand('inserttext', false, prompt('Paste something.'));
});

But maybe you know better to do

EXTRA : Should be cool if this option listened option from list like list: ['bold', 'italic', 'underline']

So no H1 H2 LINK or another allowed

JUST A IDEA :D

markdown用起来很奇怪呀

比如页面结果为:
test

+空格 test就会被影响。

我觉得空格后应该影响当前行后面的文字,而不是上一行的文字。
目前感觉markdown的书写体验不太好

Add support for automatic conversion of certain punctuations

I noticed that, when I type in ", ', ... or --, they're simply displayed as-is, however in Medium's editor, they're automatically converted to more appropriate forms. For example, "quotes" to “quotes” (“ and ”), ... to (…) and -- to (—). Maybe you could consider this feature in future releases. Thank you!

Markdown : <pre>

`First : readme.md

Code block: type ```

Change to :

Code block: type <code>`</code>

:P


Ok, I tested on your demo

screen shot 2013-09-17 at 11 22 57 pm

Coz I using Mac ? or what ?

I made a tester for see keycode

http://jsfiddle.net/FL6vk/

I paste (Shit + ´) , Show nothing..

Inline styles added when setting as a list

When using either the ordered or unordered list buttons this style gets added inline to the element (at least in the live demo):

font-size: 1.36em; line-height: 1.45;

causing the element to bigger than it should, this behaviour latches and cannot be removed

default to <p> tag

An empty editor doesn't default to a

tag

Also, a line break after anything else but a p tag results in a

with the text and
's for linebreaks...

CASE STUDY : onClick example (jQuery)

I try to make onClick example by jQuery

var pen;
var pen_current;
$('.a, .b').on('click',function(){
    if(!$(this).is(pen_current)) {
        if(pen) {
            pen_current.removeClass('pen'); // Request #issus53
            $('.pen-menu').remove(); // Bug?
            pen.destroy();
        }
        pen = new Pen({
                        editor: $(this)[0],
                        list: ['bold', 'italic', 'underline']
                    });
        pen_current = $(this);
    }
});

http://jsfiddle.net/cmJXd/

All work now

But I seems some bug (or i do something wrong)

  • Duplicate Pen menu .pen-menu (they dont removed but display:none)
  • Class dosnt removed #53
  • Error when select a text (sometimes) TypeError: menu.querySelector(...) is null pen.js (line 227)

export content

  1. easy to export content
  2. easy to bind to an hidden input/textarea

Font Awesome doesn't works when pen is included

Hello,
When I've included pen.css, all my fontawesome icons started to appear really strange, like in that screenshot
Screenshot

Maybe pen overwrite fontawesome font ?
Do you have any ideas on how to solve that
Thanks in advance

markdown 的 # bug

使用#时,改变了前一行的标签,并删去当前行。

生成的 <HX> 会相互嵌套,导致字体大小混乱(默认单位是em)

Link bug in Firefox

Hi there!

i've got a bug in firefox when i insert a link and continue writing, the new text is contained in the link...
screen shot 2013-09-09 at 5 13 24 pm

Multiple elements support ?

I wonder how to support multiple elements

Example :
<div class="editme_1"></div>

<div>Disalow</div>

<div class="editme_2"></div>

H2,H3作用在整行

假如H2,H3标签作用在整行的话,那选中是不是就没有意义了?

可以将选中文字单独抽取出来添加H标签

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.