Working On It Code tag / enhancement for custom page editor

LemoniscooL

Member
Hi!
I talked to Basti about this already because i had some trouble with this .. i was writing a tutorial page for a plugin i wrote and had some problems printing HTML or PHP code onto the screen in a nice looking, formatted way with some highlighting inside.

In the end i had to write the whole HTML for the custom page in my extern text editor and copy&paste it into the HTML edit function of a clean custom page.

See below for the tag i used for the code tag, maybe you like it, maybe not. Anyways i would really like a button inside the editor to add those more easily.

Code:
<pre style="font-size: 11.5px; border: 1px solid #CECFCE; background: #EFEFEF; padding: 25px;-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; width:70%; margin: 0 auto;"> [Put some code here :)] </pre>
Aside of the code tag, maybe you could change the way the editor saves/loads the html code.
As far as i could see HTML special chars like &gt; or &lt; are converted into < or > when re-opening the editor again which makes it pretty hard to edit my custom page. As i still have to edit it inside my extern text editor and replace the whole html code again for every small change.

Just a suggestion :)

greetz
LemoniscooL
 

LemoniscooL

Member
well i didnt mean the syntax highlighting only, the real problem was the code itself being interpreted or removed (php) after saving the page once and editing it again after that which is pretty annoying

anyways, thanks for the link ill have a look at it
 

Mark

Administrator
Staff member
indeed, those pages were not created with the intent of allowing people to insert <?php tags into the database

Also when you are editing HTML make sure you are using the HTML button in the editor ;) it sounds like you might not have been.
 

cajkan

Active Member
Yep
Theres a button Edit as HTML so its very easy to change anything
Also when u create page automaticly saves html tags <p> etc..
and after creating just hit Edit page and u can do what ever you want
 

LemoniscooL

Member
in fact the HTML button was the only way i could work with the editor ..
but you guys seem to not understand me .. first i didnt want to save <?php tags into the database, but &lt;?php which will just print the php code onto the screen instead of executing it ..
second (@cajkan) as i said already when i clicked the Edit Button my code examples were gone which forced me to take my extern text editor, copy the code from there and then (using the HTML button inside the editor) paste it into the page again .. and i have to do this every time when i click the Edit button

think ill just include some screenshots so that you guys understand what i mean..




This is what the Editor looks like after i copy&paste my HTMl (using the HTML button inside the editor) when i save this everything looks nice, but when i click edit on the manage custom pages site the editor looks like this:



That means when i want to edit the page, i will have to edit it inside my extern text editor, then go to theedit page and use the HTML button again to make it work which is pretty annoying
anyways this was just a suggestion, if you think you dont need the possibillity to write guide pages or print code onto the screen instead of removing it thats okay .. ill have to live with it then =)

greetz
 

Mark

Administrator
Staff member
thanks much fro the clear examples :) I will take a closer look at this as time allows, looks like the security on the edit custom pages could be tweaked to be a little more forgiving.
 

Mark

Administrator
Staff member
Just to follow up:

"As far as i could see HTML special chars like &gt; or &lt; are converted into < or > when re-opening the editor again"

I was unable to duplicate this, when I added &gt; or &lt; via HTML mode it was the same when I reopened it for editing.
 

Mark

Administrator
Staff member
thanks much mate, that helps a bunch. I'll see what I can do to make this process smoother
 
Top