improve frontend of emacs, ckeditor, tinymce, nicedit, meta and env functions
Improves in emacs: - use htmx to send content to the controller - show txt and formatted_txt content in the second panel - show two tabs if "tabs" winix parameter is used - add an option to show either one or two panels - correctly resize the editor window (F11) when two panels are shown Improves in ckeditor: - use htmx to send content to the controller - do not check automatically for ckeditor update Improves in tinymce/nicedit/meta/env: - use htmx to send content to the controller while here: - change PascalCase to snake_case in meta/env controllers - update CodeMirror editor to 5.65.16 - udpate Showdown (markdown to html converter) to 2.1.0
This commit is contained in:
@@ -51,34 +51,34 @@ extern Ezc::Vars ezc_vars;
|
||||
void HtmlEscapeFormTxt(HtmlTextStream & out, const std::wstring & in)
|
||||
{
|
||||
std::wstring::const_iterator i;
|
||||
int was_enter = 0; // how many enteres there were before
|
||||
int was_nl = 0; // how many new line characters there were before
|
||||
|
||||
if( in.empty() )
|
||||
return;
|
||||
|
||||
out << R("<p>"); // !! pozbyc sie wstawianie tego html tutaj (wrzucic w jakis sposob do szablonow)
|
||||
out << R("<p>");
|
||||
|
||||
// skipping first new line characters
|
||||
for(i = in.begin() ; i != in.end() && (*i==13 || *i==10) ; ++i);
|
||||
|
||||
for( ; i != in.end() ; ++i )
|
||||
{
|
||||
if( *i == 13 ) // skipping stupid characters (\r\n\ in dos mode)
|
||||
if( *i == 13 )
|
||||
continue;
|
||||
|
||||
if( *i == 10 )
|
||||
{
|
||||
++was_enter;
|
||||
++was_nl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( was_enter == 1 )
|
||||
if( was_nl == 1 )
|
||||
out << R("<br>\n");
|
||||
else
|
||||
if( was_enter > 1 )
|
||||
if( was_nl > 1 )
|
||||
out << R("</p>\n<p>");
|
||||
|
||||
was_enter = 0;
|
||||
was_nl = 0;
|
||||
}
|
||||
|
||||
out << *i;
|
||||
|
||||
Reference in New Issue
Block a user