Skip to content

Commit

Permalink
#784 Make Rich Text Editor configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
FRANCOIS DESCAMPS authored and pdulth committed Apr 29, 2024
1 parent 3f1aa4c commit 6d4e90c
Show file tree
Hide file tree
Showing 45 changed files with 3,097 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@
<module>../../../richtext/plugins/org.polarsys.kitalpha.richtext.widget.tools.ext.strategies</module>
<module>../../../richtext/plugins/org.polarsys.kitalpha.richtext.widget.tools</module>
<module>../../../richtext/plugins/org.polarsys.kitalpha.richtext.widget</module>
<module>../../../richtext/plugins/org.polarsys.kitalpha.richtext.widget.configurable</module>
<module>../../../richtext/plugins/org.polarsys.kitalpha.richtext.widget.configurable.preferences.core</module>
<module>../../../richtext/plugins/org.polarsys.kitalpha.richtext.widget.configurable.preferences.ui</module>

<module>../../../sirius/features/org.polarsys.kitalpha.sirius.rotativeimage.feature</module>
<module>../../../sirius/features/org.polarsys.kitalpha.sirius.typeinterpreter.feature</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ <h5 id="Provided_configuration">Provided configuration</h5>
<b>Eclipse view area</b> with Open in Editor item
</li>
</ul>
<h4 id="Configurable_Rich_Text">Configurable Rich Text</h4>
<p>The RichText editor configuration can be manually configured by the user in the preferences regardless of the configuration that was chosen programmatically.</p>
<h3 id="MDE_Rich_Text_Editor">MDE Rich Text Editor</h3>
<p>MDE Rich Text Wiget is also embded in an Eclipse editor. This editor can be opened with widget configuration provided by the MDE Rich Text Widget Factory by clicking on the dedicated item on the toolbar (
<img title="Open In Editor" alt="Open In Editor" border="0" src="../../img/openInEditor.gif"/>).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ Here a snippet from Kitalpha Component Sample example embeded in page of Activit
* Editor Rich Text Widget: provides a widget with a toolbar adapted to be displayed on '''Eclipse editor area''' without Open in Editor item
* Minimal Rich Text Widget: provides a widget with a toolbar adapted to be displayed on '''Eclipse view area''' with Open in Editor item
==== Configurable Rich Text ====

The RichText editor configuration can be manually configured by the user in the preferences regardless of the configuration that was chosen programmatically.

=== MDE Rich Text Editor ===

MDE Rich Text Wiget is also embded in an Eclipse editor. This editor can be opened with widget configuration provided by the MDE Rich Text Widget Factory by clicking on the dedicated item on the toolbar ([[File:../../img/openInEditor.gif|Open In Editor]]).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,25 @@
version="0.0.0"
unpack="false"/>

<plugin
id="org.polarsys.kitalpha.richtext.widget.configurable"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.polarsys.kitalpha.richtext.widget.configurable.preferences.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.polarsys.kitalpha.richtext.widget.configurable.preferences.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ private void doAddItems(String toolbar, String... items) {
}
}


