Verified Owner
Top Fields Constructors Methods
org.jabref.gui.fieldeditors

public Class MarkdownEditor

extends SimpleEditor
Class Inheritance
Imports
java.io.File, .IOException, java.net.MalformedURLException, java.nio.file.FileAlreadyExistsException, .Files, .Path, java.util.List, .Optional, javafx.scene.control.TextInputControl, javafx.scene.input.Dragboard, .TransferMode, org.jabref.gui.autocompleter.SuggestionProvider, org.jabref.gui.clipboard.ClipBoardManager, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.undo.RedoAction, .UndoAction, org.jabref.logic.FilePreferences, org.jabref.logic.importer.FetcherException, org.jabref.logic.integrity.FieldCheckers, org.jabref.logic.net.URLDownload, org.jabref.logic.undo.UndoManager, org.jabref.logic.util.io.FileUtil, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.field.Field, com.vladsch.flexmark.html2md.converter.FlexmarkHtmlConverter, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final BibDatabaseContext
private final FilePreferences
private final FlexmarkHtmlConverter
private static final Logger

Constructor Summary

AccessConstructor and Description
public
MarkdownEditor(Field field, SuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers, GuiPreferences preferences, UndoManager undoManager, UndoAction undoAction, RedoAction redoAction, BibDatabaseContext bibDatabaseContext)

Method Summary

Modifier and TypeMethod and Description
protected TextInputControl
private void
private void
private boolean

Returns:

true if the Markdown Text was inserted, false otherwise
insertFileToLibraryAndAppend
(File
is the file that is dropped into the editor
file
,
EditorTextArea
is the Editor text area
textArea
)

Inserts Markdown Link for a file dropped into the editor, copying file to the database file directory if necessary

private boolean
private void
insertMarkdownText(String relativePath, EditorTextArea textArea)

public void
setEditable(boolean isEditable)

private void
Inherited from org.jabref.gui.fieldeditors.SimpleEditor:
bindToEntrygetNodegetTextInputrequestFocus

Field Detail

databaseContextback to summary
private final BibDatabaseContext databaseContext
filePreferencesback to summary
private final FilePreferences filePreferences
flexmarkHtmlConverterback to summary
private final FlexmarkHtmlConverter flexmarkHtmlConverter
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

MarkdownEditorback to summary
public MarkdownEditor(Field field, SuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers, GuiPreferences preferences, UndoManager undoManager, UndoAction undoAction, RedoAction redoAction, BibDatabaseContext bibDatabaseContext)

Method Detail

createTextInputControlback to summary
protected TextInputControl createTextInputControl(Field field)

Overrides org.jabref.gui.fieldeditors.SimpleEditor.createTextInputControl.

Annotations
@Override
enableDragDropback to summary
private void enableDragDrop(EditorTextArea textArea)
enableDragOverback to summary
private void enableDragOver(EditorTextArea textArea)
insertFileToLibraryAndAppendback to summary
private boolean insertFileToLibraryAndAppend(File file, EditorTextArea textArea)

Inserts Markdown Link for a file dropped into the editor, copying file to the database file directory if necessary

Parameters
file:File

is the file that is dropped into the editor

textArea:EditorTextArea

is the Editor text area

Returns:boolean

true if the Markdown Text was inserted, false otherwise

insertImageToDbAndAppendback to summary
private boolean insertImageToDbAndAppend(String imageUrl, EditorTextArea textArea)
insertMarkdownTextback to summary
private void insertMarkdownText(String relativePath, EditorTextArea textArea)
setEditableback to summary
public void setEditable(boolean isEditable)
setUpDragDropback to summary
private void setUpDragDrop()