View Single Post
Old 02-04-2014, 02:54 PM   #5
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
My 1.5 cents --

Specific example: If I click the new [H1] toolbar button in a <p> ... </p>, then just change the p's to h1's

Generally, add [H1] ... [H6], [P] (maybe more) and if the cursor is in a H# or p block then just change the tags and strip the classes.

If I shift-click, then replace the tags, but leave the classes

If there aren't any h# or p tags, then add the choice to the inner-most text based on container

If the cursor is on 'cursor', then [H1] would ...

Code:
<div>
  <div>
      <span class="heading">cursor</span>
  </div>
</div>

make

Code:
<div>
  <div>
      <h1>cursor</h1>
  </div>
</div>
Shift click [H1] would leave the class

Code:
      <h1 class="heading">cursor</h1>
Just some thoughts
phossler is offline   Reply With Quote