Giter Site home page Giter Site logo

html-to-bbcode's Introduction

HTML To BBCode for PHP

Build Status

Latest Stable Version Total Downloads Latest Unstable Version License

Library which converts HTML to BBCode.

Based On: html-to-markdown

html-to-bbcode's People

Contributors

publicru-automation avatar vamsiikrishna avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

html-to-bbcode's Issues

Table Converter

Add a Table Converter

Example:

<table>
   <tr>
      <td>table 1</td>
      <td>table 2</td>
   </tr>
   <tr>
      <td>table 3</td>
      <td>table 4</td>
   </tr>
</table>

Should Return

[table]
  [tr]
  [td]table 1[/td]
  [td]table 2[/td]
  [/tr]
  [tr]
  [td]table 3[/td]
  [td]table 4[/td]
  [/tr]
[/table]

Convertor settings

In HtmlConverter.php, there are default settings in the constructor.

The settings 'strip_tags' is taken into account in Converter/DefaultConverter.php, but other settings like 'bold_style' etc do not seem to make any difference.

How would I configure the convertor, if I want to render <h2> tags differently than with [h2]?

autoload.php is missing

In example/example.php
there is the line: require_once __DIR__ . '/../vendor/autoload.php';
but autoload.php does not appear to be included in the source repository.

I managed to use this otherwise very fine library (Thanks!) by including all the files first:

include_once('src/ConfigurationAwareInterface.php');
include_once('src/Configuration.php');
include_once('src/Converter/ConverterInterface.php');
include_once('src/Converter/BreakConverter.php');
include_once('src/Converter/DefaultConverter.php');
include_once('src/Converter/FontConverter.php');
include_once('src/Converter/HeadConverter.php');
include_once('src/Converter/ImageConverter.php');
include_once('src/Converter/LinkConverter.php');
include_once('src/Converter/ListConverter.php');
include_once('src/Converter/ParagraphConverter.php');
include_once('src/Converter/TextStyleConverter.php');
include_once('src/ElementInterface.php');
include_once('src/Element.php');
include_once('src/Environment.php');
include_once('src/HtmlConverter.php');

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.