GithubHelp home page GithubHelp logo

hypothesis-extension's People

Stargazers

 avatar

Watchers

 avatar

hypothesis-extension's Issues

markdownエディタに置き換える

概要

  • yarnのライブラリからmarkdownエディタを選定する
  • chrome拡張内で使ってみる

候補

editor

要件

  • markdownエディタはページ上に表示する
  • チェックボックスをサポートしている
  • テキストエリアの拡大縮小は可能
  • サーバーから送信されたテキストがあってもmarkdownとして変換し表示できる

設計メモ

  • エディタ部分は普通のテキストエリアで、プレビュー時のみmarkdown形式に表示するだけでいいのは

  • エディタ描画のタイミングについて

  • 描画方法について

    • ドキュメントに対する変更を検知し、指定部分のテキストエリアの置き換えを行う
    • write、previewの切り替えでテキストエリアと変換内容の切り替えを行う
    • チェックボックスの変更はプレビュー部分からもできるようにしたい

調査メモ

  • hypothesisによって追加された部分は基本的に Shadow Dom属性を持つ
    • そのため、内部の要素の取得には以下のようにして .shadowRootを使う必要がある。
    const shadowRoot = document.querySelector('hypothesis-sidebar').shadowRoot;
  • 上記でhypothesisによって追加された要素でも取得すること自体は可能
  • そのため、クロスドメインでのiframe内の要素の変更等は厳しそう
  • 上記理由から、クライアント側の実装を変更する方針にする

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.