The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

more fonts in the editor?

View previous topic View next topic Go down

Solved more fonts in the editor?

Post by QeemBA on July 9th 2014, 6:10 am

Hi everyone

Is it possible to have more fonts inside the editor??

QeemBA
Forumember

Posts : 38
Reputation : 1
Language : English

http://teamtazkirah.forummotion.com/

Back to top Go down

Solved Re: more fonts in the editor?

Post by Ange Tuteur on July 9th 2014, 8:59 am

Hello Qeemba,

I wrote up a quick draft for you to test. This will allow you to add new fonts to the list of fonts :
Administration panel > Modules > Javascript codes management > create a new script

Title : Your choice
Placement : In all the pages
Paste the code below :
Code:
$(function(){$(function() {
  $('.sceditor-button-font').click(function() {
    addFont('Calibri');
    addFont('Papyrus');
    addFont('Copperplate');
    addFont('Avantgarde');
   
    $('.sceditor-font-option.new-font').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[font='+$(this).attr('data-font')+']','[/font]');$('.sceditor-font-picker').remove();e.preventDefault()})
  });
  function addFont(font){$('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="'+font+'"><font unselectable="on" face="'+font+'">'+font+'</font></a>')}
})});

To add new fonts to the list simply write addFont(); between the parenthesis you'll write the font you want in quotes. For example :
Code:
addFont('Baskerville');

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: more fonts in the editor?

Post by QeemBA on July 9th 2014, 9:34 am

Hi Ange

Yes it did works! Big Thanks Smile

QeemBA
Forumember

Posts : 38
Reputation : 1
Language : English

http://teamtazkirah.forummotion.com/

Back to top Go down

Solved Re: more fonts in the editor?

Post by Ange Tuteur on July 9th 2014, 10:56 am

You're welcome

Topic archived

Have a good day. Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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