[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] inline editable lazy render - bypass npn-parsable blocks
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69c5102484122_3b18f01063067@gitlab-sidekiq-low-urgency-cpu-bound-v2-8464ddf68b-2lch5.mail> |
Victor Emanouilov pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
9c19b090 by Victor Emanouilov at 2026-03-26T12:53:18+02:00
[FIX] inline editable lazy render - bypass npn-parsable blocks
---
* [FIX] inline editable lazy render - bypass npn-parsable blocks as formatter handles the context switch (between html/wiki) and adds necessary ~np~ tags only when needed; otherwise, we end up with nested ~np~ tags which parserlib does not (yet) support properly
See merge request tikiwiki/tiki!9860
- - - - -
1 changed file:
- lib/core/Tiki/Render/Editable.php
Changes:
=====================================
lib/core/Tiki/Render/Editable.php
=====================================
@@ -98,9 +98,9 @@ class Tiki_Render_Editable
TikiLib::lib('wysiwyg')->setUpEditor($fieldId, $params);
$editable = '<input type="hidden" id="allowhtml" name="allowhtml" value="1" /><textarea name="' . $fieldId . '" id="' . $fieldId . '" style="display:none" rows="' . $params['rows'] . '">' . htmlspecialchars($value) . '</textarea>';
} elseif ($this->layout == 'block') {
- $editable = $this->wrapNp('<textarea class="form-control" name="' . $fieldId . '" id="' . $fieldId . '" rows="' . $params['rows'] . '">' . htmlspecialchars($value) . '</textarea>');
+ $editable = '<textarea class="form-control" name="' . $fieldId . '" id="' . $fieldId . '" rows="' . $params['rows'] . '">' . htmlspecialchars($value) . '</textarea>';
} else {
- $editable = $this->wrapNp('<input type="text" class="form-control" name="' . $fieldId . '" id="' . $fieldId . '" value="' . htmlspecialchars($value) . '" />');
+ $editable = '<input type="text" class="form-control" name="' . $fieldId . '" id="' . $fieldId . '" value="' . htmlspecialchars($value) . '" />';
}
$editable = '<div style="display: none">' . $editable . '</div>';
} else {
@@ -113,9 +113,4 @@ class Tiki_Render_Editable
return "<$tag class=\"$class\" data-field-fetch-url=\"$fieldFetch\" data-object-store-url=\"$objectStore\" data-group=\"$group\" data-label=\"$label\" data-field-id=\"$fieldId\" data-field-type=\"$fieldType\">$value" . smarty_function_icon(['name' => 'edit', 'iclass' => 'ml-2'], $smarty->getEmptyInternalTemplate()) . "</$tag>$editable";
}
-
- private function wrapNp($content)
- {
- return '~np~' . str_replace(['~np~', '~/np~'], '', $content) . '~/np~';
- }
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9c19b090b11193a4a793ad78d97d69951260086d
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9c19b090b11193a4a793ad78d97d69951260086d
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs