#i
91 | replace = ${1}
92 | useRegExp = 1
93 | }
94 | }
95 | }
96 | }
97 |
98 | # Example processing of content before it is being persisted to database. For all types, use = *
99 | # contentPersistPreProcessing {
100 | # {
101 | # {
102 | # {
103 | # # Any stdWrap property
104 | # }
105 | # }
106 | # }
107 | # }
108 |
109 | customRecordEditing {
110 | tx_news_pi1 {
111 | actionName = detail
112 | recordName = news
113 | tableName = tx_news_domain_model_news
114 | listTypeName = news_pi1
115 | }
116 | }
117 |
118 | # Name of the field that stores the uid of the parent of nested CEs
119 | # used to add a drop zone before the first nested CEs in a column of a container.
120 | # Configured as default for EXT:container
121 | parentOfCeUidField = tx_container_parent
122 | }
123 | }
124 |
125 | # Prevent HTML output for wrapContent to be rendered as string only
126 | lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines >
127 | [global]
128 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/EmptyColumns/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _emptycolumns:
6 |
7 | ============================
8 | Drop zones for empty columns
9 | ============================
10 |
11 | Premise
12 | ~~~~~~~
13 | The Frontend Editing extension automatically adds one drop zone at the beginning and one at the end of each content element so the user can drop a new content element before or after an existing content element.
14 |
15 | When a page or container is empty, there are no drop zones to allow the user to add new content elements. The Frontend Editing extension can't automatically add the first drop zone because it can't know the colPos value when the frontend is rendered.
16 |
17 | To solve this issue, the admin can add a custom drop zone in the page or container templates.
18 |
19 | .. _emptycolumns-page:
20 |
21 | Example of custom drop zone for a column of a page
22 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 |
24 | .. code-block:: html
25 |
26 |
27 |
28 | The needed argument in this case are:
29 |
30 | * the table (tt_content)
31 | * the page uid
32 | * the colPos in which the element will be placed
33 |
34 | .. _emptycolumns-container:
35 |
36 | Example of custom drop zone for a column of a container (EXT:container)
37 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38 |
39 | .. code-block:: html
40 |
41 |
42 |
43 | The needed argument in this case are:
44 |
45 | * the table of the CE (tt_content)
46 | * the page uid
47 | * the colPos of the column of the container in which the element will be placed as default value (defVals)
48 | * in the case of EXT:container, the uid of the parent (field: tx_container_parent) as default value (defVals)
49 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/ExtensionConfiguration/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _extension-manager-settings:
6 |
7 | ==================================
8 | Available extension configurations
9 | ==================================
10 |
11 | These configurations can be found in *Admin Tools > Settings*.
12 |
13 | .. _extension-manager-settings-basic:
14 |
15 |
16 | Basic
17 | =====
18 |
19 | The tag name that will be used for the Content editable wrapper
20 | ---------------------------------------------------------------
21 |
22 | :aspect:`DataType`
23 | string
24 |
25 | :aspect:`Default`
26 | div
27 |
28 | The default wrapper tag name used by the frontend editing functionality is
29 | `div`, but you can change it to something else here.
30 |
31 | .. tip::
32 |
33 | You can override the default tag using the
34 | :ref:`core:contentEditable ViewHelper's ` optional
35 | tag argument.
36 |
37 |
38 | .. _extension-manager-settings-features:
39 |
40 | Features
41 | ========
42 |
43 | Enable placeholders and direct drop-to-edit without modal
44 | ---------------------------------------------------------
45 |
46 | :aspect:`DataType`
47 | boolean
48 |
49 | :aspect:`Default`
50 | true
51 |
52 | This feature makes empty editable content areas appear with placeholders. Content elements will also appear directly after you have dropped them on the page, skipping the modal pop-up with a backend form that will otherwise appear.
53 |
54 | You should adapt your templates to show empty fields using the :ref:`viewhelpers-isplaceholderenabled` view helper.
55 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/HooksAndEvents/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | .. highlight:: rst
4 |
5 | .. _hooksandevents:
6 |
7 |
8 | ================
9 | Hooks and events
10 | ================
11 |
12 |
13 | .. _events:
14 |
15 | PSR-14 Events
16 | =============
17 |
18 | .. _events-preparefieldupdateevent:
19 |
20 | PrepareFieldUpdateEvent
21 | -----------------------
22 |
23 | :aspect:`Event Class`
24 | \TYPO3\CMS\FrontendEditing\Controller\Event\PrepareFieldUpdateEvent
25 |
26 | :aspect:`Event Handler Interface`
27 | \TYPO3\CMS\FrontendEditing\Controller\Event\PrepareFieldUpdateEventHandlerInterface
28 |
29 | Called before saved data from Frontend Editing is persisted to the database.
30 |
31 |
32 | Example event handler
33 | ~~~~~~~~~~~~~~~~~~~~~
34 |
35 | .. code-block:: php
36 |
37 | setContent(utf8_decode($event->getContent()));
51 | }
52 | }
53 |
54 |
55 | .. _hooks:
56 |
57 | Hooks
58 | =====
59 |
60 | This is used in case you need to influence on a process of wrapping with drop zone of some specific content elements
61 |
62 | - Register your hook in ext_localconf.php
63 |
64 | .. code-block:: php
65 |
66 | pageRenderer->loadRequireJsModule('TYPO3/CMS/FrontendEditing/Utils/TranslatorLoader', "function(TranslatorLoader) {
37 | TranslatorLoader.configure({
38 | translationLabels: ${translationLabelMap},
39 | namespaceMapping: ${translationLabelMapping},
40 | });
41 | }");
42 |
43 | No merge strategy is used in the frontend editing default bootstrap. So if it
44 | was configured before, no server side `translationLabels` get configured.
45 | Instead it uses the default fallback implementation.
46 |
47 | Be aware that the `namespaceMapping` configuration property may change without
48 | deprecation warning since it is not stable.
49 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/TCA/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 | .. _tca:
5 |
6 | =========================
7 | Additions to standard TCA
8 | =========================
9 |
10 | Frontend Editing adds some configuration options to the TCA that can be used to
11 | make fields behave in a specific manner when editing them in the frontend.
12 |
13 |
14 | .. _tca-fielddefinitions:
15 |
16 | Field definitions
17 | =================
18 |
19 | Found in :php:`$GLOBALS['TCA'][
]['columns'][]`
20 |
21 |
22 | .. _tca-enablefrontendrichtext:
23 |
24 | [config][enableFrontendRichtext]
25 | --------------------------------
26 |
27 | :aspect:`DataType`
28 | boolean
29 |
30 | Enable rich-text editing in FrontendEditing only.
31 |
32 | Inherits and overrides the value from `[config][enableRichtext]`.
33 |
34 |
35 | .. _tca-frontendrichtextconfiguration:
36 |
37 | [config][frontendRichtextConfiguration]
38 | ---------------------------------------
39 |
40 | :aspect:`DataType`
41 | string
42 |
43 | Set or change the rich-text editing preset in FrontendEditing only.
44 |
45 | Inherits and overrides the value from `[config][richtextConfiguration]`.
46 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/TypoScript/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 | .. _typoscript:
5 |
6 | ====================
7 | Module Configuration
8 | ====================
9 |
10 | Each section refers to property names within `module.tx_frontendediting`.
11 |
12 |
13 | .. _typoscript-customrecords:
14 |
15 | customRecords
16 | =============
17 |
18 | :aspect:`DataType`
19 | array of table names with default values.
20 |
21 | Default values for records created with the
22 | :ref:`customDropZone ` ViewHelper.
23 |
24 | .. code-block:: typoscript
25 |
26 | module.tx_frontendediting.settings {
27 | customRecords {
28 | tx_news_domain_model_news {
29 | pid = 6
30 | }
31 | }
32 | }
33 |
34 |
35 | .. _typoscript-customrecordediting:
36 |
37 | customRecordEditing
38 | ===================
39 |
40 | Configure :ref:`typoscript-custom-record-editing`.
41 |
42 | .. code-block:: typoscript
43 |
44 | config.tx_frontendediting {
45 | customRecordEditing {
46 | tx_news_pi1 {
47 | actionName = detail
48 | recordName = news
49 | tableName = tx_news_domain_model_news
50 | listTypeName = news_pi1
51 | }
52 | }
53 | }
54 |
55 | ========================
56 | TypoScript Configuration
57 | ========================
58 |
59 | Each section refers to property names within `config.tx_frontendediting`.
60 |
61 |
62 | .. _typoscript-contentpersistpreprocessing:
63 |
64 | contentPersistPreProcessing
65 | ===========================
66 |
67 | Modify data for a specific table, field, and record type when saved in Frontend
68 | Editing before the data is persisted to the database. This allows you to
69 | remove any (or all) HTML tags or modify the data to better suit the way it
70 | should be persisted.
71 |
72 | This property consists of nested arrays.
73 |
74 | .. code-block:: typoscript
75 |
76 | config.tx_frontendediting {
77 | contentPersistPreProcessing {
78 | {
79 | {
80 | {
81 | # Any stdWrap property
82 | }
83 | }
84 | }
85 | }
86 | }
87 |
88 | :aspect:``
89 | The name of the table.
90 |
91 | :aspect:``
92 | The record type as defined in :php:`$GLOBALS['TCA'][]['types']`.
93 | `0` (zero as string) is the default type. `*` is a wildcard that will apply
94 | to any type not explicitly defined.
95 |
96 | :aspect:``
97 | The field name. Add any :ref:`stdwrap ` configurations to
98 | modify the data. You can also use the :ref:`userFunc `
99 | property to modify data using PHP.
100 |
101 | Example 1
102 | ---------
103 |
104 | Strip all HTML tags from the `bodytext` field in the `tt_content` table if the
105 | record type (e.g. the `CType` field for content elements) is "bullets".
106 |
107 | .. code-block:: typoscript
108 |
109 | config.tx_frontendediting {
110 | contentPersistPreProcessing {
111 | tt_content {
112 | bullets {
113 | bodytext {
114 | stripHtml = 1
115 | }
116 | }
117 | }
118 | }
119 | }
120 |
121 | Example 2
122 | ---------
123 |
124 | Convert the date of a news item from the frontend display format dd/mm/yyyy
125 | to the ISO 8601 format YYYY-MM-DDT00:00:00Z, so that it can be saved correctly
126 | in the database when the editor changes it.
127 |
128 | .. code-block:: typoscript
129 |
130 | config.tx_frontendediting {
131 | contentPersistPreProcessing {
132 | tx_news_domain_model_news {
133 | 0 {
134 | datetime {
135 | replacement {
136 | 10 {
137 | search = /([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/
138 | replace = \3-\2-\1T00:00:00Z
139 | useRegExp = 1
140 | }
141 | }
142 | }
143 | }
144 | }
145 | }
146 | }
147 |
148 | See also :ref:`typoscript-contentpersistpreprocessingpatterns`.
149 |
150 |
151 | .. _typoscript-contentpersistpreprocessingpatterns:
152 |
153 | contentPersistPreProcessingPatterns
154 | ===================================
155 |
156 | Modify data for any field with a specific RTE preset before the data is
157 | persisted to the database. This allows you to remove any (or all) HTML tags or
158 | modify the data to better suit the way it should be persisted.
159 |
160 | .. code-block:: typoscript
161 |
162 | config.tx_frontendediting {
163 | contentPersistPreProcessingPatterns {
164 | {
165 | replacement {
166 | 10 {
167 | search = # #i
168 | replace.char = 10
169 | useRegExp = 1
170 | }
171 | }
172 | }
173 | }
174 | }
175 |
176 | :aspect:``
177 | An RTE preset defined in
178 | :php:`$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']`. Add any
179 | :ref:`stdwrap ` configurations to modify the data. The modification is
180 | applied to any field where `[config][enableRichtext]` or
181 | `[config][enableFrontendRichtext]` is set and
182 | `[config][frontendRichtextConfiguration]` or
183 | `[config][frontendRichtextConfiguration]` is set to the same as ``.
184 |
185 |
186 | Example
187 | -------
188 |
189 | Strip all HTML tags from any field using the RTE preset "default" when saving
190 | data in Frontend Editing.
191 |
192 | .. code-block:: typoscript
193 |
194 | config.tx_frontendediting {
195 | contentPersistPreProcessing {
196 | default {
197 | stripHtml = 1
198 | }
199 | }
200 | }
201 |
202 |
203 | See also :ref:`typoscript-contentpersistpreprocessing`. This property is only
204 | applied if no match was found there.
205 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/UserTs/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _userts:
6 |
7 | ======
8 | UserTS
9 | ======
10 |
11 | It's possible to configure TSconfig for BE user or BE user group.
12 |
13 | Disallow editing for content elements
14 | =====================================
15 |
16 | Possibility to disallow a user or a user group editing to a specific set of content elements.
17 | A comma separated list of content id´s are provided, this setting is ignored for admin users.
18 |
19 | .. code-block:: typoscript
20 |
21 | frontend_editing.disallow_content_editing = 29,30
22 |
--------------------------------------------------------------------------------
/Documentation/ConfigureAndExtend/ViewHelpers/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | .. _viewhelpers:
4 |
5 | ====================
6 | ViewHelper Reference
7 | ====================
8 |
9 | .. tip::
10 |
11 | The Frontend Editing extension automatically includes its ViewHelpers in the
12 | `core` namespace, so you don't have to declare the namespace.
13 |
14 | .. _viewhelpers-contenteditable:
15 |
16 | contentEditable
17 | ===============
18 |
19 | Defines editable regions within Fluid templates.
20 |
21 | Arguments
22 | ---------
23 |
24 | table
25 | ~~~~~
26 |
27 | :aspect:`DataType`
28 | string
29 |
30 | :aspect:`Required`
31 | true
32 |
33 | :aspect:`Description`
34 | The database table name to where the data should be saved.
35 |
36 | field
37 | ~~~~~
38 |
39 | :aspect:`DataType`
40 | string
41 |
42 | :aspect:`Required`
43 | false
44 |
45 | :aspect:`Description`
46 | The database field to where the data should be saved.
47 |
48 | uid
49 | ~~~
50 |
51 | :aspect:`DataType`
52 | string
53 |
54 | :aspect:`Required`
55 | true
56 |
57 | :aspect:`Description`
58 | The database field to where the data should be saved
59 |
60 | tag
61 | ~~~
62 |
63 | :aspect:`DataType`
64 | string
65 |
66 | :aspect:`Required`
67 | false
68 |
69 | :aspect:`Description`
70 | The HTML tag to use for the editable wrapper.
71 |
72 | additionalAttributes
73 | ~~~~~~~~~~~~~~~~~~~~
74 |
75 | :aspect:`DataType`
76 | mixed
77 |
78 | :aspect:`Required`
79 | false
80 |
81 | :aspect:`Description`
82 | Additional tag attributes. They will be added directly to the resulting HTML tag.
83 |
84 | data
85 | ~~~~
86 |
87 | :aspect:`DataType`
88 | mixed
89 |
90 | :aspect:`Required`
91 | false
92 |
93 | :aspect:`Description`
94 | Additional data-* attributes. They will each be added with a "data-" prefix.
95 |
96 | Basic example
97 | -------------
98 |
99 | This makes the field `bodytext` of the table `tt_content` editable:
100 |
101 | .. code-block:: html
102 |
103 |
104 | {bodytext}
105 |
106 |
107 | When frontend editing is enabled and the user is viewing the page in the
108 | Frontend Editing module in the backend, the output HTML will look something like
109 | this:
110 |
111 | .. code-block:: html
112 |
113 |
114 | This is the content text to edit
115 |
116 |
117 | When the user is viewing the page anywhere else than in the Frontend Editing
118 | module, or if Frontend Editing is disabled, the output HTML will look like this:
119 |
120 | .. code-block:: html
121 |
122 | This is the content text to edit
123 |
124 | Example with custom tag
125 | -----------------------
126 |
127 | Using the `tag` argument, you can make a HTML tag into an editable region. In
128 | this case we are using an `
` tag to make the list items within it editable.
129 |
130 | .. code-block:: html
131 |
132 |
133 |
134 |
{item}
135 |
136 |
137 |
138 | When frontend editing is enabled and the user is viewing the page in the
139 | Frontend Editing module in the backend, the output HTML will look something like
140 | this:
141 |
142 | .. code-block:: html
143 |
144 |
145 |
Item 1
146 |
Item 2
147 |
Item 3
148 |
149 |
150 | When the user is viewing the page anywhere else than in the Frontend Editing
151 | module, or if Frontend Editing is disabled, the output HTML will look like this:
152 |
153 | .. code-block:: html
154 |
155 |
156 |
Item 1
157 |
Item 2
158 |
Item 3
159 |
160 |
161 | There is also a possibility to make the content element editable through the popup backend editor.
162 | It is done by skipping the *field* option in the view helper:
163 |
164 | .. code-block:: html
165 |
166 |
167 | {item.bodytext}
168 |
169 |
170 |
171 | .. _viewhelpers-customdropzone:
172 |
173 | customDropZone
174 | ===============
175 |
176 | Inserts a custom drop zone, for example to drop news directly into the news
177 | list.
178 |
179 | Default values are defined in TypoScript. See :ref:`typoscript-customrecords`
180 | for more information.
181 |
182 | Arguments
183 | ---------
184 |
185 | tables
186 | ~~~~~~
187 |
188 | :aspect:`DataType`
189 | array of strings
190 |
191 | :aspect:`Required`
192 | true
193 |
194 | :aspect:`Description`
195 | Table names allowed to be dropped in this drop zone.
196 |
197 | Example
198 | -------
199 |
200 | .. code-block:: html
201 |
202 |
203 |
204 |
205 | The result will look like this:
206 |
207 | .. figure:: ../../Images/CustomRecordsDropzone.png
208 | :alt: Custom records for dropzones
209 |
210 |
211 | .. _viewhelpers-isfrontendeditingactive:
212 |
213 |
214 | isFrontendEditingActive
215 | =======================
216 |
217 | Useful to determine whether or not frontend editing is active. Use in conditions
218 | to hide or show content for editors.
219 |
220 | Example
221 | -------
222 |
223 | .. code-block:: html
224 |
225 |
226 |
You're using Frontend Editing. Congratulations!
227 |
228 |
229 | No output if Frontend editing is disabled. Output if Frontend Editing is
230 | enabled:
231 |
232 | .. code-block:: html
233 |
234 |
You're using Frontend Editing. Congratulations!
235 |
236 |
237 | .. _viewhelpers-isplaceholderenabled:
238 |
239 | isPlaceholderEnabled
240 | ====================
241 |
242 | Use this view helper in conditions to show empty fields when the
243 | :ref:`placeholder feature ` is enabled.
244 |
245 | Example
246 | -------
247 |
248 | .. code-block:: html
249 |
250 |
251 | {header}
252 |
253 |
--------------------------------------------------------------------------------
/Documentation/Development/Dependencies/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | .. highlight:: rst
4 |
5 |
6 | Dependencies
7 | ============
8 |
9 | We rely on node.js for a lot of our tooling. Go to http://nodejs.org/ and install it.
10 |
11 | To install the tooling dependencies, run:
12 |
13 | ::
14 |
15 | npm install
16 |
17 | Composer must also be installed. Download and install it from https://getcomposer.org/, then install the Composer dependencies:
18 |
19 | ::
20 |
21 | composer install
22 |
--------------------------------------------------------------------------------
/Documentation/Development/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | .. highlight:: rst
4 |
5 | ===========
6 | Development
7 | ===========
8 |
9 | Instructions on how to develop the frontend editing extension
10 |
11 | .. toctree::
12 | :titlesonly:
13 |
14 | Dependencies/Index
15 | Workflow/Index
16 | JavaScript/Index
17 |
--------------------------------------------------------------------------------
/Documentation/Development/JavaScript/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 | .. _javascriptdev:
5 |
6 | Javascript
7 | ==================
8 |
9 | .. _javascriptdev-logger:
10 |
11 | Logger
12 | ------
13 | The `ulog` logging framework is used to handle logs. It is a highly configurable
14 | and extendable logger.
15 |
16 | Persist log record on Typo3 server is not implemented yet.
17 |
18 | Loggers available:
19 |
20 | * `FEditing:Component:LoadingScreen`
21 | * `FEditing:Component:Widget:Notification`
22 | * `FEditing:CRUD`
23 | * `FEditing:Editor`
24 | * `FEditing:FrontendEditing`
25 | * `FEditing:GUI`
26 | * `FEditing:localStorage`
27 | * `FEditing:Utils:Scroller`
28 | * `FEditing:Utils:TranslatorFactory`
29 | * `FEditing:Utils:TranslatorLoader`
30 |
31 |
32 | .. _javascriptdev-logger-level:
33 |
34 | Log Levels
35 | ----------
36 |
37 | Following log levels exists:
38 |
39 | * `error` : Used if an exception occured and the normal handling failed.
40 | * `warn`: Also used if an exception occured, but the normal handling can be
41 | done.
42 | * `info`: Used if an state change occured like an event (eg. mouse click)
43 | * `log`: Used if an point of interesse is reached like the an array to loop.
44 | * `debug`: Used if an calculation happend.
45 | * `trace` (Not implemented yet): Used if an function get called and end.
46 | Only useful to record the call chains.
47 |
48 | There are some special log levels only used to configure ulog:
49 |
50 | * `none`: No logs get selected
51 | * `all`: Normaly it is like `trace`. But if `ulog` log levels get extended it
52 | is much more save to use `all`.
53 |
54 | **Hint:** The log level during log selection in configuration are chained. Use
55 | `warn` log level does indirectly also select `error` logs.
56 |
57 |
58 | .. _javascriptdev-logger-config:
59 |
60 | Configuration
61 | -------------
62 |
63 | Configuration can be done as URL parameter or/and as localStorage item.
64 | There are follwing configuration options:
65 |
66 | * `log`: The main setting to control logger’s levels with
67 | * `log_output`: To configure the output of the `output` channel, where
68 | logging should go
69 | * `log_drain`: To configure the output of the `drain` channel
70 |
71 | More details can be found at: https://ulog.js.org/#configure
72 |
73 |
74 | .. _javascriptdev-logger-config-syntax:
75 |
76 | Syntax
77 | ------
78 |
79 | ` = [; ] ...`
80 | Configuration options can have more than one configuration entry:
81 |
82 | ` := [ = ] `
83 | Configuration entry have a value and a filter to select the loggers to apply the config:
84 | **Hint:** If no filter or a wildcard is set, the config is used as default config.
85 |
86 | ` := [ , [ - ] ] ...`
87 | The filter is a list of RegEx with option to add or substract loggers from the selection set:
88 |
89 | .. attention::
90 |
91 | * in `log` the `` is a log level
92 | * in `log_` the `` is one or more `output`
93 |
94 |
95 | .. _javascriptdev-logger-config-example:
96 |
97 | Examples
98 | --------
99 |
100 | With URL parameters:
101 |
102 | * to log in general info level: `?log=info` (Technically, this is equals to:
103 | `?log=*=info`.)
104 | * To log widgets in debug and the rest in info mode:
105 | `?log=info;FEditing:Component:Widget:*=debug`
106 | * To print and persist log in output channel: `?log_ouput=console persist`
107 | * To print logs in general and persist logs from widgets in output channel:
108 | `?log_ouput=console;FEditing:Component:Widget:*=console persist`
109 | * To print logs in general and only persist logs from widgets in output
110 | channel: `?log_ouput=console;FEditing:Component:Widget:*=persist`
111 |
112 |
113 | .. _javascriptdev-logger-output:
114 |
115 | Output
116 | ------
117 |
118 | By default there are two outputs:
119 |
120 | * `console`: default browser `console`
121 | * `noop`: No operation function, used to prevent log in `drain` channel
122 |
123 |
124 | .. _javascriptdev-logger-channel:
125 |
126 | Channel
127 | -------
128 |
129 | By default there are two channels:
130 |
131 | * `output`: Used if `log` configuration is matching. eg. `log=info` and
132 | `logRecord.level` is smaller than info.
133 | * `drain`: Opposite to `output` channel. Used to have the opportunity to
134 | handle this log records to like persist in indexedDB.
135 |
136 |
137 | .. _javascriptdev-logger-extension:
138 |
139 | Extensions
140 | ----------
141 |
142 | There are two extensions as AMD available to use:
143 |
144 | * `TYPO3/CMS/FrontendEditing/Utils/LoggerPersist`
145 | Add two output `Persist`, `Server` and a new channel `highorder`
146 | * `TYPO3/CMS/FrontendEditing/Utils/LoggerWindowError`
147 | Register window error handlers to log them with a logger.
148 |
149 |
150 | .. _javascriptdev-logger-extension-highorder:
151 |
152 | `highorder` channel
153 | -------------------
154 |
155 | There are two new configuration options:
156 |
157 | * `highorder_log`: The main setting to control `highorder` channel selection.
158 | *Hint:* Analog to the `log` option and the `output` channel
159 | * `log_highorder`: To configure the output of the `highorder` channel, where
160 | logging should go
161 |
--------------------------------------------------------------------------------
/Documentation/Development/Workflow/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | .. highlight:: rst
4 |
5 | ========
6 | Workflow
7 | ========
8 |
9 | For working with the extension, the following can be run to accomplish common tasks.
10 |
11 | Test
12 | ----
13 |
14 | Run the following command to execute the PHP codesniffer:
15 |
16 | ::
17 |
18 | npm run php:codesniffer
19 |
20 | Run the following command to run the PHP Unit tests:
21 |
22 |
23 | ::
24 |
25 | npm run php:unittests
26 |
27 | Run this command to simulate the full build process locally:
28 |
29 | ::
30 |
31 | npm run build:suite --silent
32 |
33 | Add node_modules to Public/Resources folder
34 | -------------------------------------------
35 |
36 | Add the toastr (notifications) node_module to Public/Resources folder:
37 |
38 | ::
39 |
40 | npm run add:resource:toastr
41 |
42 | Add the immutable (https://facebook.github.io/immutable-js/) node_module to Public/Resources folder:
43 |
44 | ::
45 |
46 | npm run add:resource:immutable
47 |
48 | Styling
49 | -------
50 |
51 | The extension is using SASS. The build-process order is:
52 |
53 | * CSS linting, based on TYPO3.CMS (stylelint)
54 | * Compile to CSS (node-sass)
55 | * Add vendor prefixes, based on TYPO3.CMS (autoprefixer)
56 | * Minifying CSS (postcss-clean)
57 |
58 | Use the following watch command while developing:
59 |
60 | ::
61 |
62 | npm run watch:css
63 |
64 | Use the following command to build the stylesheets:
65 |
66 | ::
67 |
68 | npm run build:css
69 |
70 |
71 | Publish
72 | -------
73 |
74 | Use the following command to copy all necessary node_modules into Public/Resources folder and compile the SASS:
75 |
76 | ::
77 |
78 | npm run build:extension
79 |
--------------------------------------------------------------------------------
/Documentation/Images/AddTypoScript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FriendsOfTYPO3/frontend_editing/25352da0585179bfefe44972c2bf9f64303b3bd0/Documentation/Images/AddTypoScript.png
--------------------------------------------------------------------------------
/Documentation/Images/CustomRecordsDropzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FriendsOfTYPO3/frontend_editing/25352da0585179bfefe44972c2bf9f64303b3bd0/Documentation/Images/CustomRecordsDropzone.png
--------------------------------------------------------------------------------
/Documentation/Images/ExtensionManagerSettingsOverview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FriendsOfTYPO3/frontend_editing/25352da0585179bfefe44972c2bf9f64303b3bd0/Documentation/Images/ExtensionManagerSettingsOverview.png
--------------------------------------------------------------------------------
/Documentation/Images/FullEditorInBackend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FriendsOfTYPO3/frontend_editing/25352da0585179bfefe44972c2bf9f64303b3bd0/Documentation/Images/FullEditorInBackend.png
--------------------------------------------------------------------------------
/Documentation/Images/add-typoscript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FriendsOfTYPO3/frontend_editing/25352da0585179bfefe44972c2bf9f64303b3bd0/Documentation/Images/add-typoscript.png
--------------------------------------------------------------------------------
/Documentation/Includes.rst.txt:
--------------------------------------------------------------------------------
1 | .. More information about this file:
2 | https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#includes-rst-txt
3 |
4 | .. ----------
5 | .. text roles
6 | .. ----------
7 |
8 | .. role:: aspect(emphasis)
9 | .. role:: bash(code)
10 | .. role:: html(code)
11 | .. role:: js(code)
12 | .. role:: php(code)
13 | .. role:: rst(code)
14 | .. role:: sep(strong)
15 | .. role:: sql(code)
16 |
17 | .. role:: tsconfig(code)
18 | :class: typoscript
19 |
20 | .. role:: typoscript(code)
21 | .. role:: xml(code)
22 | :class: html
23 |
24 | .. role:: yaml(code)
25 |
26 | .. default-role:: code
27 |
28 | .. ---------
29 | .. highlight
30 | .. ---------
31 |
32 | .. By default, code blocks use PHP syntax highlighting
33 |
34 | .. highlight:: php
35 |
--------------------------------------------------------------------------------
/Documentation/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | ================
4 | Frontend Editing
5 | ================
6 |
7 | :Extension key:
8 | frontend_editing
9 |
10 | :Package name:
11 | friendsoftypo3/frontend-editing
12 |
13 | :Version:
14 | |release|
15 |
16 | :Language:
17 | en
18 |
19 | :Author:
20 | TYPO3 Community
21 |
22 | :License:
23 | This document is published under the
24 | `Open Content License `__.
25 |
26 | :Rendered:
27 | |today|
28 |
29 | ----
30 |
31 | This extension enhances the TYPO3 CMS with the possibility of frontend editing
32 | with `CKeditor`_, the rich text editor of the TYPO3 backend.
33 |
34 | .. _CKeditor: https://ckeditor.com/
35 |
36 | ----
37 |
38 | **Table of Contents:**
39 |
40 | .. toctree::
41 | :maxdepth: 2
42 | :titlesonly:
43 |
44 | Introduction/Index
45 | Installation/Index
46 | InlineEditing/Index
47 | ConfigureAndExtend/Index
48 | NewContentElements/Index
49 | Development/Index
50 | KnownIssues/Index
51 |
52 | .. Meta Menu
53 |
54 | .. toctree::
55 | :hidden:
56 |
57 | Sitemap
58 | genindex
59 |
--------------------------------------------------------------------------------
/Documentation/Installation/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _installation:
6 |
7 | ============
8 | Installation
9 | ============
10 |
11 | Required steps
12 | ==============
13 |
14 | The following steps are required to use frontend editing in a TYPO3 installation.
15 |
16 | * Install the extension
17 |
18 | #. **Using Composer** (recommended):
19 |
20 | .. code-block:: bash
21 |
22 | composer req friendsoftypo3/frontend-editing
23 |
24 | or by downloading the extension.
25 |
26 | #. **Using the Extension Manager** in *Admin Tools > Extensions* as explained
27 | in the :ref:`Extension Installation `
28 | chapter of the official TYPO3 documentation.
29 |
30 | * Add the static TypoScript template *Frontend Editing* to the site roots where the features should be activated
31 |
32 | .. figure:: ../Images/AddTypoScript.png
33 | :alt: TYPO3 frontend editing TyposScript
34 |
35 | .. _optional-settings:
36 |
37 | Optional steps
38 | ==============
39 |
40 | * Set the baseUrl for frontend editing if server path is not a top directory. This is done by adding the following part to setup typoscript:
41 |
42 | .. code-block:: typoscript
43 |
44 | plugin.tx_frontendediting.baseUrl = /
45 |
46 | * Include the static template *Editable Fluid Styled Content v11*, to include basic editable templates for Fluid Styled Content in TYPO3 v11.
47 |
48 | * Disable the :ref:`placeholder feature ` in the extension configuration. By disabling this feature, empty editable content areas will no longer with placeholders. When creating a new content element by dragging and dropping onto the page, a modal pop-up with a backend form will appear so that you can fill in the initial content.
49 |
--------------------------------------------------------------------------------
/Documentation/Introduction/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _introduction:
6 |
7 |
8 | Introduction
9 | ============
10 |
11 |
12 | .. _about-this-document:
13 |
14 | About this extension
15 | --------------------
16 |
17 | This package adds frontend editing capability to TYPO3 CMS, using `CKEditor `__, the rich text editor used by the TYPO3 core. The editor appears as a new backend module. When selecting a page in the page tree, the page becomes editable. Editable regions are configured in the templates, using Fluid or TypoScript.
18 |
19 | .. figure:: ../Images/FullEditorInBackend.png
20 | :alt: Screenshot of the Frontend Editor in the TYPO3 backend.
21 |
22 | Frontend Editing in the TYPO3 Backend.
23 |
24 | .. _credits:
25 |
26 | Credits
27 | -------
28 |
29 | Initial parts of this manual was based on :doc:`Inside TYPO3 `. It was adjusted and
30 | updated to fit with the frontend_editing modules as found in current versions.
31 |
32 | The :ref:`placeholder feature ` makes use of the `confighelper `__ CKEditor plugin by AlfonsoML. The plugin is released under `Mozilla Public License 2.0 `__.
33 |
34 |
35 | .. _feedback:
36 |
37 | Feedback
38 | --------
39 |
40 | If you find a bug either in this manual or in the frontend editing /
41 | extension please use the `bug tracker `__.
42 |
43 | .. _contribution:
44 |
45 | Contribution
46 | ------------
47 |
48 | `Pull requests `__ are very welcome indeed. Please feel free to contribute features, bug fixes, and improvements.
49 |
50 | `Donate to the project through PayPal `__
51 |
52 |
--------------------------------------------------------------------------------
/Documentation/KnownIssues/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _known_issues:
6 |
7 | Known issues
8 | ------------
9 |
10 | We are aware of a few issues that can affect the user experience. By explaining the issues here, we hope you will be able to circumvent them until they are fixed.
11 |
12 | Blank page when disableNoCacheParameter is set
13 | """"""""""""""""""""""""""""""""""""""""""""""
14 |
15 | Pages may not render properly (blank page) if the setting `[FE][disableNoCacheParameter]` is enabled when using the Frontend Editor.
16 |
17 | Route Enhancers
18 | """""""""""""""
19 |
20 | Nice urls may not render properly when using a Route Enhancer for a record. The following error may occur `#1537633463 OutOfRangeException Hash not resolvable`.
21 | To solve this add the following setting `[FE][pageNotFoundOnCHashError] = false` in LocalConfiguration.php.
22 |
23 | Other issues
24 | """"""""""""
25 |
26 | A full list of bugs can be found in our `issue tracker `__.
27 |
--------------------------------------------------------------------------------
/Documentation/NewContentElements/Index.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 |
4 |
5 | .. _content-elements:
6 |
7 | Content elements
8 | ----------------
9 |
10 | New Content Elements
11 | """"""""""""""""""""
12 |
13 | It's possible to add drop zones for new content elements in a custom content elements. This is done by the class called ContentEditableWrapperService.
14 |
15 | - Example of usage.
16 |
17 | .. code-block:: typoscript
18 |
19 | page = PAGE
20 | page.1001 = USER
21 | page.1001 {
22 | userFunc = Your\NameSpace\YourWrappingClass->wrapWithDropZone
23 | }
24 |
25 | - Create your PHP class with user function
26 |
27 | .. code-block:: php
28 |
29 | wrapContentWithDropzone(
50 | 'tt_content', // table name
51 | $uid, // CE uid
52 | -1, // page uid, pid
53 | $content,
54 | 0, // colPos
55 | // additional fields if needed
56 | [
57 | 'subheader' => 'default subheader'
58 | ]
59 | );
60 | }
61 |
62 | return $content;
63 | }
64 | }
65 |
66 | .. _custom-dropzone-modifier:
67 |
68 | Custom Dropzone modifier (using frontend editing together with Grid Elements)
69 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
70 |
71 | Here is a full example of how to use the hook (wrapWithDropZone) together with
72 | `Grid Elements`_ and multi column splitters:
73 |
74 | .. _Grid Elements: https://extensions.typo3.org/extension/gridelements
75 |
76 | https://gist.github.com/joekolade/674ecba5c2615901581d6c4e4c272b4a
77 |
--------------------------------------------------------------------------------
/Documentation/Settings.cfg:
--------------------------------------------------------------------------------
1 | # More information about this file:
2 | # https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#settings-cfg
3 |
4 | [general]
5 |
6 | project = Frontend Editing
7 | version = main (development)
8 | release = main (development)
9 | copyright = since 2016 by the TYPO3 contributors
10 |
11 | [html_theme_options]
12 |
13 | # "Edit on GitHub" button
14 | github_repository = FriendsOfTYPO3/frontend_editing
15 | github_branch = master
16 |
17 | # Footer links
18 | project_home = https://extensions.typo3.org/extension/frontend_editing/
19 | project_contact = https://typo3.slack.com/archives/C9WGPPKK9
20 | project_repository = https://github.com/FriendsOfTYPO3/frontend_editing
21 | project_issues = https://github.com/FriendsOfTYPO3/frontend_editing/issues
22 | project_discussions =
23 |
24 | use_opensearch =
25 |
26 | [intersphinx_mapping]
27 |
28 | # Official TYPO3 manuals
29 | # h2document = https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/
30 | # t3cheatsheets = https://docs.typo3.org/m/typo3/docs-cheatsheets/main/en-us/
31 | # t3contribute = https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/
32 | t3coreapi = https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/
33 | # t3docteam = https://docs.typo3.org/m/typo3/team-t3docteam/main/en-us/
34 | # t3editors = https://docs.typo3.org/m/typo3/tutorial-editors/main/en-us/
35 | # t3extbasebook = https://docs.typo3.org/m/typo3/book-extbasefluid/main/en-us/
36 | # t3extexample = https://docs.typo3.org/m/typo3/guide-example-extension-manual/main/en-us/
37 | # t3home = https://docs.typo3.org/
38 | t3inside = https://docs.typo3.org/m/typo3/reference-inside/main/en-us/
39 | # t3install = https://docs.typo3.org/m/typo3/guide-installation/main/en-us/
40 | # t3l10n = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/
41 | # t3sitepackage = https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/
42 | t3start = https://docs.typo3.org/m/typo3/tutorial-getting-started/11.5/en-us/
43 | # t3tca = https://docs.typo3.org/m/typo3/reference-tca/main/en-us/
44 | # t3templating = https://docs.typo3.org/m/typo3/tutorial-templating/main/en-us/
45 | # t3translate = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/
46 | # t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/
47 | t3tsref = https://docs.typo3.org/m/typo3/reference-typoscript/11.5/en-us/
48 | # t3ts45 = https://docs.typo3.org/m/typo3/tutorial-typoscript-in-45-minutes/main/en-us/
49 | # t3viewhelper = https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/
50 | # t3upgrade = https://docs.typo3.org/m/typo3/guide-installation/main/en-us/
51 |
52 | # TYPO3 system extensions
53 | # ext_adminpanel = https://docs.typo3.org/c/typo3/cms-adminpanel/main/en-us/
54 | # ext_core = https://docs.typo3.org/c/typo3/cms-core/main/en-us/
55 | # ext_dashboard = https://docs.typo3.org/c/typo3/cms-dashboard/main/en-us/
56 | # ext_felogin = https://docs.typo3.org/c/typo3/cms-felogin/main/en-us/
57 | # ext_form = https://docs.typo3.org/c/typo3/cms-form/main/en-us/
58 | # ext_fsc = https://docs.typo3.org/c/typo3/cms-fluid-styled-content/main/en-us/
59 | # ext_indexed_search = https://docs.typo3.org/c/typo3/cms-indexed-search/main/en-us/
60 | # ext_rte_ckeditor = https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/
61 | # ext_scheduler = https://docs.typo3.org/c/typo3/cms-scheduler/main/en-us/
62 | # ext_seo = https://docs.typo3.org/c/typo3/cms-seo/main/en-us/
63 | # ext_workspaces = https://docs.typo3.org/c/typo3/cms-workspaces/main/en-us/
64 |
--------------------------------------------------------------------------------
/Documentation/Sitemap.rst:
--------------------------------------------------------------------------------
1 | :template: sitemap.html
2 |
3 | .. include:: /Includes.rst.txt
4 |
5 | =======
6 | Sitemap
7 | =======
8 |
9 | .. The sitemap.html template will insert here the page tree automatically.
10 |
--------------------------------------------------------------------------------
/Documentation/genindex.rst:
--------------------------------------------------------------------------------
1 | .. include:: /Includes.rst.txt
2 |
3 | =====
4 | Index
5 | =====
6 |
7 | .. Sphinx will insert here the general index automatically.
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://extensions.typo3.org/extension/frontend_editing/)
2 | [](https://get.typo3.org/version/11)
3 | [](https://packagist.org/packages/friendsoftypo3/frontend-editing)
4 | [](https://packagist.org/packages/friendsoftypo3/frontend-editing)
5 | [](https://www.paypal.com/donate/?hosted_button_id=B7YZKNCHTYHRW)
6 |
7 | # TYPO3 extension `frontend_editing`
8 |
9 | This extension enhances the TYPO3 CMS with the possibility of frontend editing
10 | with [CKeditor](http://ckeditor.com/), the rich text editor of the TYPO3
11 | backend.
12 |
13 | | | URL |
14 | |------------------|----------------------------------------------------------------------|
15 | | **Repository:** | https://github.com/FriendsOfTYPO3/frontend_editing |
16 | | **Read online:** | https://docs.typo3.org/p/friendsoftypo3/frontend-editing/main/en-us/ |
17 | | **TER:** | https://extensions.typo3.org/extension/frontend_editing/ |
18 |
--------------------------------------------------------------------------------
/Resources/Private/.htaccess:
--------------------------------------------------------------------------------
1 | deny from all
2 |
--------------------------------------------------------------------------------
/Resources/Private/Language/locallang_be.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 | SEO provider
9 |
10 |
11 | The tag name that will be used for the Content editable wrapper
12 |
13 |
14 | Enable placeholders and direct drop-to-edit without modal.
15 |
16 |
17 | Disable Frontend Editing loading screen.
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Resources/Private/Language/locallang_mod.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Frontend editing
8 |
9 |
10 | Shows the look of the current page and lets you edit the content directly.
11 |
12 |
13 | Frontend editing
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Resources/Private/Layouts/DocHeader.html:
--------------------------------------------------------------------------------
1 |
7 |
8 |
--------------------------------------------------------------------------------
/Resources/Private/Partials/ContentElementsToolbar.html:
--------------------------------------------------------------------------------
1 | {namespace fe=TYPO3\CMS\FrontendEditing\ViewHelpers}
2 |
3 |
This plugin tries to help setup CKEditor by providing additional configuration options to perform some
14 | kind of common tasks.
15 |
Currently if offers a "removeDialogFields" that allows to remove individual fields in the dialogs (versus removing whole tabs with
16 | removeDialogTabs, and "dialogFieldsDefaultValues"
17 | defines default values for dialog fields.
1.9.0: Removed compatibility with CKEditor 3.
50 | Code clean up with EsLint
51 | Safety check that requested dialog tabs exist before trying to work with them.
52 | Check editor.enterMode in removePlaceholder. Thanks to Jules Achiel.
53 |
Now add the plugin in your config.js or custom js configuration
86 | file:
87 | config.extraPlugins='confighelper';
88 |
89 |
90 |
3. Configuration
91 |
config.removeDialogFields
92 |
This entry is a string, the fields are defined as dialogName + ":" + tab + ":" + field. Fields are joined with semicolons.
93 | In order to learn the name of the parameters you can use the "Developer Tools plugin", launch that sample and open the dialog that you want to customize.
94 | Now a little popup with appear showing the info about that field, for example:
95 |
Element Information
96 | Dialog window name : image
97 | Tab name : info
98 | Element ID : txtBorder
99 | Element type : text
100 |
101 | so in order to remove the class attribute for images the config is:
102 |
This setting uses directly a JSON object as the configuration value, first an object that has the dialog names as properties, each property is
108 | a new object with the name of the tabs and finally each property name maps to the field name and it's value is the default value to use for the field.
109 |
An example might be much better as I might have messed up something in the description:
This a text that will be shown when the editor is empty following the HTML5 placeholder attribute. When the user focus the editor, the content is
125 | cleared automatically.
126 |
The value can be set in the configuration or as an attribute of the replaced element
127 |
config.placeholder = 'Type here...';
128 |
129 |
config.hideDialogFields
130 |
This entry uses the same sintax that the 'removeDialogFields' option. The difference is that some fields can't be removed easily as other parts of the dialog
131 | might not be ready and might try to always use it, generating a javascript error. In other cases the layout might be broken if the field is removed instead of hidden.
132 | In those cases it's possible to hide the fields using this entry, and the preview in the image dialog is an example of such a field.