joelwenger/textspecial 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joelwenger/textspecial

Composer 安装命令:

composer require joelwenger/textspecial

包简介

TextSpecial is a small parser class for a proprietary markup language that can handle multiple columns.

README 文档

README

Description

TextSpecial is a class for parsing a proprietary but simple markup language that can handle multiple columns. No CSS framework was used, for simple fast and convenient use in smaller projects.

Requirements

  • PHP >= 5.6

Installation

composer require joelwenger/textspecial

Basic Usage

first some settings:

<?php

# use this namespace
use joelwenger\textspecial\src\TextSpecial;

# When installed via composer
require  __DIR__.'/vendor/autoload.php';

# Instantiate class
$textSpecial = new TextSpecial();

# multiple settings at once, not required
$textSpecial->setSettings( [
    'debug' => FALSE,
    'pathimg' => 'img/',
    'font_family' => 'Verdana,Arial,Helvetica,sans-serif',
    'color' => '#003388',
    'background' => '#ffffff',
    'table_title_bg_color' => '#888888',
    'table_title_text_color' => '#ffffff',
    'table_td_bg_color' => '#cccccc',
    'table_td_text_color' => '#000000',
    'code_text_color' => '#2e6e3c',
    'code_bg_color' => '#cccccc',
    'marking_color' => '#ff0000',
] );

// or single setting
$textSpecial->setSetting( 'color', '#003388');

// now read markup from file
$textSpecial->setFile( 'example.txt' );

// or get markup from string
$textSpecial->setText( 'c:9
h1u:title
p:Lorem ipsum dolor sit amet, ...' );

then the output:

<!DOCTYPE html>

<html lang='de'>
<head>
    <title>any title</title>
    <meta http-equiv='content-type' content='text/html; charset=utf-8'>
    <style><?= $textSpecial->getCSS() ?></style>
</head>
<body>
<?= $textSpecial->getHtml() ?>
</body>
</html>

done

Markup Language

As described in the example. Other options will certainly follow.

@Todo

  • Form creation
  • using Bootstrap 5
  • export as single file Html or MHTML
  • parsing URL's, email addresses, etc.
  • whatever ...

License

TextSpecial is released under the MIT License.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2022-08-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固