Code Monkey home page Code Monkey logo

canner-slate-editor's Introduction

CannerCMS has pivoted to CannerData - The Data Access Layer for Analytics Data Applications.

Canner now provides solution designs for data teams so that data owners, stewards, and consumers can easily collaborate in one interface. It is an ease-of-use, scalable, secure platform for querying and analyzing information across multiple databases, le systems, and other storage formats. Unlike current solutions that data is often manually integrated and transferred across different tools and sources, resulting in time-consuming and error-prone processes.

canner-slate-editor's People

Contributors

abz53378 avatar canrau avatar chilijung avatar shawtim 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

canner-slate-editor's Issues

Logo Proposal

Hello,

I came across your awesome project and i wanted to help contribute to this great project...
I created a logo for you... Two similar design styles based on the same idea concept...
You are free to choose any style you like the most and use...
If you find any of the styles good enough and you like it, please do let me know.

The link contains the google drive files for your use.
https://drive.google.com/drive/folders/1gjJncpskKWMuNCwPuFLAwB6LKTMBw7NL?usp=sharing

logo design_slate md editor_presentation

logo design_slate md editor_idea concept

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

passing in additional options into editor completely messes up the markdown formatting

I initiated a slate-md-editor as follows:

// imports
import React, { Component } from 'react'          ;
import { Value  }           from 'slate'          ;
import  Editor              from 'slate-md-editor';
import { State }            from "markup-it"      ;
import { isKeyHotkey }      from 'is-hotkey'      ;
import markdown             from "markup-it/lib/markdown";


// initialize value 
const readme    = require("./Readme.md");
const mdParser  = State.create(markdown);
const MdEditor  = Editor();
const doc       = mdParser.deserializeToDocument(readme);
const vo        = Value.create({ doc });
const vk        = JSON.parse(localStorage.getItem('body-value'));
const v_on_load = Value.fromJSON( vk ) || vo;

// container 
class EditorContainer extends Component {

    //  functions ...


    return (
    
      <MdEditor 
        className ='editor'
      	style     = {css}
        value     = {this.state.value}
        onKeyDown = {this.onKeyDown  }
        onChange  = {this.onChange   }

        // this messes up the markdown format completely
        plugins   = {plugins}

      />
	);
}


// plugins
const plugins = [ hotKeys(shortCuts) ];
const shortCuts = { 'ctrl+l' : centerOnCursor }
function centerOnCursor(e, change){ return false }

When I add plugins={plugins} into MdEditor the existing markdown format is destroyed completely. I assume this is because I accidently overwrote what plugins existed before. Is there an API to pass in additional plugins? I would like to initialize the editor as an MdEditor if possible, instead of an Editor and pass in slate-md as a plugin. Especially because import {MarkdownPlugin} from 'slate-md-editor' does not work for me.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

What does the library use antd for? Possible to exclude it?

I've been meaning to test this in a real use case for a long time now, but it's an incredible headache to get working because of the incredible headache antd is to get working. I've followed all the guides, but I still have trouble loading the styles from antd in Webpack.

I'm sure I'm eventually going to get it working, but is there a way to just use this library without it?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Cannot initiate editor

Following the example, I initiated an editor with:

   import { Editor } from 'slate-md-editor';
   const MdEditor = Editor();

But received error: TypeError: Object(...) is not a function
I also tried passing in a trivial option:

const MdEditor = Editor({markdownOption : {}});

But the same error is thrown.

Mismatched peer dependencies

When installing canner-slate-editor, there are mismatched peer dependencies:

$ mkdir test
$ cd test
$ npm init -y
$ npm install --save antd@^3.10.1 canner-slate-editor@^1.5.4 immutable@^3.8.2 react@^16.5.2 react-dom@^16.5.2 slate@^0.33.8 slate-react@^0.12.11

> [email protected] postinstall /Users/spencerelliott/Dev/elliottsj/slatetest/node_modules/styled-components
> node ./scripts/postinstall.js || exit 0

Use styled-components at work? Consider supporting our development efforts at opencollective.com/styled-components
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-list@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-quote@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate-edit-blockquote@^0.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-list@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-helper-block-quote@^0.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @canner/slate-icon-emoji@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.32.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of slate@>=^0.33.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of slate@^0.29.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
added 358 packages from 241 contributors and audited 6096 packages in 17.073s
found 0 vulnerabilities

It is not possible to avoid these warnings because many of these peer dependencies have no version which satisfies all version constraints.

For example:

[email protected] depends on @canner/slate-helper-block-list@^1.5.0, but [email protected] depends on a peer of @canner/slate-helper-block-list@^0.1.12. There is no version that satisfies both constraints ^1.5.0 and ^0.1.12.

Another problem is that many sub-packages are specifying their peer dependencies using an invalid syntax, e.g. https://github.com/Canner/canner-slate-editor/blob/0330dc6000a3e31ff6aa7a46309c54eddb6c4acf/packages/slate-icons/shared/package.json#L12

>=^1.0.6 is not a valid semver constraint, so npm raises the error

npm WARN @canner/[email protected] requires a peer of @canner/slate-constant@>=^1.0.6 but none is installed. You must install peer dependencies yourself.

Suggested fixes

  • Fix all invalid semver constraints, e.g. change >=^1.0.6 to >=1.0.6.
  • Loosen peer dependency constraints so that a valid version exists for every combination. e.g. change slate-toolbar's peer dep on @canner/slate-helper-block-list from ^0.1.12 to >=0.1.12.
  • Add a CI build step to prevent this from occurring in the future, e.g. Travis CI or CircleCI. Run the command npm ls as part of the build, which produces an error if peer dependencies are mismatched.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Links not working

Extra Space Problem

I run the demo. When I manually type a link element, it is converted to a link. It's good. I only observe some extra spaces before the link text. This may need some fix.

Pasting link in markdown breaks further links.

When I pasted the following:

[example](http://example.com "Optional title")[space]

It did not convert to a link. Then I tried to add similar links below this line and they did not convert to a link either.

However when I try to manually type a link to another position (away from the pasted string) in the document, it is converted to link properly.

Editing Links

One more thing: can we edit existing links by putting cursor over the link?

Thoughts on Implementation

As you know, I think this markdown plugin is great! It saves me a lot of headaches of maintaining my own, sloppy, markdown plugins.

Two things I'd love to see in this plugin:

  1. Support for custom block/mark tags
  2. Support for * for italics - I know first-hand this is a pain due to the edge case of handling triple asterisks for italics+bold

Thoughts on these @chilijung?

Thanks again! Amazing work!

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Code blocks seems to be broken (kind of)

Hi there,

I have a very strange behaviour of the code block. I've captured a gif to show you what I mean:

defect

If i type ` for several times only some of them are converted to HTML and somehow backspace is broken after I get a code block.

I'm using a Mac Book Pro (10.13) with Chrome 65.

Best regards,
Jan

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.