612 questions
0
votes
0
answers
36
views
Using preg_replace for bbcodes to convert texts
I'm in the process of upgrading my site's engine. The new version does not support bbcodes, and all my forum posts and articles are created using it.
I want to make a script to convert all text with ...
0
votes
1
answer
68
views
Issue with BBCode image tag on React
I have such component which renders the BBCode image tag on my website on React:
Code:
BBCodeComponent.tsx:
import React from "react";
import ReactDOMServer from "react-dom/server";...
1
vote
1
answer
375
views
MemoQ regex tagger issue with [xxx]yyy[/xxx] (SOLVED IN COMMENTS)
I have been banging my head with this for the last hour and a half and cannot make it work. I am trying to create a regular expression for MemoQ's Regex tagger.
I have a series of these:
zzz [xxx]yyy[/...
0
votes
2
answers
1k
views
Godot 4: How to enter unicode character into RichTextLabel via character code?
I'm using a RichTextLabel in Godot 4 and I'm trying to insert a special unicode character into it (I'm using fontawesome). I know the unicode index of said character. How do I add it to the label via ...
1
vote
1
answer
100
views
Custom Pandoc Writer/Filter: Output BulletList as BBCode
I'd like to convert this markdown list (list.md):
- Europe
- Germany
- Berlin
- Hamburg
To the following output (BBCode):
[list]
[*]Europe
[list]
[*]Germany
[list]
...
0
votes
0
answers
23
views
Best solution implementing "basic" bbcode with php [duplicate]
I'm writing a board software which have basic styling such as bold, italic, underline, strikethrough. I use the bbcode syntax for them. For full bbcode support/compatible, I will need regex, but for ...
1
vote
2
answers
266
views
Is it possible to use HTML markup, to "force" BBCode to imbed images with specific dimensions?
I spend quite a bit of time asking questions and answering questions in allot of education/learning oriented communities. More recent forums use Markdown but there are still quite allot of forums ...
0
votes
1
answer
66
views
Replacing BB Code table tag using preg_replace
i have the below string.
$string="My Table
[table][tr][th]No.[/th][th]Content[/th][/tr][tr][td]1[/td][td]First[/td][/tr][tr][td]2[/td][td]Second[/td][/tr][tr][td]3[/td][td]Third[/td][/tr][/table]...
0
votes
1
answer
456
views
Godot how do i erase characters using backspace
I'm trying to program a textbox that I can write in using the keyboard; but the backspace key doesn't erase text, nothing happens when I press it.
extends Node2D
onready var Text = $Panel/...
0
votes
1
answer
570
views
BBCode parser to HTML
I use the BBCode Library to format some bbcode texts.
I write the next code :
import bbcode
import re
# Installing simple formatters.
parser = bbcode.Parser()
parser.add_simple_formatter('p', '<p&...
2
votes
0
answers
162
views
How to change the output type in ckeditor 5 from bbcode to html
I downloaded ckeditor and used it without any changes in the project, but when sending to the backend, it displays bbcode instead of html tags.
This problem was easily solved in version 4, but I could ...
0
votes
0
answers
27
views
Declaration of class_bbcode
Hi Guys I run an old php board and I've a warning:
<Declaration of class_bbcode::convert_emoticon($matches = Array) should be compatible with class_bbcode_core::convert_emoticon($code = '', $image ...
0
votes
1
answer
206
views
YouTube embedded video issue
I want to embed the YouTube video on my website. The problem is with timeline and origin link properties. For example, I have some text and 2 bbCode video tags, one with timeline and 2nd without ...
0
votes
1
answer
97
views
Trying to get `sed `to fix a phpBB board - but I cannot get my regexp to work
I have an ancient phpBB3 board which has gone through several updates over its 15+ years of existence. Sometimes, in the distant past, such updates would partially fail, leaving all sorts of 'garbage' ...
1
vote
0
answers
52
views
problems result nested bbcode colors
I worked this period on bbcode and encountered a problem (nested similar codes)
this is the code 01 :
function FFF999_BBcode($content)
{
$search = array (
'/(\[color=)(.*?)(\])(.*?)(\[\/color\...
-1
votes
1
answer
80
views
remove spaces in bbcode Values aftar "]" AND befor "["
Is there a way to correct the input before it is used by trim() or other ??
The input must first be corrected From
[youtube] IHu9-Q30Nuw [/youtube]
texttexttext
texttext
[code] ...
1
vote
1
answer
301
views
Configuring the display of the link preview in the Bitrix chat bot
I am a beginner developer.
My goal: creating a chat bot in Bitrix with loading news on demand.
Problem: Links (more precisely, the first link from the list) are displayed as previews at the bottom of ...
1
vote
1
answer
2k
views
Godot RichTextLabel BBCODE Table and List support
I am learning Godot. I am attempting to use bbcode tables and lists inside the RichTextLabel type. It doesn't appear to work. Am I doing something wrong, or are tables not supported?
I have tried ...
0
votes
1
answer
782
views
Javascript Regex to convert _xxx_ to [i]xxx[i] ignoring any text between <> (URLs) or `` (code)
I'm trying to reformat Slack formatting to bbcode and need a little help. Slack does italics like this:
_this is italic_ and this isn't
My current expression (/\_([^\_]*)\_/gm) works but ...
4
votes
1
answer
725
views
How do I use regex to convert Slack URLs to BB Code?
I'm trying to use regex to convert Slack's version of markdown formatting to BB Code. I'm stuck on links at the moment. Slack formats like this:
<www.url.com|This is the actual text>
<www.url....
1
vote
2
answers
106
views
How do I replace custom BBCode style tag with a hyperlink
I've got a bunch of text which can contain custom tags in this format:
[MYLINK ID="1234" URL="http://mywebsite.com" TEXT="Website link"]
The text can contain multiple ...
0
votes
1
answer
55
views
Replace BB code with hyperlinks for ALL occurrences
I have this replace code to parse BB code and convert links to clickable hyperlinks. This works for one link, however if there is more than one link in the string, it merges them together in one long ...
0
votes
1
answer
74
views
(Php) BBcode same tag in tag interesting nested problem
This is my function.
class bbcode{
var $bbcode_bb2html;
function __construct($string){
$this->bbcode_bb2html= $string;
}
function bbcode_parse_codes( ){
$...
0
votes
0
answers
96
views
Quote from bbcode
I'm currently trying to make a quote system for my forum and since I am using bb-codes throughout the whole system I want to implement this for quoting aswell.
I have created what I want the quote tag ...
1
vote
1
answer
74
views
How to parse html tags in CodeKicker BB Code Core
I am trying to parse the following string content using CodeKicker BBCode Core.
String to parse = [urltab=www.google.com]www.google.com[/urltab]
Expected output = <a href="www.google.com" ...
2
votes
3
answers
6k
views
Godot: How to vertically align bbcode
is there a way to vertically align the text like this using bbcode?
[img=16]res://icon.png[/img] Hello World
1
vote
1
answer
65
views
Matching substrings with PHP preg_match_all()
I'm attempting to create a lightweight BBCode parser without hardcoding regex matches for each element. My way is utilizing preg_replace_callback() to process the match in the function.
My simple yet ...
1
vote
2
answers
350
views
Replace BBCodes in HTML codes and vice versa
I have a sentence with BBCodes and I would like to replace it with HTML codes:
$sentence = '[html style="font-size: 18px;" dir="ltr"][div style="font-size: 18px;" dir=&...
1
vote
1
answer
208
views
Multidimentional BBCODE
I am trying to make myself a BBCODE parser in PHP.
Now I have the following Regex:
\[quote\](.*?)\[\/quote\]
This should replace with:
<div class='quote'><div class='quotetext'>$1</...
0
votes
1
answer
427
views
Extract BBCode using regex
I'm trying to extract a subset of BBCode ([U],[B],[I]) from a string using a regex. I found plenty of questions asking how to simply parse/replace BBCode in a string, but I want to extract all parts - ...
-1
votes
2
answers
397
views
Parse BBCode in array
I am trying to call a function from BBCode(like WordPress shortcodes). but I didn't find any code to do that, only I found HTML tag parser like:
[bold]Bold text[/bold]
->
<b>Bold text</b&...
0
votes
1
answer
98
views
Different outcomes when styling 2 spans with bbcode parser
What is different here? Am I doing something wrong? Is it maybe because of my BBCode parser? I believe both of these should look like the first example.
<span style="color:#00369B"><...
0
votes
1
answer
87
views
Python SyntaxError: invalid syntax when implementing bbcodepy
I got bbcodepy and I'm allowed to modify it, but I can't import it in my main.py. I keep getting a SyntaxError and I don't really know what's wrong with the code because I didn't write it. I just want ...
0
votes
1
answer
396
views
sceditor how to parse bbcode back to html?
I'm having the same issue as this user here. I can't comment on the post and it's been almost 6 years since the post. The only answer is this:
var val = $('textarea').sceditor('instance').val();
var ...
4
votes
1
answer
146
views
Need help converting bbcode URLs that contain spaces to valid markdown
As part of some data migration I'm converting user content from bbcode to markdown.
I'm doing the conversion in a custom MySQL 8.0.22 function, which contains the following line to convert bbcode [url]...
3
votes
3
answers
244
views
How can I combine two (or more) preg_replace's - PHP
< EDIT >
I Wanted to give a big thank you to all of you who have provided an answer, You have all given me great options. I will play with each and see which one suits my exact needs prior to ...
0
votes
1
answer
419
views
convert BBcode to Json or xml
my question is very simple there a way to conver BBCODE to XML or JSON ?
i have a db that have a fild that contain a BBCODE that will be send to printer.
i need to convert this bbcode into a valid ...
0
votes
0
answers
125
views
Parsing BBCode on AJAX success
I am in a spot here trying to parse BBCode upon a AJAX success : item.message object. I am using jQuery 1.11. I have tried passing the var result in place of item.message, and only shows the [object] ...
0
votes
1
answer
236
views
how to parse bbcode [youtube]id[/youtube] in php
I want to replace bbcode
I want to convert it to an iframe
This is what I have so far, but it doesnt work
echo preg_replace('#\[yt\](.*)\[/yt\]#i', return '<iframe width="350" height="250" src="...
0
votes
0
answers
809
views
Convert HTML to BBCode
I want to convert HTML to BBCode, I've already found this: How to convert HTML to BBCode
but this is with XSLT, and I haven't ever worked with XSLT
If there's any way to convert HTML to BBCode with ...
0
votes
1
answer
202
views
How to prevent img html tag in other html tags - wordpress
Sorry for my bad grammar, English is not my main language :)
I'm developing a fully ajax frontend based wordpress theme based on user comments and I wanted to add a rich text editor (Froala). And as ...
0
votes
1
answer
1k
views
How can I convert bbcode characters to jsx? (enriching text)
Text = "I have this text [b] and want this part to be bold [/b]."
How can I replace the [b] and [/b] with strong html tag
so that the output is => I have this text and want this part to be bold.
I ...
0
votes
1
answer
138
views
Set list item tag to [*]x instead of [li]x[/li] in SCEditor for vBulletin compatibility
TL;DR
SCEditor uses [li]test[/li] for list items. To make it compatible for VB, I want to change this to [*]test. But my approach doesn't full work. I can make the editor to insert [*] for list items....
0
votes
1
answer
90
views
Converting bbcode into special format
I'm trying to parse BBCode, specifically, XenForo's BBCode into strings, however, replacing with specific characters.
For example, here's a quote and a response.
"[QUOTE=\"admin, post: 775, member: ...
2
votes
3
answers
122
views
How to clean duplicate BB tags [closed]
[i][b][i][b](This is a paragraph with BBcode.)[/b][/i][/b][/i]
Some of my BB code has double tags, whats the best way to remove this?
I've tried a few things mostly regex, but I'm honestly a novice ...
1
vote
2
answers
3k
views
React TinyMCE editor set bbcode content dynamically
I am using this official component https://www.tiny.cloud/docs/integrations/react/
I want to use this method from documentation https://www.tiny.cloud/docs/api/tinymce/tinymce.editor/#setcontent in ...
0
votes
1
answer
269
views
RegEx for converting tags to BBCode [duplicate]
I have a form which takes HTML, converts it to BBCode and stores it in the database.
Most tag renaming is easily handled with a simple switch, however, text alignment is causing me some trouble.
...
0
votes
2
answers
53
views
How to make text from an input appear in another space as user goes typing on it?
I have a Wordpress contact form and it does NOT accept HTML/JavaScript content, but only a sort of BBCode like this:
[contact-form]
[contact-field label="Name" type="name" required="1"/]
[contact-...
0
votes
2
answers
257
views
RegEx for capturing the first closing tag in BBCode
I have this regex (Regex101):
\[tag(?:=(["']?)(.+)\1)?\](.*?)\[\/tag\]
It allows four different forms:
[tag=foo]foo[/tag]
[tag="foo"]foo[/tag]
[tag='foo']foo[/tag]
[tag]sdfo[/tag]
All forms works, ...
0
votes
1
answer
250
views
Custom YouTube BBcode <object> doesn't allow to watch full screen
I want to create custom BBCode for Youtube that will allow the user to open a full-screen video on my website. When I hover over a "full-screen" button it says:
full screen is unavailable
I tried ...