Skip to content

Fix bugs & adding features

Compare
Choose a tag to compare
@tanghoong tanghoong released this 19 Oct 05:31

This version are decided only detect single colon so the rendering are always correct according to the article language.

    $cui = new ChatUI([
        'allowForkScript' => 'https://editor.chatnovel.app/',  // default:null
        'mainCastColor'  => '#198754',
        'castColorMode'  => 'palette', // none, random, palette 
        'chatHeaderSize' => 'large'  // default:normal ,small, large
    ]);
    // $cui->setColon([':']); // en, default
    $cui->setColon([':']); // zh
    $cui->setNarrator(['Narrator','narrator','系统','旁白']);
    echo sprintf('<style>%s</style>', $cui->renderCss());
    $cui->feed($sample);
    echo $cui->render();

Fix default colon
Fix whitespace for name
Fix linebreak to br tag
Fix link tag
Fix block chat content detection
Allow linebreak in same chat block
Allow color to main cast
Add scene tag
Add Debug tools
Add palette color chat block
Ignore script by comment