Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
59844782
Commit
59844782
authored
Feb 01, 2020
by
Carsten Rose
Browse files
Refs #10013 Add phpDoc. Set CM defaults.
parent
b9dab562
Pipeline
#3200
passed with stages
in 4 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Core/AbstractBuildForm.php
View file @
59844782
...
...
@@ -3174,6 +3174,8 @@ abstract class AbstractBuildForm {
}
/**
* Build an Editor input element: TinyMCE / CodeMirror
*
* @param array $formElement
* @param $htmlFormElementName
* @param $value
...
...
@@ -3253,6 +3255,9 @@ abstract class AbstractBuildForm {
}
/**
* Build a HTML 'textarea' element which becomes a CodeMirror Editor.
* https://codemirror.net/doc/manual.html#overview
*
* @param array $formElement
* @param $htmlFormElementName
* @param $value
...
...
@@ -3268,7 +3273,6 @@ abstract class AbstractBuildForm {
$attribute
.
=
Support
::
doAttribute
(
'id'
,
$formElement
[
FE_HTML_ID
]);
$attribute
.
=
Support
::
doAttribute
(
'name'
,
$htmlFormElementName
);
// $attribute .= Support::doAttribute('id', $htmlFormElementName);
$attribute
.
=
Support
::
doAttribute
(
ATTRIBUTE_DATA_REFERENCE
,
$formElement
[
FE_DATA_REFERENCE
]);
$attribute
.
=
Support
::
doAttribute
(
'class'
,
'qfq-codemirror'
);
...
...
@@ -3279,11 +3283,17 @@ abstract class AbstractBuildForm {
// $attribute .= Support::doAttribute('data-title', $formElement[FE_TOOLTIP]);
// $formElement = $this->setEditorTinyMCEConfig($formElement, $htmlFormElementName);
//
$formElement['editor-plugins']='autoresize code'
//
$formElement['editor-contextmenu']='link image | cell row column'
//
$formElement['editor-plugins']='autoresize code'
//
$formElement['editor-contextmenu']='link image | cell row column'
// Defaults: fits good to QFQ style programming
$formElement
[
FE_EDITOR_PREFIX
.
'mode'
]
=
$formElement
[
FE_EDITOR_PREFIX
.
'mode'
]
??
"text/x-sql"
;
$formElement
[
FE_EDITOR_PREFIX
.
'lineNumbers'
]
=
$formElement
[
FE_EDITOR_PREFIX
.
'lineNumbers'
]
??
true
;
$formElement
[
FE_EDITOR_PREFIX
.
'lineWrapping'
]
=
$formElement
[
FE_EDITOR_PREFIX
.
'lineNumbers'
]
??
true
;
if
(
$formElement
[
FE_MODE
]
==
FE_MODE_READONLY
)
{
$formElement
[
FE_EDITOR_PREFIX
.
'readOnly'
]
=
true
;
}
$json
=
$this
->
getPrefixedElementsAsJSON
(
FE_EDITOR_PREFIX
,
$formElement
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment