Library which converts HTML to BBCode.
Based On: html-to-markdown
HTML To BBCode Converter
Library which converts HTML to BBCode.
Based On: html-to-markdown
Here is a converter for <blockquote>
blockquote.patch.txt
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]
Add <em>
and <strong>
converters.
See attached patch:
strong_em_converter.patch.txt
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]
?
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');
Same as in this ticket:
dedalozzo/converter#4
except that it would be easier to implement in this library, given that it appears to be already DOM aware.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.