tex4ht.sty indert Rregion and Lregion end hooks within \beginL/R and \endL/R,
mainly to void the inverse produced by the elatex compiler.
\Configure{LRdir}{ <.dir ltr/rtl.> }
\Configure{Rregion} {\beginL} {\endL}
\Configure{TITLE+}{\HCode{\jobname}} -_-_-
dir="\if@rl rtl\else ltr\fi"
-_-_-
\Configure{moreL}
{\ifvmode \let\end:moreRL=\empty
\else\HCode{<span dir="ltr" >}\def\end:moreRL{\HCode{</span>}}\fi}
{\end:moreRL}
\Configure{moreR}
{\ifvmode \let\end:moreRL=\empty
\else\HCode{<span dir="rtl" >}\def\end:moreRL{\HCode{</span>}}\fi}
{\end:moreRL}
-_-_-
\:CheckOption{pic-m} \if:Option
\else
\Configure{$}
{\HCode{<span <.dir ltr/rtl.>>}}
{\HCode{</span>}}{}
\fi -_-_-
\Configure{[]}
{\bgroup
\protect\nested:math
\PicDisplay
$$\everymath{}\everydisplay{}}
{$$\EndPicDisplay \egroup
<.try inline par.>\if@rl \beginL\fi \beginR } -_-_-
Test data
\def\providehyphenmins#1#2{}
\documentclass[english,hebrew]{article}
\usepackage[T1]{fontenc}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Bold symbol macro for standard LaTeX users
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}
\usepackage{babel}
\makeatother
\begin{document}
\[F=ma\quad(\textrm{\L{Newton’s 2nd Law}\R{ }})\]
\[F=ma\quad(\mbox{Newton’s 2nd Law } )\]
\R{\[F=ma\quad(\mbox{Newton’s 2nd Law } )\]}
\end{document}