public void removeToolbarItems(String... itemNames) {
for (String item : itemNames) {
removedItems.add(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public final class MDERichTextConstants {


//Customization
// Customization
public static final String TOOLBAR_COLOR = "uiColor"; //$NON-NLS-1$
public static final String TOOLBAR_POSITION = "toolbarLocation";//$NON-NLS-1$
public static final String TOOLBAR_POSITION_TOP = "top"; //$NON-NLS-1$
Expand All @@ -49,8 +49,8 @@ public final class MDERichTextConstants {
//****************** MDE Items and toolbar ******************//

public static final String MDE_SAVE_TOOLBAR = "mdesave"; //$NON-NLS-1$
public static final String MDE_SAVE = "MDESave"; //$NON-NLS-1$
public static final String MDE_REFRESH = "Refresh"; //$NON-NLS-1$
public static final String MDE_SAVE = "MDESave"; //$NON-NLS-1$
public static final String MDE_REFRESH = "Refresh"; //$NON-NLS-1$

public static final String MDE_LINKS_TOOLBAR = "mdelinks"; //$NON-NLS-1$
public static final String MDE_ADDLINK = "Addlink"; //$NON-NLS-1$
Expand All @@ -67,87 +67,151 @@ public final class MDERichTextConstants {


//****************** CKEditor Items and toolbar ******************//
//Document
// Document
public static final String DOCUMENT_TOOLBAR = "document"; //$NON-NLS-1$

public static final String MODE_GROUP = "mode"; //$NON-NLS-1$
public static final String SOURCE = "Source"; //$NON-NLS-1$

public static final String DOCUMENT_GROUP = "document"; //$NON-NLS-1$
public static final String SAVE = "Save"; //$NON-NLS-1$
public static final String NEW_PAGE = "NewPage"; //$NON-NLS-1$
public static final String DOC_PROPOS = "DocProps"; //$NON-NLS-1$
public static final String PREVIEW = "Preview"; //$NON-NLS-1$
public static final String PRINT = "Print"; //$NON-NLS-1$

public static final String DOC_PROPOS = "DocProps"; //$NON-NLS-1$

public static final String DOCTOOLS_GROUP = "doctools"; //$NON-NLS-1$
public static final String TEMPLATE = "Templates"; //$NON-NLS-1$


//Clipboard
// Clipboard
public static final String CLIPBOARD_TOOLBAR = "clipboard"; //$NON-NLS-1$

public static final String CLIPBOARD_GROUP = "clipboard"; //$NON-NLS-1$
public static final String CUT = "Cut"; //$NON-NLS-1$
public static final String COPY = "Copy"; //$NON-NLS-1$
public static final String PASTE = "Paste"; //$NON-NLS-1$
public static final String PASTE_TEXT = "PasteText"; //$NON-NLS-1$
public static final String PASTE_FROM_WORD = "PasteFromWord"; //$NON-NLS-1$

public static final String UNDO_GROUP = "undo"; //$NON-NLS-1$
public static final String UNDO = "Undo"; //$NON-NLS-1$
public static final String REDO = "Redo"; //$NON-NLS-1$

//editing
// Editing
public static final String EDITING_TOOLBAR = "editing"; //$NON-NLS-1$

public static final String FIND_GROUP = "find"; //$NON-NLS-1$
public static final String FIND = "Find"; //$NON-NLS-1$
public static final String REPLACE = "Replace"; //$NON-NLS-1$

public static final String SELECTION_GROUP = "selection"; //$NON-NLS-1$
public static final String SELECT_ALL = "SelectAll"; //$NON-NLS-1$

public static final String SPELLCHECKER_GROUP = "spellchecker"; //$NON-NLS-1$
public static final String SPELLCHECKER = "Scayt"; //$NON-NLS-1$

//Styles
public static final String BASIC_STYLES = "basicstyles"; //$NON-NLS-1$
// Forms
public static final String FORMS_TOOLBAR = "forms"; //$NON-NLS-1$

public static final String FORMS_GROUP = "forms"; //$NON-NLS-1$
public static final String FORM = "Form"; //$NON-NLS-1$
public static final String CHECKBOX = "Checkbox"; //$NON-NLS-1$
public static final String RADIO = "Radio"; //$NON-NLS-1$
public static final String TEXTFIELD = "TextField"; //$NON-NLS-1$
public static final String TEXTAREA = "Textarea"; //$NON-NLS-1$
public static final String SELECT = "Select"; //$NON-NLS-1$
public static final String BUTTON = "Button"; //$NON-NLS-1$
public static final String IMAGEBUTTON = "ImageButton"; //$NON-NLS-1$
public static final String HIDDENFIELD = "HiddenField"; //$NON-NLS-1$

// BasicStyles
public static final String BASIC_STYLES_TOOLBAR = "basicstyles"; //$NON-NLS-1$

public static final String BASIC_STYLES_GROUP = "basicstyles"; //$NON-NLS-1$
public static final String BOLD = "Bold"; //$NON-NLS-1$
public static final String ITALIC = "Italic"; //$NON-NLS-1$
public static final String UNDERLINE = "Underline"; //$NON-NLS-1$
public static final String STRIKE = "Strike"; //$NON-NLS-1$
public static final String SUBSCRIPT = "Subscript"; //$NON-NLS-1$
public static final String SUPERSCRIPT = "Superscript"; //$NON-NLS-1$

public static final String CLEANUP_GROUP = "cleanup"; //$NON-NLS-1$
public static final String REMOVE_FORMAT = "RemoveFormat"; //$NON-NLS-1$
public static final String COPY_FORMAT = "CopyFormatting"; //$NON-NLS-1$

//Paragraph
// Paragraph
public static final String PARAGRAPH_TOOLBAR = "paragraph"; //$NON-NLS-1$

public static final String LIST_GROUP = "list"; //$NON-NLS-1$
public static final String NUMBERED_LIST = "NumberedList"; //$NON-NLS-1$
public static final String BULLETED_LIST = "BulletedList"; //$NON-NLS-1$
public static final String OUT_INDENT = "Outdent"; //$NON-NLS-1$
public static final String INDENT = "Indent"; //$NON-NLS-1$

public static final String INDENT_GROUP = "indent"; //$NON-NLS-1$
public static final String LIST_GROUP = "list"; //$NON-NLS-1$
public static final String ALIGN_GROUP = "align"; //$NON-NLS-1$
public static final String INDENT = "Indent"; //$NON-NLS-1$
public static final String OUT_INDENT = "Outdent"; //$NON-NLS-1$

public static final String BLOCKS_GROUP = "blocks"; //$NON-NLS-1$
public static final String BLOCK_QUOTE = "Blockquote"; //$NON-NLS-1$
public static final String CREATE_DIV = "CreateDiv"; //$NON-NLS-1$

public static final String ALIGN_GROUP = "align"; //$NON-NLS-1$
public static final String JUSTIFY_LEFT = "JustifyLeft"; //$NON-NLS-1$
public static final String JUSTIFY_CENTER = "JustifyCenter"; //$NON-NLS-1$
public static final String JUSTIFY_RIGHT = "JustifyRight"; //$NON-NLS-1$
public static final String JUSTIFY_BLOCK = "JustifyBlock"; //$NON-NLS-1$

public static final String BIDI_GROUP = "bidi"; //$NON-NLS-1$
public static final String BIDI_LTR = "BidiLtr"; //$NON-NLS-1$
public static final String BIDI_RTL = "BidiRtl"; //$NON-NLS-1$
public static final String LANGUAGE = "Language"; //$NON-NLS-1$

//links
// Links
public static final String LINKS_TOOLBAR = "links"; //$NON-NLS-1$

public static final String LINKS_GROUP = "links"; //$NON-NLS-1$
public static final String LINK = "Link"; //$NON-NLS-1$
public static final String UNLINK = "Unlink"; //$NON-NLS-1$
public static final String ANCHOR = "Anchor"; //$NON-NLS-1$

//Insert
// Insert
public static final String INSERT_TOOLBAR = "insert"; //$NON-NLS-1$

public static final String INSERT_GROUP = "insert"; //$NON-NLS-1$
public static final String IMAGE = "Image"; //$NON-NLS-1$
public static final String FLASH = "Flash"; //$NON-NLS-1$
public static final String TABLE = "Table"; //$NON-NLS-1$
public static final String HORIZONTAL_RULE = "HorizontalRule"; //$NON-NLS-1$
public static final String SMILEYS = "smiley"; //$NON-NLS-1$
public static final String SPECIAL_CHAR = "SpecialChar"; //$NON-NLS-1$
public static final String PAGE_BREAK = "PageBreak"; //$NON-NLS-1$
public static final String IFRAME = "Iframe"; //$NON-NLS-1$

//Styles
// Styles
public static final String STYLES_TOOLBAR = "styles"; //$NON-NLS-1$
public static final String STYLE = "style"; //$NON-NLS-1$
public static final String STYLES_GROUP = "styles"; //$NON-NLS-1$
public static final String STYLES = "Styles"; //$NON-NLS-1$
public static final String FORMAT = "Format"; //$NON-NLS-1$
public static final String FONT = "Font"; //$NON-NLS-1$
public static final String FONT_SIZE = "FontSize"; //$NON-NLS-1$

//Colors
// Colors
public static final String COLORS_TOOLBAR = "colors"; //$NON-NLS-1$
public static final String COLORS_GROUP = "colors"; //$NON-NLS-1$
public static final String TEXT_COLOR = "TextColor"; //$NON-NLS-1$
public static final String BG_COlOR = "BGColor"; //$NON-NLS-1$
public static final String BG_COLOR = "BGColor"; //$NON-NLS-1$

// Tools
public static final String TOOLS_TOOLBAR = "tools"; //$NON-NLS-1$
public static final String TOOLS_GROUP = "tools"; //$NON-NLS-1$
public static final String MAXIMIZE = "Maximize"; //$NON-NLS-1$
public static final String SHOWBLOCKS = "ShowBlocks"; //$NON-NLS-1$

// About
public static final String ABOUT_TOOLBAR = "about"; //$NON-NLS-1$
public static final String ABOUT_GROUP = "about"; //$NON-NLS-1$
public static final String ABOUT = "About"; //$NON-NLS-1$

/*
* cf. CKEditor documentation about state of commands
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.polarsys.kitalpha.richtext.widget.configurable.preferences.core</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.polarsys.kitalpha.richtext.widget.configurable.preferences.core;singleton:=true
Bundle-Version: 6.2.0.qualifier
Bundle-Activator: org.polarsys.kitalpha.richtext.widget.configurable.preferences.core.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jface,
org.eclipse.ui.workbench
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.polarsys.kitalpha.richtext.widget.configurable.preferences.core
Bundle-ActivationPolicy: lazy
Export-Package: org.polarsys.kitalpha.richtext.widget.configurable.preferences.core
Bundle-Vendor: %Bundle-Vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
################################################################################
# Copyright (c) 2017, 2020 Thales Global Services S.A.S.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Thales Global Services S.A.S - initial API and implementation
################################################################################

#
# Francois Descamps
#


Bundle-Name = Kitalpha Configurable Rich Text Widget For MDE Preferences
Bundle-Vendor = www.polarsys.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>November 30, 2017</p>
<h3>License</h3>

<p>
The Eclipse Foundation makes available all content in this plug-in
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>

<p>
If you did not receive this Content directly from the Eclipse
Foundation, the Content is being redistributed by another party
(&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the
Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
</p>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##
# Copyright (c) 2017, 2020 Thales Global Services S.A.S.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Thales Global Services S.A.S - initial API and implementation
##

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
Loading

0 comments on commit 6d4e90c

Please sign in to comment.