Make Custom BBCode Work Like an Existing Tag. #856
Replies: 4 comments
-
To prevent the tags from being repeatedly spammed, you need to add logic to test if the tag is already there. |
Beta Was this translation helpful? Give feedback.
-
@brunoais I understand that but surly as the logic is already there you can just run a function? i literally need the same logic as a bold tag but cant find that anywhere, the only thing i can find is
Surly theres a better way to get the same logic then to have to write it all over again? Also
works fine. |
Beta Was this translation helpful? Give feedback.
-
The bold button is executed by the browser itself, not SCE. |
Beta Was this translation helpful? Give feedback.
-
I assume you want to toggle the tag on and off. Unfortunately, this requires some extra code.
Bare minimum testing. I just made sure the tag toggles around a word and that the button activates. It may or may not work to your satisfaction. |
Beta Was this translation helpful? Give feedback.
-
So i have a custom BB code but when i select the text and then press my custom button it doesnt behave like the rest. Example, when i highlight some text and press bold it will toggle the selected text bold or not. However after adding my custom BB tag it will constantly just spam my tags in the wysiwyg. So how do i get them to behave the same. Here is my code.
Beta Was this translation helpful? Give feedback.
All reactions