Giter Site home page Giter Site logo

htmltoopenxml's Introduction

ffmad

testing

htmltoopenxml's People

Contributors

ffmad avatar

Stargazers

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

Watchers

 avatar  avatar

htmltoopenxml's Issues

Uninitialized string offset in suppressStyle method

Hi,

Thank you for this interesting package.
I met a PHP error using fromHTML method of HTMLparser class.
Uninitialized string offset: 14 concerning the suppressStyle method of ProcessProperties class.

So, It could be interesting to create an exception in a first time (which could be catch). The HTML content which creates this error :
<p>Ta<span style="color: rgb(240, 102, 102);">ta</span></p>

Pythagus

Multiple nested list issue

Hi @ffmad,

As you have seen I've been doing a bit of work on the library (https://github.com/rkorebrits/HTMLtoOpenXML) as I needed the logic. Not sure if you have any use for the library yourself anymore, but in case you are bored and do want to spend some time on it:

The code doesn't parse nested lists properly. I improved the logic by Geoff so that it resets the counts per list and later added logic for 2 levels of lists, but it currently still breaks on 3 levels, like:

  • asd
    • adas
      • adsasd

The logic needs to be altered a bit so that it recursively looks for nests and parses them, while keeping the proper indentation. I'll probably get to it sometime in the near future myself otherwise.

When creating a Word document, you also need manually edit the numbering.xml and I want to add a few sample files and explanation to the project next time I work on it.

Styling a <li> element

When I convert a <li>, I get an unstyled list - no bullet or number.

Is there a way to style this? Either by adding styles to the HTML, or updating the conversion code?

It appears to assign the style:

</w:t></w:r><w:p startliste><w:r><w:t>

Which is later converted:

$output = preg_replace("/(<w:p startliste>)/mi", "</w:p><w:p><w:pPr><w:pStyle w:val='BulletStyle'/></w:pPr>", $output);

It isn't clear what BulletStyle is defined as.

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.