Hello,
I have been looking around for a little while now and cant seem to find an answer to the following question.
Is there a way to add a button to the DHTMLX Editor to allow creation of hyperlinks and change font/background color as well?
So what I need is a toolbar item for:
-Hyperlink creation ([link name])
-Text Color changer (with color picker)
-Background color changer (for highlighted text with color picker)
If you have any information please respond/point me in the right direction.
Thank You in advance.
~Nick
Hello,
there isn’t ready functionality for links and colors. However, possibly the following private properties of the editor will help:
- tb - dhtmlxToolbar object. Using this property you may add add buttons (the methods for adding toolbar icons could be found in the documentation):
var toolbar = editor.tb:
toolbar.addButton(id, index, text, icon);
You may attach the necessary event handlers to process button click:
toolbar.attachEvent(“onClick”,function(itemId){
…
})
- editor.edDoc - the editor document. You apply formating to it.