Revision d5f9749c
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java | ||
---|---|---|
20 | 20 |
import org.eclipse.jface.window.Window; |
21 | 21 |
import org.eclipse.nebula.widgets.richtext.RichTextEditor; |
22 | 22 |
import org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration; |
23 |
import org.eclipse.nebula.widgets.richtext.toolbar.ToolbarConfiguration; |
|
23 | 24 |
import org.eclipse.swt.SWT; |
24 | 25 |
import org.eclipse.swt.custom.StyledText; |
25 | 26 |
import org.eclipse.swt.events.FocusAdapter; |
... | ... | |
786 | 787 |
*/ |
787 | 788 |
public RichTextEditor createRichTextEditor(Composite parent, String value, int style) { |
788 | 789 |
RichTextEditorConfiguration config = new RichTextEditorConfiguration(); |
790 |
config.setResizable(true); |
|
791 |
config.setToolbarCollapsible(true); |
|
792 |
config.setToolbarInitialExpanded(false); |
|
789 | 793 |
config.setOption("allowedContent", Boolean.TRUE); |
794 |
|
|
790 | 795 |
RichTextEditor text = new RichTextEditor(parent, config, super.getBorderStyle() | style | orientation); |
791 | 796 |
|
792 | 797 |
if (value != null) { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RichTextWithLabelElement.java | ||
---|---|---|
19 | 19 |
import org.eclipse.nebula.widgets.richtext.RichTextEditor; |
20 | 20 |
import org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration; |
21 | 21 |
import org.eclipse.nebula.widgets.richtext.toolbar.ToolbarButton; |
22 |
import org.eclipse.nebula.widgets.richtext.toolbar.ToolbarConfiguration; |
|
22 | 23 |
import org.eclipse.swt.SWT; |
23 | 24 |
import org.eclipse.swt.events.KeyAdapter; |
24 | 25 |
import org.eclipse.swt.events.KeyEvent; |
... | ... | |
57 | 58 |
import eu.etaxonomy.taxeditor.util.RichtextHelper; |
58 | 59 |
|
59 | 60 |
/** |
60 |
* @author n.hoffmann
|
|
61 |
* @author k. luther
|
|
61 | 62 |
* @version $Id: $ |
62 | 63 |
*/ |
63 | 64 |
public class RichTextWithLabelElement extends AbstractCdmFormElement implements ModifyListener, IEnableableFormElement, |
... | ... | |
135 | 136 |
} |
136 | 137 |
|
137 | 138 |
text = formFactory.createRichTextEditor(layoutComposite, "", combinedStyle); |
139 |
|
|
140 |
|
|
141 |
|
|
138 | 142 |
String browsertype = text.getEditorConfiguration().getBrowser().getBrowserType(); |
139 | 143 |
|
140 | 144 |
|
... | ... | |
362 | 366 |
|
363 | 367 |
|
364 | 368 |
private String findHtmlString(String htmlText, IntextReference inRef) { |
365 |
String htmlString = RichtextHelper.createHtml(inRef, ".*"); |
|
369 |
String htmlString = RichtextHelper.createHtml(inRef, ".*?");
|
|
366 | 370 |
System.out.println(htmlString); |
367 | 371 |
System.out.println(htmlText); |
368 | 372 |
Pattern pattern = Pattern.compile(htmlString); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/IntextReferenceSection.java | ||
---|---|---|
81 | 81 |
// } |
82 | 82 |
|
83 | 83 |
String originalString = getEntity().getText(); |
84 |
String cdmMarkup = RichtextHelper.createCdmMarkUp(element, ".*");
|
|
84 |
String cdmMarkup = RichtextHelper.createCdmMarkUp(element, "(.*?)");
|
|
85 | 85 |
String inlineString = RichtextHelper.findInlineString(originalString, cdmMarkup); |
86 | 86 |
getEntity().setText(originalString.replace(inlineString, "")); |
87 | 87 |
getEntity().removeIntextReference(element); |
Also available in: Unified diff
fix problem with more than one inline reference