You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#107241 Character Map - Adding own Characters

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by bobbla on Friday, 02 April 2021 12:32 BST

bobbla
In JCE its a Character Map for inserting special Characters as plain HTML, how can I add my own Characters? ie. { = ❴ ? In the code view, it keeps going back to the { when I use the Character Map to insert it.

In profiles its possible to add more Characters.

Ryan
In Editor Profiles -> Plugin Parameters -> Character Map, you can add custom characters, so in your case, create 2 entries for the left and right Medium Curly Bracket Ornament, eg:

https://cdn.joomlacontenteditor.net/tmp/107241-character-map-adding-own-characters.jpg

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
I have done this, but when I use the Character Map in an article it Reset the code to { and } it does not show the HTML Code

Ryan
Are you inserting the new brackets using the Character Map dialog? The new brackets will not replace existing {} brackets, they have to be inserted using the dialog or pasted in.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
I write tutorials about Joomla like this
https://www.joomlaforever.com/Basic-Tutorials/how-to-add-styles-in-joomla-without-html-code-in-jce-editor

I want to include ie the field tag like this {field 1} only displaying it like HTML code so the field does not appear, that's why the HTML entity ❴ as { and so on but the HTML code disappear after saving. I have turned off the validate HTML.

bobbla
When i use the Character Map it won't insert the HTML entity eighter.

Ryan
Is the character removed only when you save, or if you switch to the Code tab?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
Both times 🙂

Ryan
I think I might be misunderstanding the issue. Please send me a login - https://www.joomlacontenteditor.net/contact/site-login - and include any information you can to replicate the issue on your site.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
I will first try to elaborate:


I write articles with plain content, in some articles I want to include content that conflicts with Joomla's method to display for instance a field included like {field 1}. This works great.

I want to write in HTML {field 1} as ❴field 1&10101; witch displays the { and } as an HTML Entity not conflicting with the nametag {field 1} using the insert with Character Map, but when I change to Code it displays as { and }. I have also tried to insert the HTML Entity directly in HTML, this works on first save, but when I open the article again to edit it, it goes back to plain {field 1}, and not ❴field 1&10101;.

bobbla
the post does not display the

{field 1}

bobbla
{ field 1 }

Ryan
In the Editor Global Configuration, what is the Entity Encoding option set to?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
UTF-8

Ryan
This is working fine for me in my tests, see below: https://cdn.joomlacontenteditor.net/tmp/107241-character-map-adding-own-characters.gif but, I think there is a better way to do this, without using {} in the article at all, but using css to display them. Add the following to your template stylesheet:

span.curly-brackets {
	display: inline-block;
	background-color: #eee;
}

span.curly-brackets:before {
	content: "{";
}

span.curly-brackets:after {
	content: "}";
}
Then, go to Editor Profiles -> Plugin Parameters -> Style Select, and create a new Custom Style, as in the image below (Tag value set to span and curly-brackets in the Classes field) https://cdn.joomlacontenteditor.net/tmp/107241-character-map-adding-own-characters-2.jpg You can now select some text, then select the Curly Brackets option from the Styles list to apply the span and curly-brackets class.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
Yes, I know that this works, but this will display field 1 as a Custom Field or not display at all in the Joomla article after saving. I want to use the Entity to display the { and }

Ryan
I want to use the Entity to display the { and }


I sugeested using the css approach as this will not actually write {} to the content, so it won't be processed by Joomla plugins, it will display in the content as {field1}. I assumed that this is what you wanted.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

bobbla
THX For good help!

bobbla
THis CSS method don't display the curly brackets in the article

bobbla
Sorry it did show up, my bad 😛