The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How do I add custom BBCode?

2 posters

Go down

How do I add custom BBCode? Empty How do I add custom BBCode?

Post by andreiwow2 March 13th 2018, 6:39 pm

Hello, what I am trying to do is add custom BBCodes for staff members for example "announcement template" etc. Is there any place where I can do the BBCode or do I have to do a workaround? Add a button to the editor which when clicked insert the text in the editor? Question
andreiwow2
andreiwow2
New Member

Posts : 1
Reputation : 1
Language : Romanian

http://www.freshgamingrp.com

Back to top Go down

How do I add custom BBCode? Empty Re: How do I add custom BBCode?

Post by SSYT March 13th 2018, 8:18 pm

Try:

Javascript:
Code:
$(function() {
  $.sceditor.command.set('newcmd', {
    exec: function() {
            this.insert('a');
    },
    txtExec: function() {
            this.insert('a');
    },
    tooltip: 'Added new button'
  });

  if($.sceditor && window.toolbar) {
     window.toolbar = window.toolbar.replace(/time,/gi, "time,newcmd,");
  }
});

CSS:
Code:
.sceditor-button-newcmd {
    background: url('/images/icon.png');
}
SSYT
SSYT
Forumember

Male Posts : 77
Reputation : 15
Language : RO-10, EN-3, FR-1
Location : Romania

http://help.forumgratuit.ro/forum

Simone Boi likes this post

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum