It's all about the answers!

Ask a question

Adding text style to DNG module inline editor


David Maroshi (133) | asked Jul 01 '14, 1:46 a.m.
Greetings team,

1. I wonder if it is possible to add text style to the artifact editor, and module inline editor.
Current styles are: Normal, Heading 1-6.
2. Is there any way to change the styles with css files.

Thanks

One answer



permanent link
Steve Wood (1162) | answered Jul 01 '14, 5:04 p.m.
edited Jul 01 '14, 5:05 p.m.
Hi,

At present, it's not possible to change the way that any of the existing styles work or to add new ones to the editor.  You cannot contribute custom CSS either.

One option you have is to create a DNG Client Extension - these have access via a JavaScript API to all the attributes of an artifact, including the primary text.  You can therefore use one to read the text value of the an artifact or group of artifacts in a colleciton or module, change the text and write it back.  So you could take the current primary text string, put it into an DOM element, run some query to find e.g. all h1 elements then apply an inline style that makes them purple with a piece of jQuery e.g. before writing the primary text back.

If you think this would be any use - the documentation for getting started is here :


DNG Client Extensions

Hope this helps. I can provide some sample code to do something like the above if required.

Thanks,

Steve Wood.

Developer RM Team


Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.