-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MediaEmbed: disable URL autoparsing #91
Comments
Yes, you can remove the plugin after configuration or disable it at runtime. // After configuration
unset($configurator->MediaEmbed);
// At runtime
$parser->disablePlugin('MediaEmbed'); |
@JoshyPHP this should be re-opened as it did not answer the question. mediaembed works for both urls and things inside the media bbcode tag, they (and myself since i got here from google) only want to disable url auto-parsing while keeping the |
As far as I can tell, it works as described. $configurator = new s9e\TextFormatter\Configurator;
$configurator->MediaEmbed->add('youtube');
unset($configurator->MediaEmbed);
extract($configurator->finalize());
$text = "[media]https://www.youtube.com/watch?v=jNQXAC9IVRw[/media]\n"
. 'https://www.youtube.com/watch?v=jNQXAC9IVRw';
$xml = $parser->parse($text);
die("$xml\n"); $configurator = new s9e\TextFormatter\Configurator;
$configurator->MediaEmbed->add('youtube');
extract($configurator->finalize());
$parser->disablePlugin('MediaEmbed');
$text = "[media]https://www.youtube.com/watch?v=jNQXAC9IVRw[/media]\n"
. 'https://www.youtube.com/watch?v=jNQXAC9IVRw';
$xml = $parser->parse($text);
die("$xml\n"); <r><YOUTUBE id="jNQXAC9IVRw"><s>[media]</s>https://www.youtube.com/watch?v=jNQXAC9IVRw<e>[/media]</e></YOUTUBE>
https://www.youtube.com/watch?v=jNQXAC9IVRw</r> |
Hi,
is there any way to disable URL conversion to media embeds while keeping the [media] bbcode?
Thank you.
Edit: I meant the [media] bbcode. You still understood me.
The text was updated successfully, but these errors were encountered: