Notifications
Clear all

[Solved] How to highlight HTML code?

18 Posts
4 Users
4 Reactions
1,303 Views
Posts: 27
Customer
Topic starter
(@mathias-latournerie)
Member
Joined: 4 years ago

Hello,

How can you highlight HTML/XML code with this plugin?

As soon as I try to post HTML content as "code", wpForo remove all tags, or just display the HTML tags (even worse).

Same for XML or Handlebars.

 

Example:

Attached file: HTML in Visual Code

Capture d’écran 2021 01 26 190822

 

Without "code":

<li class="sfx flexrow sfx-line">
<div class="sfx-data">
<input type="text" name="sfxLine[{{id}}][diceType]" value="" placeholder="d20, d6, df..." />
</div>
<div class="sfx-data">
<input type="text" name="sfxLine[{{id}}][onResult]" value="" placeholder="1, 20, 6..." />
</div>
<div class="sfx-data sfx-double">
<select name="sfxLine[{{id}}][specialEffect]">
{{selectOptions specialEffectsMode localize=true}}
</select>
</div>
<div class="sfx-controls">
<a class="sfx-control sfx-delete" title='{{localize "DICESONICE.Delete"}}'><i class="fas fa-trash"></i></a>
</div>
</li>

 

With "code":

 

<li class="sfx flexrow sfx-line">
<div class="sfx-data">
<input type="text" name="sfxLine[{{id}}][diceType]" value="" placeholder="d20, d6, df..." />
</div>
<div class="sfx-data">
<input type="text" name="sfxLine[{{id}}][onResult]" value="" placeholder="1, 20, 6..." />
</div>
<div class="sfx-data sfx-double">
<select name="sfxLine[{{id}}][specialEffect]">
{{selectOptions specialEffectsMode localize=true}}
</select>
</div>
<div class="sfx-controls">
<a class="sfx-control sfx-delete" title='{{localize "DICESONICE.Delete"}}'><i class="fas fa-trash"></i></a>
</div>
</li>

 

17 Replies
Posts: 27
Customer
Topic starter
(@mathias-latournerie)
Member
Joined: 4 years ago

Well, it looks like either this forum has different settings or it doesn't have the highlight add-ons.

 

Here is a screenshot of what I have on my forum:

Top: Code

Bottom: No code

Capture d’écran 2021 01 26 190940
2 Replies
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

@mathias-latournerie,

This issue will be fixed in the upcoming version. Please wait for the next update. It'll come soon.  

Customer
(@mathias-latournerie)
Joined: 4 years ago

Member
Posts: 27

@astghik Hey! There was a new release of the plugin today but I'm still having the same issue :/

That's really an issue for me as this forum really need to have a way to share HTML code. Right now it's totally impossible, even without the "code" tag.

It even looks like it could be a security concern if people are able to just write HTML code in the forum post!

Posts: 27
Customer
Topic starter
(@mathias-latournerie)
Member
Joined: 4 years ago

Thanks!

Posts: 74
Customer
(@tutrix)
Member
Joined: 4 years ago

hello @mathias-latournerie
your HTML code works in my forum without any problems

inserted correctly with code  <>

https://www.screencast.com/t/ceL2hFzR2aB

inserted incorrectly with source text  {:}

https://www.screencast.com/t/oM6O92DofiY

11 Replies
Customer
(@mathias-latournerie)
Joined: 4 years ago

Member
Posts: 27

@tutrix Hey! Thanks for checking! That's so strange, why would it not work for me? :/

I did exactly what you did and I get the same result I posted

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

@mathias-latournerie,

Please delete all kind of caches (website, browser, purge CDN if you have) and check again. If it still does not work, please register some new testing user and send the user's login details with your forum URL to info[at]gvectors.com email address. 

Customer
(@mathias-latournerie)
Joined: 4 years ago

Member
Posts: 27

@astghik Thanks, I've done that!

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

@mathias-latournerie,

Please change the role of the current user to Administrator and let us know. 

Customer
(@mathias-latournerie)
Joined: 4 years ago

Member
Posts: 27

@astghik done! Please note my website is officially launched tonight (9pm CET) so please do not disrupt major settings (ie: do not disable W3 Total Cache or things like that. I've had another plugin support team doing this so I prefer to warn you, sorry)

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

@mathias-latournerie

Please open a plugin editing feature, to allow the developers to check the issue.

More info in this article: https://www.ionos.com/community/websites-ecommerce/wordpress/activate-wordpress-theme-and-plug-in-editor/

(ie: do not disable W3 Total Cache or things like that. I've had another plugin support team doing this so I prefer to warn you, sorry)

Sure, thank you. 

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

You can also backup your WordPress site and send it to info[at]gvectors.com email address to allow us to check it. You can do it via  Duplicator — WordPress Migration Plugin.

Customer
(@mathias-latournerie)
Joined: 4 years ago

Member
Posts: 27

@astghik Hmm that seems to already be enabled?  What do I need to do exactly? It seems to be already working, I was able to edit a file of wpForo just fine.

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

@mathias-latournerie,

the issue comes from the Forums Censure PRO plugin. We'll update it very soon. 

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6101

@mathias-latournerie,

The new version of the Forums Censure PRO plugin is ready, please update it, delete all caches and check again. 

Customer
(@mathias-latournerie)
Joined: 4 years ago

Member
Posts: 27

@astghik It worked, thanks!

Posts: 1
(@danielcharles)
New Member
Joined: 4 years ago
Hi, I am Daniel
 
Highlight using the HTML5 <mark> tag

If you are working on an HTML5 page, the <mark> tag can quickly highlight text. Below is an example of the how to use the mark tag and its result. If your browser supports the <mark> tag, "highlighted text" should have a yellow background.

Share:
Scroll to top