Major
Nice to have
Bugfix
Major
Major
#23013
WYSIWYG editor: text color, font, hyperlinks, references to TL subject objects, source code
The following functions are possible extensions of the WYSIWYG editor:
- Support for WYSIWYG attributes in tables / grids (To do this, design a field similar to the text popup fields for multi-line string attributes for WYSIWYG attributes).
- Text formatting:
- Text color
- Text highlighting (background color)
- Font and font size
- Insertion:
- Hyperlinks (either manual insertion or automatic detection similar to BulletinBoardRenderer).
- Emojis
- Images
- References to TL subject objects
- Format text as source code
In the application configuration the additional functions should be able to be activated/deactivated. At least the possibility of entering hyperlinks can lead to security problems. Here you must at least make sure that no JavaScript can be executed in the page via the link(javascript:.. must be forbidden).
Application
The configuration of the CKEditor can be customized using the com.top_logic.layout.wysiwyg.ui.StructuredTextConfigService service by selecting from a list of available features:
#!xml <config service-class="com.top_logic.layout.wysiwyg.ui.StructuredTextConfigService"> <instance> <html-config> <feature-ref name="basicstyles" /> <feature-ref name="colors" /> <feature-ref name="insert" /> </html-config> </instance> </config>
This feature list can also be customized per HTML attribute via the annotation wysiwyg.
#!xml <property name="description" type="tl.model.wysiwyg:Html"> <annotations> <wysiwyg features="basicstyles, insert"/> </annotations> </property>
CKEditor Demo
On https://ckeditor.com/docs/ckeditor4/latest/examples/fullpreset.html you can find a demo of CKEditor with all native features.
Test
/com.top_logic.demo/src/test/com/top_logic/demo/scripted/wysiwyg/TestWysiwyg.script.xml