Coder Social home page Coder Social logo

Import HTML about standoff-properties-editor HOT 2 OPEN

nichtich avatar nichtich commented on July 21, 2024
Import HTML

from standoff-properties-editor.

Comments (2)

argimenes avatar argimenes commented on July 21, 2024

Thanks, my intention is to support HTML content in a few stages:

[1] To store the imported HTML as a zero-width annotation (this has now been written but not yet pushed). This allows HTML to be viewed in the document but does not allow the user to annotate the textual content of the imported HTML block

[2] To convert the imported HTML elements to matching stylistic annotations. The sanitize-html library would help establish the correctness and security of the HTML for this operation. The limitations of the approach would be that managing complex layout structures like DIVs, TABLEs, etc., could be complicated in standoff, as sibling order is crucial to the rendering, and this needs work in SPEEDy

[3] Another approach I am thinking through is to combine standoff annotation with embedded HTML ... should be fairly easy to import, but the export process will need to be carefully considered.

from standoff-properties-editor.

nichtich avatar nichtich commented on July 21, 2024

Thanks for feedback! Embedded HTML is another issue, I was looking for a way to convert existing documents to standoff-properties data format. I mostly use Markdown but HTML is more common and Markdown can be converted to HTML. The pandoc document converter gives a good summary of most common layout types among document formats (with pandoc you get import from dozens of document formats). Support of this would be enough:

  • Inline elements
    • bold (b, strong), italic (i, em)
    • external links (a)
  • Block elements
    • headings (h1, h2...)
    • paragraphs (p)
    • quotations (blockquote)

Support of more block elements (horizontal rule, lists, code blocks, tables) might be added later.

from standoff-properties-editor.

Related Issues (20)

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.